2020-03-28 04:09 PM
Hi there,
I am using the MCU STM32F103C8T6 and in my code I force an UsageFault condition but the UsageFault_Handler is not been called. I have enabled the USGFAULTENA bit in the SHCSR register, which enables the UsageFault. I envoked an UsageFault by diving by 0, but the processor calls HardFault handler instead of UsageFault handler. The DIV_0_TRP bit is set in the CCR register, which causes faulting when the processor divides by 0. I hope someone can help me find what I am missing. Thanks a lot.
Anar