Interrupts triggering without being enabled?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Interrupts triggering without being enabled?

891 Views
raels-r
Contributor IV

After my previous question, I managed to access and view the NVIC register and unfortunately the rogue interrupts were not enabled, so I have no idea why/how their service routines are being accessed.

86439_86439.pngNVICError2.png

screen shot showing that TSI0_IRQHandler was called and, since undefined, went to DefaultISR, which endlessly loops.

86415_86415.pngNVICError1.png

Highlighted: TSI0 interrupt is disabled, so should not be firing.

 

USB0 and UART1 have also been firing, though those are also disabled.

 

Any insight into what might be causing this would be appreciated!

 

cheers,

Rael

Labels (1)
Tags (2)
0 Kudos
4 Replies

642 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi,

pls check the xPSR register in the debugger, the low 9 bits of xPSR register  points to the interrupt vector source. If the vector source is 3(ARM core hard fault), it is a bit complicated, because many causes can lead to the hard fault, for example, you select wrong chip in your project, you define a pointer without initialization, the pointer points to zero, which is flash address.... If the vector source is not 3, it is easy, you can get the vector source.

pastedImage_0.png

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

642 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Rael,

In default , all of the interrupt are disable , have you disable or enable them by hand ?

Please show your code about how to initialize the UART and how to disable or enable them .

BR

Alice

0 Kudos

642 Views
raels-r
Contributor IV

The interrupts are set using:

NVIC_ClearPendingIRQ(irq);

NVIC_EnableIRQ(irq);

Where irq is the enumerated irqn's defined in MKL25Z4.h rev2.5 ie/ "UART0_IRQn"

As I said, the registers suggest that none of the interrupts are enabled (their enable bits in NVIC are 0 when I checked in debugger).

There is no code to initialise UART_1 as it is meant to be disabled.

0 Kudos

642 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Rael,

If we  not enable the interrupt , or  some incorrect operation ,  the interrupt can not occur in normal.

So if you are inconvenient for show your code , you can debug step by step to check when the interrupt bit be set .

Hope it the helps

Alice

0 Kudos