2022-02-11 12:20 AM
Based on the sample software of FMC_NOR, I am creating a program to store the data received by UART in NOR memory.
Operation content:
(1) Data reception via UART
(2) Write the received data to NOR memory
(3) Use the reset switch to switch to the reception standby state again and erase the NOR memory.
I want to erase the NOR memory only in (3), but the NOR memory is also erased when the program is executed.
How can I branch between program execution and the reset switch?
2022-02-11 04:46 AM
What do you mean by "reset switch"?
A common practice is to use a communication protocol over USART, which enables to erase an attached memory upon command from PC.
JW
2022-02-11 04:52 AM
This is a logic problem with code you're not showing.
The STM32L4 isn't going to erase external NOR flash, or internal flash, without some explicit coding to do so on your part. Show the code that determines an erase should be done.