
I want to use CAN 0-5 channel using s32ds 3.4 RTD 2.0.3 version.
The picture below is an error phenomenon as seen by Pcan view.
Data is transmitted and received on all CAN channels, but error passing occurs at irregular intervals.
I am sending and receiving CAN TX RX in 100ms.
I think the cause of this is in the process of controlling the controller.
void v_canCh0ControllerMode(void)
{
static uint8_t u8_canCh0ControllerStart = 0U;
if(0U == u8_canCh0ControllerStart)
{
Can_SetControllerMode(0, CAN_CS_STARTED);
u8_canCh0ControllerStart = 1U;
}
else
{
if(TRUE == b_canCh0TxFlag)
{
Can_SetControllerMode(0, CAN_CS_STOPPED);
b_canCh0TxFlag = FALSE;
u8_canTxStart[0] = 0U;
u8_canCh0ControllerStart = 0U;
}
}
}
After declaring b_canCh0TxFlag as FALSE, it is changed to TRUE when the transmission is completed.
No controller control was created for reception.
I controlled the controller as above, but do I have to do CAN_CS_STARTED and do CAN_CS_STOPPED so that the next transmission and reception can come in?