AnsweredAssumed Answered

Questions about CAN state

Question asked by JAE MIN SHIN on May 22, 2019
Latest reply on May 30, 2019 by Petr Stancik

Hello

 

When we successfully received the CAN message, we checked that 'mbs [mb_idx] .state' was set to 'FLEXCAN_MB_IDLE' in 'FLEXCAN_DRV_GetTransferStatus'.

 

However, there is a problem when receiving different CAN ID Messages.
'Mbs [mb_idx] .state' is set to 'FLEXCAN_MB_IDLE' regardless of the CAN ID when receiving the first CAN ID Message and receiving another CAN ID Message

 

To improve this, 'CAN_Init' is performed after 'CAN_Deinit', but mbs '[mb_idx] .state' is keep as 'FLEXCAN_MB_IDLE'.

 

ex)

while(CAN_GetTransferStatus(&can_pal1_instance, RX_BUFF_IDX) == STATUS_BUSY);

CAN_Deinit(&can_pal1_instance);
CAN_Init(&can_pal1_instance, &can_pal1_Config0);

while(CAN_GetTransferStatus(&can_pal1_instance, RX_BUFF_IDX_2) == STATUS_BUSY);

 

Could you please share the guide to resolve this issue

 

Thanks

Outcomes