S32K314 Cannot enter interrupt handling function only in debugging state

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K314 Cannot enter interrupt handling function only in debugging state

ソリューションへジャンプ
1,575件の閲覧回数
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 件の賞賛
返信
1 解決策
1,517件の閲覧回数
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 返答(返信)
1,541件の閲覧回数
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,523件の閲覧回数
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,518件の閲覧回数
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%20%E3%83%87%E3%83%90%E3%83%83%E3%82%B0%E7%8A%B6%E6%85%8B%E3%81%A7%E3%81%AE%E3%81%BF%E5%89%B2%E3%82%8A%E8%BE%BC%E3%81%BF%E5%87%A6%E7%90%86%E6%A9%9F%E8%83%BD%E3%81%AB%E5%85%A5%E3%82%8B%E3%81%93%E3%81%A8%E3%81%8C%E3%81%A7%E3%81%8D%E3%81%AA%E3%81%84%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1950051%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ES32K314%20MCU%E3%81%A7ADC%E3%81%A8STM%E3%82%BF%E3%82%A4%E3%83%9E%E3%83%BC%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%80%81jlink%E6%8E%A5%E7%B6%9A%E3%81%A7%E3%83%87%E3%83%90%E3%83%83%E3%82%B0%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%3CBR%20%2F%3E%E3%83%87%E3%83%90%E3%83%83%E3%82%B0%E4%B8%AD%E3%81%AB%E5%89%B2%E3%82%8A%E8%BE%BC%E3%81%BF%E5%87%A6%E7%90%86%E6%A9%9F%E8%83%BD%E3%81%AE%E3%83%96%E3%83%AC%E3%83%BC%E3%82%AF%E3%83%9D%E3%82%A4%E3%83%B3%E3%83%88%E3%82%92%E6%89%93%E3%81%A4%E3%81%93%E3%81%A8%E3%81%8C%E3%81%A7%E3%81%8D%E3%81%AA%E3%81%8B%E3%81%A3%E3%81%9F%E3%81%93%E3%81%A8%E3%80%81%E3%81%9D%E3%81%97%E3%81%A6%E3%82%B3%E3%83%BC%E3%83%89%E3%81%AE%E5%AE%9F%E8%A1%8C%E7%B5%90%E6%9E%9C%E3%81%8B%E3%82%89%E3%80%81%E5%89%B2%E3%82%8A%E8%BE%BC%E3%81%BF%E5%87%A6%E7%90%86%E6%A9%9F%E8%83%BD%E3%81%8C%E5%8B%95%E4%BD%9C%E3%81%97%E3%81%A6%E3%81%84%E3%81%AA%E3%81%8B%E3%81%A3%E3%81%9F%E3%81%AE%E3%81%AF%E4%BA%8B%E5%AE%9F%E3%81%A7%E3%81%82%E3%82%8B%E3%81%93%E3%81%A8%E3%81%8C%E3%82%8F%E3%81%8B%E3%82%8A%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%3CBR%20%2F%3Ejlink%E3%82%92%E6%8A%9C%E3%81%84%E3%81%A6%E5%86%8D%E5%BA%A6%E9%9B%BB%E6%BA%90%E3%82%92%E5%85%A5%E3%82%8C%E3%81%9F%E3%81%A8%E3%81%93%E3%82%8D%E3%80%81%E3%82%B3%E3%83%BC%E3%83%89%E3%81%AE%E5%AE%9F%E8%A1%8C%E7%B5%90%E6%9E%9C%E3%81%AB%E5%9F%BA%E3%81%A5%E3%81%84%E3%81%A6%E5%89%B2%E3%82%8A%E8%BE%BC%E3%81%BF%E5%87%A6%E7%90%86%E6%A9%9F%E8%83%BD%E3%81%8C%E6%AD%A3%E5%B8%B8%E3%81%AB%E5%AE%9F%E8%A1%8C%E3%81%95%E3%82%8C%E3%81%BE%E3%81%97%E3%81%9F(%E3%83%87%E3%83%90%E3%83%83%E3%82%B0%E3%83%95%E3%83%A9%E3%83%83%E3%82%B7%E3%83%A5%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F)%E3%80%82%3C%2FP%3E%3CP%3E%E3%81%BE%E3%81%9F%E3%80%81ADC%E3%81%A8TIMER%E3%81%AE%E3%83%AC%E3%82%B8%E3%82%B9%E3%82%BF%E3%82%92%E7%A2%BA%E8%AA%8D%E3%81%97%E3%81%9F%E3%81%A8%E3%81%93%E3%82%8D%E3%80%81%E5%89%B2%E3%82%8A%E8%BE%BC%E3%81%BF%E3%83%95%E3%83%A9%E3%82%B0%E3%81%A8%E3%82%A4%E3%83%8D%E3%83%BC%E3%83%96%E3%83%AB%E3%83%93%E3%83%83%E3%83%88%E3%81%8C%E8%A8%AD%E5%AE%9A%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%82%8B%E3%81%93%E3%81%A8%E3%81%8C%E5%88%86%E3%81%8B%E3%82%8A%E3%81%BE%E3%81%97%E3%81%9F%E3%80%82%3CBR%20%2F%3E%E6%AC%A1%E3%81%AB%E3%80%81NVIC%E3%83%AC%E3%82%B8%E3%82%B9%E3%82%BFISER%E3%82%92%E7%A2%BA%E8%AA%8D%E3%81%97%E3%81%BE%E3%81%97%E3%81%9F%E3%81%8C%E3%80%81%E3%81%99%E3%81%A7%E3%81%AB%E8%A8%AD%E5%AE%9A%E3%81%95%E3%82%8C%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3CP%3E%3CBR%20%2F%3ERTD%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%3ASW32K3_S32M27x_RTD_R21-11_4.0.0_S2311_DS_uupdatesitezip%3CBR%20%2F%3ES32DS%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%3A3.5%3CBR%20%2F%3EJlink%E3%83%95%E3%82%A1%E3%83%BC%E3%83%A0%E3%82%A6%E3%82%A7%E3%82%A2%3AJ-Link%20V11%E3%82%B3%E3%83%B3%E3%83%91%E3%82%A4%E3%83%AB%20May%208%202024%2015%3A36%3A02%3CBR%20%2F%3EJlink%E3%83%89%E3%83%A9%E3%82%A4%E3%83%90%E3%83%BC%3Av9.6%3C%2FP%3E%3CP%3E%E3%81%A7%E3%81%AF%E3%80%81%E3%83%87%E3%83%90%E3%83%83%E3%82%B0%E3%83%A2%E3%83%BC%E3%83%89%E3%81%A7%E5%89%B2%E3%82%8A%E8%BE%BC%E3%81%BF%E3%81%AB%E5%BF%9C%E7%AD%94%E3%81%A7%E3%81%8D%E3%81%AA%E3%81%84%E7%90%86%E7%94%B1%E3%81%A8%E3%81%97%E3%81%A6%E8%80%83%E3%81%88%E3%82%89%E3%82%8C%E3%82%8B%E3%82%82%E3%81%AE%E3%81%AF%E4%BD%95%E3%81%A7%E3%81%97%E3%82%87%E3%81%86%E3%81%8B%E3%80%82%3C%2FP%3E%3CP%3E%E3%81%82%E3%82%8A%E3%81%8C%E3%81%A8%E3%81%86%E3%81%94%E3%81%96%E3%81%84%E3%81%BE%E3%81%97%E3%81%9F%3C%2FP%3E%3C%2FLINGO-BODY%3E