Hi,
I am using MSPM0 launchpad for CAN bus communication. MSPM0 is connected via CAN transceiver to PCAN CAN bus analyzer.
When I send first two messages from PCAN they are received as expected, but after the second message MSPM0 starts to receive only each 3rd message.
For example:
1. SENT 0x01 RECEIVED 0x01 (RX Handler get proper data)
2. SENT 0x02 RECEIVED 0x02 (RX Handler get proper data)
3. SENT 0x03 RECEIVED 0x02 (RX Handler has data from previous message)
4. SENT 0x04 RECEIVED 0x02 (RX Handler has data from previous message)
5. SENT 0x05 RECEIVED 0x05 (RX Handler get proper data)
6. SENT 0x06 RECEIVED 0x05 (RX Handler has data from previous message)
7. SENT 0x07 RECEIVED 0x05 (RX Handler has data from previous message)
8. SENT 0x08 RECEIVED 0x08 (RX Handler get proper data)
It seems like something has to be reseted after each RX process, but I don't understand what exactly. When I RESET the launchpad, it starts the same, first two messages are OK but then same issue.
The code that I'm using is the TI example for mcan data RX with FIFO memtype:
DL_MCAN_readMsgRam(MCAN0_INST, DL_MCAN_MEM_TYPE_FIFO, 0U, rxFS.num, &rxMsg);