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

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

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

601件の閲覧回数
猫和老鼠
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 件の賞賛
返信
13 返答(返信)

576件の閲覧回数
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 件の賞賛
返信

569件の閲覧回数
猫和老鼠
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 件の賞賛
返信

548件の閲覧回数
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 件の賞賛
返信

471件の閲覧回数
猫和老鼠
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 件の賞賛
返信

461件の閲覧回数
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 件の賞賛
返信

459件の閲覧回数
猫和老鼠
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 件の賞賛
返信

386件の閲覧回数
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 件の賞賛
返信

369件の閲覧回数
猫和老鼠
Contributor I
 
0 件の賞賛
返信

316件の閲覧回数
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 件の賞賛
返信

311件の閲覧回数
猫和老鼠
Contributor I

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

0 件の賞賛
返信

370件の閲覧回数
猫和老鼠
Contributor I

This is my project.Please try it.

0 件の賞賛
返信

479件の閲覧回数
猫和老鼠
Contributor I

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

0 件の賞賛
返信

480件の閲覧回数
猫和老鼠
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 件の賞賛
返信