S32K312 uses RTD version 4.0. When debugging, the interrupt callback function of PIT cannot be entered. When not debugging, the interrupt can be entered normally.
The following is my configuration information and code:
Hello,
S32K312 uses RTD version 4.0. When debugging, the interrupt callback function of PIT cannot be entered. When not debugging, the interrupt can be entered normally.
Hello, have in mind that debugger often run some counters on background. So if you have multiple interrupts configured it is possible that some will preempt the PIT one.
It looks like simple synchronization issue in debug mode.
Set the PIT to highest priority interrupt and test it.
Best regards,
Peter
Hello,
Nah. this is typical behavior when debugger is connected. I would not suspect debugger itself.
You are out of synchronization with counters, etc... in debug mode unless they directly support debug mode run.
Disable all interrupts except PIT. Wait for PIT to set TIF flag and the step in debug. You will enter the ISR.
Best regards,
Peter
I know that I also enabled interrupts, but in the debug mode, I can't access interrupts, but I can access interrupts without connecting the debugger. So do I need to configure some registers to ensure that interrupts can also enter the debug mode normally?
Hello,
Hmm so from uC point the ISR is working properly.
Only in the debug mode you have issues.
Did you try to set breakpoint to ISR and run the code from reset Did it reach the ISR?
For any setting withing debugger please contact debugger vendor, maybe there is something. But I have personally never encounter such issues on multiple debuggers.
This whole issue seems strange. Please share with me code which demonstrate the issue.
Best regards,
Peter
Hello,
I have just tested your code.
PIT_0_ISR was entered and stopped at breakpoint in debug immediately after TIF for Timer 0 was set.
I see no issue in the code. If I step trough the code, or run it it will end up in ISR.
Best regards,
Peter