MPC5748G flexcan message send issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC5748G flexcan message send issue

522 Views
dsytj88
Contributor II

hi suporter

with MPC5748G+ SDK(3.0),I use mailbox 26-mailbox 95 for transmitting messgebox.

the sending scripts are like this:

if((FLEXCAN_DRV_GetTransferStatus(MessagesToCANbus6,TX_MAILBOX_86)== STATUS_SUCCESS)&&sendBuff_ReStorded_CAN6[4].dataLen){
SendMessage_CAN(MessagesToCANbus6, TX_MAILBOX_86,0x99,sendBuff_ReStorded_CAN6[4].data,sendBuff_ReStorded_CAN6[4].dataLen);
 } 

but in the condition that 8 channels of CAN working,then after one moments(several minutes),

one of the sending mailbox will be in busy status forever,and then no more messages will be sent out any more.

the other messages in the same CAN channel is alive only this message or several sending messages is dead.

I check the return value for this function,FLEXCAN_DRV_GetTransferStatus,the return value is alaways busy.do you know why this status is alaways busy?thank you.

 

 

0 Kudos
1 Reply

507 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

 

such value returned can be either due to message is not transmitted still, which can be checked by inspecting MB's CODE field within debugger or a state of internal driver variable/struct is not properly updated. To check this step through FLEXCAN_DRV_GetTransferStatus function and see if item has FLEXCAN_MB_IDLE value. If not and MB's code field indicates transmitted message it points to some inconsistency, which could happen by incorrect driver usage, etc. You can leave this condition by calling Abort function, I think.

 

BR, Petr

0 Kudos