When FlexCAN Tx send Extended ID, SRR bit should be setted?

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

When FlexCAN Tx send Extended ID, SRR bit should be setted?

662 Views
liyun
Contributor II

I use CANoe to test CAN Tx & Rx, find a arbitration problem.

We use SAEJ-1939 protocol, so the Extend ID should be used. Finally, I find the reason, oscilloscope display the SRR bit has not be setted.

SRR bit should always be setted?

Thank you!

 

Base: S32DS_ARM_v2018.R1\S32DS\S32SDK_S32K14x_RTM_2.0.0\platform\drivers\src\flexcan\flexcan_hw_access.c

And the function is: 

FLEXCAN_SetTxMsgBuff()

/* Set the ID according the format structure */
if (cs->msgIdType == FLEXCAN_MSG_ID_EXT)
{
/* ID [28-0] */
*flexcan_mb_id &= ~(CAN_ID_STD_MASK | CAN_ID_EXT_MASK);
*flexcan_mb_id |= (msgId & (CAN_ID_STD_MASK | CAN_ID_EXT_MASK));

/* Set IDE */
flexcan_mb_config |= CAN_CS_IDE_MASK;

/* Clear SRR bit */
flexcan_mb_config &= ~CAN_CS_SRR_MASK;   ←Here!!
}

0 Kudos
2 Replies

654 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi liyun,

According to the description in the S32K1xx MCU Family - Reference Manual:  It must be set to one by the user for transmission (Tx Buffers)

SRR  Substitute Remote Request.png

I need to consult it with the internal team to see why the description of the reference manual conflicts with the SDK.

Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

635 Views
liyun
Contributor II

Hi Robin Shen,

Thanks for your reply.

Best Regards,

Li Yun

0 Kudos