stm32 of flash Handling Precautions

From STM32 Programming Manual know: during a write or erase operation, a read operation can not be performed or the code data .

For example: You have to receive serial data during the write Flash, it is likely to lose the serial data.

It is more time-consuming, so, when writing data, CPU will not perform other operations.

Simply put: when writing Flash, CPU can not fetch, leading to interrupt the lack of timely response, which occurred in the received data is not read in time to go and covered the phenomenon .

In such cases, the solution: use DMA . DMA without CPU intervention, once the USART data received by the DMA transfer which is responsible to the circulation buffer. Whether there is data received regular testing software circular buffer, if there is to be processed.

prompt:

If your code will be repeatedly read Flash, we recommend the use of external Flash.

Reprinted from: strongerHuang

Guess you like

Origin www.cnblogs.com/CodeWorkerLiMing/p/12049473.html