S32K314 Cannot enter interrupt handling function only in debugging state

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S32K314 Cannot enter interrupt handling function only in debugging state

跳至解决方案
2,048 次查看
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

标记 (1)
0 项奖励
回复
1 解答
1,990 次查看
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.

在原帖中查看解决方案

标记 (1)
3 回复数
2,014 次查看
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 项奖励
回复
1,996 次查看
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 项奖励
回复
1,991 次查看
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.

标记 (1)
%3CLINGO-SUB%20id%3D%22lingo-sub-1950051%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K314%E4%BB%85%E5%9C%A8%E8%B0%83%E8%AF%95%E7%8A%B6%E6%80%81%E4%B8%8B%E6%97%A0%E6%B3%95%E8%BF%9B%E5%85%A5%E4%B8%AD%E6%96%AD%E5%A4%84%E7%90%86%E5%87%BD%E6%95%B0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1950051%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%88%91%E5%9C%A8%20S32K314%20MCU%20%E4%B8%8A%E4%BD%BF%E7%94%A8%20ADC%20%E5%92%8C%20STM%20%E8%AE%A1%E6%97%B6%E5%99%A8%EF%BC%8C%E5%B9%B6%E4%BD%BF%E7%94%A8%20jlink%20%E8%BF%9E%E6%8E%A5%E8%BF%9B%E8%A1%8C%E8%B0%83%E8%AF%95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