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
Solved! Go to Solution.
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".
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.
Hi @zhuolin,
Could you share your debug configuration? It could be that the option "Connect to running target" is enabled:
Also, male sure that the option for flash breakpoints is enabled:
One last configuration oversight could be the "Skip all breakpoints" in S32DS:
Best regards,
Julián
This is my debug configuration:
Also, I confirm that I have closed 'Skip all breakpoints'。
Best regards,
zhuolin
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".
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.