When debugging S32K312, the interrupt callback function of PIT cannot be entered

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

When debugging S32K312, the interrupt callback function of PIT cannot be entered

598 Views
猫和老鼠
Contributor I

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: 

_0-1757556104631.png

_1-1757556125644.png_2-1757556135033.png_3-1757556143700.png_4-1757556183454.png

_5-1757556195574.png

_6-1757556350690.png

_7-1757556380772.png

 

 

 

0 Kudos
Reply
13 Replies

573 Views
petervlna
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply

566 Views
猫和老鼠
Contributor I
It shouldn't be this reason, the interrupt priority of the pit is already the highest, I am considering whether it is a problem with the jlink debugger.
0 Kudos
Reply

545 Views
petervlna
NXP TechSupport
NXP TechSupport

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.

petervlna_0-1757662214414.png

 

Best regards,

Peter

0 Kudos
Reply

468 Views
猫和老鼠
Contributor I

In debug mode, the TIE of PIT-0 has always been 0, and the CVAL register has been decrementing several times.

_0-1757991344386.png

 

0 Kudos
Reply

458 Views
petervlna
NXP TechSupport
NXP TechSupport

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.

petervlna_0-1758004813078.png

 

Best regards,

Peter

 

0 Kudos
Reply

456 Views
猫和老鼠
Contributor I

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?

_0-1758006187484.png

 

0 Kudos
Reply

383 Views
petervlna
NXP TechSupport
NXP TechSupport

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

0 Kudos
Reply

366 Views
猫和老鼠
Contributor I
 
0 Kudos
Reply

313 Views
petervlna
NXP TechSupport
NXP TechSupport

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.

petervlna_0-1758181212709.png

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

 

0 Kudos
Reply

308 Views
猫和老鼠
Contributor I

OK, I have solved this problem. It is faulty soldering of the chip. Thank you very much.

0 Kudos
Reply

367 Views
猫和老鼠
Contributor I

This is my project.Please try it.

0 Kudos
Reply

476 Views
猫和老鼠
Contributor I

Currently, all interrupt callback functions used in debug mode cannot enter

0 Kudos
Reply

477 Views
猫和老鼠
Contributor I

_0-1757988260183.png

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.

0 Kudos
Reply