biemster / st17h66_blinky

Minimal code to blink the LED on Lenze st17h66 based tags
6 stars 1 forks source link

Fix IRQ, the handlers don't seem to be called. #2

Closed biemster closed 1 year ago

biemster commented 1 year ago

Commit fff5e68 added initialization for a timer and IRQ, to wake up the mcu from sleep. However, when it enters sleep, it never seems to wake up anymore. Easiest approach to test this, is to set the Default_Handler to the Reset_Handler in RTE/Device/ARMCM0/startup_ARMCM0.c, so it would simply restart and blink once again.

biemster commented 1 year ago

I checked to just set the RTC interrupt with the handlers calling Reset_Handler, while waiting using WaitRTCCount for much longer than the RTC interrupt is set. Also like this the ISR is not called.

biemster commented 1 year ago

Nice overview info on the cortex-m interrupts: https://mcuoneclipse.com/2016/08/14/arm-cortex-m-interrupts-and-freertos-part-1/

biemster commented 1 year ago

Not sure if this actually got fixed, the function at jump table idx 230 is called, but no IRQ handlers..

biemster commented 1 year ago

this seems to be how it is implemented by Lenze.