Question
STM32F10X - CAN not working when using certain values within message
Posted on April 24, 2014 at 17:27
Dear everybody,
I found a strange behaviour, which I have no explanation for currently. This code doesn't workNCAN_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!
#can