2016-01-26 01:07 AM
Hello,
I have an application running on STM32L4 The application has also the ability to erase and reprogram some pages of the Flash, which are reserved for data storage (EEPROM emulation). After several hours of working the device suddenly stops working. I started the debugger without program the device to see what happenes on the Controller. After Reset the SystemInit()-Function is executed. In this function the first statement isRCC->CR |= RCC_CR_MSION;
Therefore the controller executes the following assembler statements:
LDR.N R0 [PC,#0x3c]
LDR R0,[R0]
ORR.W R0,R0,#1
LDR.N R1,[PC,#0x34]
STR R0,[R1]
With the first Load the address 0x40021000 is loaded into R0. This is RCC->CR. The next statement tries to load the content of the register, but when this line is executed a fault occurs.
In the system control block I cannot see any hints what is wrong.
On another Controller I solved it with erasing all the memory and reprogram it, but I expect the error again after some hours of working.
Does anyone know if this could be a bug? How can I get more Informations what is happening there?
The registers at the fault are pushed on the stack, but i just can figure out that I know the place where the fault occurs.
I hope someone has a hint what to do...
Regards,
Chris
#stm32l4 #flash #fault
2016-01-26 02:00 AM
Weird. Can't this be firewall-related?
JW2016-01-27 09:45 AM
I don't think so. I do not use the firewall. After erasing all the flash the exactly same code runs days and days without any problem...