Hello,
I'm using flexcan at 500Kbps .Is it possible to send different 8 bytes value(assigned to different message buffer box) with same CAN ID?
uint8_t BmsStatus1[8] = {88,12,34,45,66,97,54,43};
uint8_t BmsStatus11[8] = {0,2,3,4,5,6,7,0};
FLEXCAN_DRV_ConfigTxMb(INST_CANCOM1,MB,&dataInfo,MSG_ID);
FLEXCAN_DRV_ConfigTxMb(INST_CANCOM1,MB9,&dataInfo,MSG_ID);
FLEXCAN_DRV_Send(INST_CANCOM1, MB9, &dataInfo1, MSG_ID, &BmsStatus10);
FLEXCAN_DRV_Send(INST_CANCOM1, MB, &dataInfo, MSG_ID, &BmsStatus1);
With this functions in code; I'm able to receive only BmsStatus1. How to get multiple 8 byte value for single message ID over multiple transmission?
Both Rx and Tx code are attached.
Hi,
I tried your TX code - left only very first row in ISR handler - and there is no issue. I can get both messages:
void LPIT_ISR (void)
{
status_t st=0;
LPIT_DRV_ClearInterruptFlagTimerChannels(INST_LPIT1,(1<<0));
st=FLEXCAN_DRV_Send(INST_CANCOM1, MB9, &dataInfo1, MSG_ID, (uint8_t *)&BmsStatus10); //632
st=FLEXCAN_DRV_Send(INST_CANCOM1, MB, &dataInfo, MSG_ID, (uint8_t *)&BmsStatus1); //632
}
Here is full output:
With the only two messages - there is no issue - but - you can't rely on this.
To be sure that transmitted message from MB9 ends in MB9 on receiver - you need to specify ID. With the same ID - the message can end in MB0 or MB9 - depends on traffic - if I understand it correctly. Anyway - what is your use case to have the same ID for different messages?
Jiri
Hello Jiri,
This means that my code is working fine, but I'm not able to see it on my console(along with all my other message with different IDs). This would be solved by using CAN analyzer, right?
Thank you,
Sushma
Hi,
actually - your code as it is is not working okay. the The very first MB data are rewritten by MB9, and MB9 is empty - because of the same Message ID. Here is output from unmodified code:
With two messages only it is working... somehow. But as I mentioned above - to be sure that you get all messages in proper MB - you need to specify unique ID for each message.
Jiri
Hello Jiri
That's weird, I have a requirement of sending more than 8 bytes over 1 ID, hence I thought of using 2 MBs (CAN FD is not an option; I have to use CAN 2.0b for my requirement). Any other ways to send more than 8 bytes over CAN 2.0b without creating confusion/ traffic among the different MBs used?
Thank you,
Sushma