cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4R9_How to not erase NOR memory at program start

YEnom.1
Associate

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?

2 REPLIES 2

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

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..