AnsweredAssumed Answered

STM32F10X - CAN not working when using certain values within message

Question asked by menecken on Apr 24, 2014
Latest reply on Apr 25, 2014 by Clive One
Dear everybody,

I found a strange behaviour, which I have no explanation for currently. This code doesn't work
NCAN_Outgoing.DLC = 8;
NCAN_Outgoing.ExtId = 0;
NCAN_Outgoing.IDE = CAN_ID_STD;
NCAN_Outgoing.RTR = CAN_RTR_DATA;
NCAN_Outgoing.StdId = 0x7DF;
 
NCAN_Outgoing.Data[0] = 0x02;
NCAN_Outgoing.Data[1] = 0x09;
NCAN_Outgoing.Data[2] = 0x02;
NCAN_Outgoing.Data[3] = 0x00;
NCAN_Outgoing.Data[4] = 0x00;
NCAN_Outgoing.Data[5] = 0x00;
NCAN_Outgoing.Data[6] = 0x00;
NCAN_Outgoing.Data[7] = 0x00;

whereas the exact same code with 0x5FF (and every lower value) doesnt work (meaning no transmission is detected by other devices in the CAN)
NCAN_Outgoing.DLC = 8;
NCAN_Outgoing.ExtId = 0;
NCAN_Outgoing.IDE = CAN_ID_STD;
NCAN_Outgoing.RTR = CAN_RTR_DATA;
NCAN_Outgoing.StdId = 0x5FF;       //only differece
 
NCAN_Outgoing.Data[0] = 0x02;
NCAN_Outgoing.Data[1] = 0x09;
NCAN_Outgoing.Data[2] = 0x02;
NCAN_Outgoing.Data[3] = 0x00;
NCAN_Outgoing.Data[4] = 0x00;
NCAN_Outgoing.Data[5] = 0x00;
NCAN_Outgoing.Data[6] = 0x00;
NCAN_Outgoing.Data[7] = 0x00;

I appreciate any advice. Thank you all very much in advance!

Outcomes