STM32 WWDG interrupt firing when not configured

前端 未结 8 1650
执念已碎
执念已碎 2021-02-12 14:51

I have an application that I am porting from the Keil IDE to build with the GNU toolchain due to license issues. I have successfully be able to set up, build, flash and run the

8条回答
  •  感动是毒
    2021-02-12 15:31

    In my case, I had a function written in the GCC assembly that was migrated from the ARM assembly. The problem went away after I had added the .thumb_func line to the assembly file.

    I was getting this error:

    (gdb) c
    +c
    Continuing.
    
    Program received signal SIGINT, Interrupt.
    WWDG_IRQHandler () at ...startup_stm32f40_41xxx.s:121
    
    (gdb) bt
    #0  WWDG_IRQHandler () at ...startup_stm32f40_41xxx.s:12
    #1  
    #2  RTOS_SysTick_Handler () at ...osKernel.s:18
    #3  
    #4  0x0800021a in task0 () at ...main.cpp:10
    #5  0x08000214 in frame_dummy ()
    #6  0x00000000 in ?? ()
    

    RTOS_SysTick_Handler is a function written in assembly and the WWDG_IRQHandler was always triggered before any first assembly instructions in that function (tried different instructions and it didn't change anything).

    I was doing some tweaks around the C code and at some point, I hit another handler: UsageFault which led me to the .thumb_func hint: ARM Cortex M4 SVC_Handler "UsageFault".

提交回复
热议问题