zceemja / platform-timsp432

Apache License 2.0
3 stars 1 forks source link

button interrupt always fallback to Default_Handler(infinite loop)? #3

Open Sped0n opened 2 years ago

Sped0n commented 2 years ago

When I try to declare function PORT1_IRQHandler in my main.c file, I found out that the board always stuck when I press any of buttons. It seems that the board has detected the interrupt but ignore PORT1_IRQHandler function that I declared and fallback to Default_Handler in startup_msp432p401r_gcc.c.

Sped0n commented 2 years ago

Here is my code for reference. https://github.com/Sped0n/rslk_njust

zceemja commented 2 years ago

add #include <msp432p401r.h> to main.c

Sped0n commented 2 years ago

add #include <msp432p401r.h> to main.c

It still stuck at infinite loop, Timer_A interrupt doesn't work too. Btw I'm using platformio with clion on a arm64 Mac, Is it possible that an environment issue caused the "bug" to appear?

zceemja commented 2 years ago

I can replicate this issue on my board too. It looks like an issue with toolchain dependencies, not with clion or arm mac. I have tested interrupts before with cmsis framework and it was working fine, but it has no driverlib. I will dig deeper next week

Sped0n commented 2 years ago

I can replicate this issue on my board too. It looks like an issue with toolchain dependencies, not with clion or arm mac. I have tested interrupts before with cmsis framework and it was working fine, but it has no driverlib. I will dig deeper next week

thx