During the debug running in MPC5478G, CAN message (0x100) in the PIT cannot be sent.

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

During the debug running in MPC5478G, CAN message (0x100) in the PIT cannot be sent.

753 Views
Hanry
Contributor I

Question description

    During the debug running in MPC5478G, CAN message (0x100) in the PIT cannot be sent.

    In MPC5748G, Configure SPI priority to 5, PIT and STM priority to 3.  Configure the STM to transmit SPI and send CAN message 0x111.  Configure the PIT to send CAN message 0x100. During the debug running, CAN message (0x100) in the PIT cannot be sent. But after the board is powered cycle, both CAN messages (0x100 and 0x111) are sent.

Hanry_0-1647577124369.png

The program is attached below.

Don't know what the problem is. Thank you for your help.

 

 

0 Kudos
4 Replies

742 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

looks it is little bit opposite you wrote. In debug, if code is stopped, sending CAN from STM stops working. But in fact it starts again after long time, because STM is enabled to run in debug and so you miss a compare, new compare happens after STM counter rolls over. So allow STM to freeze/stop in debug, modify STM component setting. 

BR, Petr

0 Kudos

729 Views
Hanry
Contributor I

I'm sorry we didn't make this problem clear.

Our problem is that the CAN message (ID 0x100) in the PIT cannot be sent during debug running. But after the board is powered cycle again, both CAN messages (0x100 and 0x111) in PIT and STM can be sent.

The video demo is attached

0 Kudos

705 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

now I got it...Last time I used Lauterbach debugger and your code was working fine in it. Unfortunately S32DS debugger has some issue if FRZ bit is set in STM and PIT, counter does not start if other cores are enabled as well. It is running fine if just single core is enabled and other cores are halted/reset.

So try to keep other cores in reset, if not used. If you need other cores too, it will not work for you properly in S32DS. So delete CPU1/CPU2 from preprocessor setting

PetrS_0-1647848751898.png

BR, Petr

 

0 Kudos

680 Views
Hanry
Contributor I

Thanks for your direction. Best wishes for you.

0 Kudos