Hi,
I observed strange behavior with S32K146 regarding the CAN messages.
Sometimes only some messages sending via CAN and captured using PCAN.
We are working witm embOS RTOS and the transmit task sending every 100msec. All the messages sending at a time using blocking function. I observed burst transfer and after only one message sending.
I attached the implementation.
Sending Ids: 0x100x, 0x200x
Receiving Ids: 0x300x
Burst tranfer:
Only one message sending 0x100 and missing Id 0x200x
EVReady and EVMaxVoltage messages missing in the trace.
Do I need check the Transmit mailbox status before start second transfer function?
Best Regards,
Saidhi reddy
Hi,
checking a MB status before calling FLEXCAN_DRV_SendBlocking is not necessarily needed, I think.
FLEXCAN_DRV_SendBlocking is leaving after either message is successfully transmitted or timeout happens. But it is needed the MB interrupt is called and not blocked. Also FLEXCAN_DRV_SendBlocking is checking internal MB's driver state for IDLE at beginning and returns BUSY if not.
So checking of return value could help here. Also try to not receive messages at all, just sending desired ones to know if all is sent.
BR, Petr