Hello ,
Im using S32k144 for motor control application. Right now im using the counter which is triggered by the PDB interrupt. I want to make the CAN communication independent from the main PWM loop so that even if the CAN is stopped it doesnt affect my PWM .
Is there a way i can setup a counter to trigger the can without using PDB
Thanks
Hi @Sriram,
You can setup inside an ISR for any timer to send the CAN data. For example, this example: Example S32K144 FlexCAN RXFIFO DMA S32DS.ARM.2018.R1 - NXP Community. It has configured an interrupt handler for a button, where the CAN frame is sent.
You can configure a timer instead. There are many timer examples either from the SDK, RTD package or from community directly, for example: S32K SDK Example - Function call on configurable period using LPIT timer. - NXP Community.
Best regards,
Julián