AnsweredAssumed Answered

Busfault not generated on STM32F2

Question asked by l.lawrence on Feb 18, 2014
Latest reply on Feb 21, 2014 by sung.chen_chung
I am running the standard peripheral demo code on an STM3221G evaluation board (for STM32F2 MCU).

However when I tried to force a busfault by writing to an invalid address, nothing happened and the program just moved on! For example the following code inserted at the beginning of main() would cause an BusFault exception on STM32F3Discovery board, but NOT on the STM32F2 eval board.

    int *ptr = (int *)0x0;
    *ptr = 1; 

I am perplexed since I believe we do not need to explicitly enable busfault for precise/imprecise errors (unlike division by zero.)

Please help since trapping invalid memory access is important to our application.

Thanks
Lawrence

Outcomes