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.
The program is attached below.
Don't know what the problem is. Thank you for your help.
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
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
BR, Petr
Thanks for your direction. Best wishes for you.