S32K314 Cannot enter interrupt handling function only in debugging state

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

S32K314 Cannot enter interrupt handling function only in debugging state

Jump to solution
272 Views
zhuolin
Contributor II

I am using ADC and STM timer on S32K314 MCU and debugging with jlink connection.
I found that I couldn't hit breakpoints in the interrupt handling function during debugging, and from the code execution results, it's true that the interrupt handling function wasn't running.
When I unplugged the jlink and powered on the board again, the interrupt handling function was successfully executed based on the code execution results (I used debug flash).

Additionally, I checked the registers of ADC and TIMER, and found that their interrupt flags and enable bits have been set.
Then I checked the NVIC register ISER and it has already been set.


RTD version: SW32K3_S32M27x_RTD_R21-11_4.0.0_S2311_DS_uupdatesitezip
S32DS version: 3.5
Jlink Firmware: J-Link V11 compiled May 8 2024 15:36:02
Jlink driver: v9.6

So, what could be the possible reasons for not being able to respond to interrupts in debug mode?

Thank you very much

0 Kudos
Reply
1 Solution
214 Views
zhuolin
Contributor II

Hi@Julián_AragónM 

Thank you very much for your help. My problem has been resolved.
The reason is that the SWD interface was incorrectly connected.
As shown in the figure, JLINK has two signal pins, "nTRST" and "RESET".

JLINK.jpg
I mistakenly connected the reset pin of the MCU to the "nTRST" pin, but it should actually be connected to the "RESET" pin.
When I correctly connected the reset signal, the work was interrupted.

Usually, when debugging MCUs using the SWD interface, I am accustomed to not using hardware reset pins and instead using software reset targets. This way, only 3 wires need to be connected to work normally.
(GND,SWCLK,SWDIO)
S32K314 is different from the microcontroller I used before. After disconnecting the RESET signal and debugging again, the error continued to occur.

If you are willing, can you describe the underlying reasons for this phenomenon?

Please forgive my English description. I rely on translation software to communicate with you. Thank you.

View solution in original post

Tags (1)
3 Replies
238 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @zhuolin,

Could you share your debug configuration? It could be that the option "Connect to running target" is enabled:

Julin_AragnM_0-1725899303523.png

Also, male sure that the option for flash breakpoints is enabled:

Julin_AragnM_1-1725899438447.png

One last configuration oversight could be the "Skip all breakpoints" in S32DS:

Julin_AragnM_2-1725899466095.png

Best regards,
Julián

 

0 Kudos
Reply
220 Views
zhuolin
Contributor II

Hi,@Julián_AragónM 

This is my debug configuration:

1.jpg2.jpg

Also, I confirm that I have closed 'Skip all breakpoints'。

 

Best regards,

zhuolin

 

0 Kudos
Reply
215 Views
zhuolin
Contributor II

Hi@Julián_AragónM 

Thank you very much for your help. My problem has been resolved.
The reason is that the SWD interface was incorrectly connected.
As shown in the figure, JLINK has two signal pins, "nTRST" and "RESET".

JLINK.jpg
I mistakenly connected the reset pin of the MCU to the "nTRST" pin, but it should actually be connected to the "RESET" pin.
When I correctly connected the reset signal, the work was interrupted.

Usually, when debugging MCUs using the SWD interface, I am accustomed to not using hardware reset pins and instead using software reset targets. This way, only 3 wires need to be connected to work normally.
(GND,SWCLK,SWDIO)
S32K314 is different from the microcontroller I used before. After disconnecting the RESET signal and debugging again, the error continued to occur.

If you are willing, can you describe the underlying reasons for this phenomenon?

Please forgive my English description. I rely on translation software to communicate with you. Thank you.

Tags (1)