Part Number: MSPM0G3107 Tool/software: Hi, I'm encountering one issue in a new product using MSPM0G3107 and the MCAN. Our customer reported that our product randomly send invalid responds when the system controller request data from our product. I duplicated the issue on bench successfully with experiment. Here're the details. I tried to send out one message in each 10ms and using a CAN protocol analyzer to capture the data on the CAN bus. All the messages were OK if there's only the MSPM0 board was transmitting. But If I use a PCAN USB-CAN adaptor and the PCAN-Viewer GUI to send out several messages to the BUS at fixed frequency. Sometimes the message from MSPM0 changed to other value. Sometimes the CAN_ID changed to all zero but data field was correct. Sometimes, the the ID was correct, but the data changed to other value. One clue is, when the data changed, the first several bytes seems to be always constant. Some messages captured: Here's the Tx function I used for testing: void DrvCanTxMsg(void) { DL_MCAN_TxFIFOStatus sTxFifoStatus; Uint16 i; static Uint8 cnt = 0; DL_MCAN_getTxFIFOQueStatus(MCAN0_INST, &sTxFifoStatus); if(!sTxFifoStatus.fifoFull) // send if tx fifo is not full { /* Initialize message to transmit. */ /* Identifier Value. */ sTxMsg.id = (Uint32)0x0547 << 18U; sTxMsg.xtd = 0; /* Transmit data frame. */ sTxMsg.rtr = 0U; /* ESI bit in CAN FD format depends only on error passive flag. */ sTxMsg.esi = 0U; /* data length */ sTxMsg.dlc = 8; /* CAN FD frames transmitted without bit rate switching */ sTxMsg.brs = 0U; /* Frame transmitted in Classic CAN format */ sTxMsg.fdf = 0U; /* Store Tx events. */ sTxMsg.efc = 1U; /* Message Marker. */ sTxMsg.mm = 0xAAU; /* Data bytes. */ for(i = 0; i < 7; i++) { sTxMsg.data[i] = 0; } sTxMsg.data[7] = cnt; cnt++; /* Write Tx Message to the Message RAM. */ DL_MCAN_writeMsgRam(MCAN0_INST, DL_MCAN_MEM_TYPE_FIFO, 0, &sTxMsg); /* Add request for transmission. */ DL_MCAN_TXBufAddReq(MCAN0_INST, sTxFifoStatus.putIdx); } } The CAN is configured to 1M bitrate, the configuration is shown below. More information, at the beginning I though this might be a problem of the TX FIFO, so I did a experiment to TX message using dedicated buffer, the issue is the same. Please help to check what's problem. Thanks!
↧