AnsweredAssumed Answered

Hard Fault on STM32L486, is there a Flash Bug?

Question asked by Chris_31543 on Jan 26, 2016
Latest reply on Jan 27, 2016 by Chris_31543
Hello,

I have an application running on STM32L486. 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 is

RCC->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


Outcomes