2019-02-15 04:12 AM
Hello!
I have some strange behavior with STM32L0 processor.
I get Hard fault error in my function and I can't understand why this happens?!
I have equivalent codes - one of them works and other doesn't work causing Hard fault error.
Also this happens only when function is called with parameter mCopy=2.
I use SystemWorkbench for STM32 IDE.
I have attached these two codes - working and problematic code.
Would you please help me!
Thank you!
Solved! Go to Solution.
2019-02-15 05:51 AM
The trick here is to look at what the processor is complaining about. The Hard Fault points to the faulting instructions and has register content.
The CM0 doesn't like unaligned 32-bit reads, ie (addr & 3) != 0
2019-02-15 05:51 AM
The trick here is to look at what the processor is complaining about. The Hard Fault points to the faulting instructions and has register content.
The CM0 doesn't like unaligned 32-bit reads, ie (addr & 3) != 0
2019-02-15 11:26 PM
Thank you, Clive!
I will check it!
2019-02-17 11:54 PM
Problem is solved!
Thank you, Clive!