Question
STM32 HAL CAN RX
Posted on March 02, 2016 at 13:05
Hello
I am having trouble with the CAN_RX_MSG structure. As the struct contains both StdId and ExtId fields I have seen incorrect data being received in my ISR when both fields are populated.if (CAN_RX_MSG.Ext_Id == 0x11111111) { //gather CAN data }The above statement can evaluate as true when the CAN_RX_MSG structure contains a Std_Id message and its data and leads to the Std_Id data being populated into the program incorrectly.Can anyone advise as to how I can avoid this issue? Is the IDE parameter required?Advice is much appreciated.ThanksDan #can #hal #std_id #ext_id