The problem of extended message ID of MSCAN transmit.

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

The problem of extended message ID of MSCAN transmit.

660 Views
terrybogard
Contributor II

Dear NXP expert, when CAN_LDD code generated by processor expert, I found the strategy of send frame function identified the standard ID and extended ID was wrong.

if the MessageID <0x10000, then it will be considered as standard ID. Pls give some advice about this, and I need use the MSCAN transmit extended ID.

MC56F82748

CAN1_SendFrame()

{

...

if ((Frame->MessageID & LDD_CAN_MESSAGE_ID_EXT) != 0U) { /* Is the frame configured as Extended ID? */
CAN_PDD_EnableTxMessageBufferRTRExtId(CAN_BASE_PTR, PDD_ENABLE); /* If yes then set message type as "remote frame" */
} else {
CAN_PDD_EnableTxMessageBufferRTRStdId(CAN_BASE_PTR, PDD_ENABLE); /* If no then set message type as "remote frame" */}

...

}

#define LDD_CAN_MESSAGE_ID_EXT 0x80000000UL /* Value specifying extended Mask, ID */

 

0 Kudos
1 Reply

645 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I attach the msCAN example for MC56F84xxx, pls refer to it.

BR

XiangJun Rong

0 Kudos