renode icon indicating copy to clipboard operation
renode copied to clipboard

division-by-zero operation doesn't trigger an exception in stm32f4.repl

Open fengxin215 opened this issue 5 months ago • 0 comments

I'm using the stm32f4.repl configuration file that comes with Renode. When I perform a division-by-zero operation in my code, it doesn't trigger an exception.

    SCB->SHCSR |= SCB_SHCSR_USGFAULTENA_Msk;
    SCB->CCR |= SCB_CCR_DIV_0_TRP_Msk; 
    SCB->CCR |= SCB_CCR_UNALIGN_TRP_Msk;
    SCB->SHCSR |= SCB_SHCSR_BUSFAULTENA_Msk; 

    int a = 1 / 0;

fengxin215 avatar Jul 10 '25 07:07 fengxin215