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
In debug mode, the TIE of PIT-0 has always been 0, and the CVAL register has been decrementing several times.
Hello,
Ok, and is your TIF flag set after counter reach modulo?
This is simple HW comparator so it must be set in case you reach modulo. And if the interrupt is enabled it will be called.
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
OK, I have solved this problem. It is faulty soldering of the chip. Thank you very much.
This is my project.Please try it.
Currently, all interrupt callback functions used in debug mode cannot enter
In debug mode, the data in the register is like this, there is no data in the register, I don't know what's going on. Could you please take a look.