This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMDSCNCD28388D: Receiving regular standard CAN messages on MCAN

Part Number: TMDSCNCD28388D
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

I am using the TMDSCNCD28388D eval board. I am trying to test send and receive for CAN and am using the boot_rom example given in C2000 and used the MCAN_Boot.c file as a basis for a bootloader. Right now, it can only receive the messages with an ID equal to 1 and nothing else. What registers (and their respective macros) do I need to configure to change the CAN Mask and Filter and how do they work?

In addition, I wanted to check and see if the function MCAN_sendTwoMessages() in MCAN_Boot.c is supposed to send the exact same message twice. I receive two messages when I run the function, but they are different.

  • Hello,

    I have looped in the appropriate expert, please expect a response back shortly.

    Best Regards,

    Delaney

  • I found that in order to adjust what ID the board will receive, I need to adjust the Standard Message ID Filter Element Field. But even though the board now acknowledges it receives a CAN message, the data is not filled. 

    Right now, I send a CAN message, and the board receives it. But the ID is something different than what I sent, and the data field remains 0 no matter what. The DLC is the same as what I set the CAN message to, however.

  • Hi,

    I will be able to review this by early next week.

    Regards,

    Rajeshwary

  • Hi Tomas,

    What bit-rate are you using for the nominal and data phase? If there is a mismatch between bit-rate used by the host and what the F28388x expects, this could explain why the data field is not filled.

    Kind regards,

    Skyler

  • I believe, by testing when IXXAT can read the outputted message, the bitrate is 500 kbps CiA. But what registers can a check to see the nominal and data phase as well as set the system to regular CAN if need be?

  • Hi Tomas,

    I recommend using an oscilloscope and manually verifying the bitrate. Which example are you using as a reference? Are you using SysConfig? If so, it will be much easier to configure nominal and data phase bit-rates. 

    Here is how you can calculate the nominal bit-rate.

    MCANBitClk = SYSCLK/MCANCLKDIV

    NominalbitTime (Tq) = (NTSEG1 + 1) + (NTSEG2 + 1) + 1

    NominalBRP = (NBRP+1)

    FinalNominalBaudRate = MCANBitClk/( NominalBRP * NominalbitTime)

    Here is how you can calculate the data bit-rate.

    MCANBitClk = SYSCLK/MCANCLKDIV

    DatabitTime = (DTSEG1 + 1) + (DTSEG2 + 1) + 1

    DataBRP = (DBRP+1)

    FinalDataBaudRate = MCANBitClk/( DataBRP * DatabitTime)

    TSEG1, TSEG2, BRP, can be found in the CAN_BTR register.

    Kind regards,

    Skyler

  • I checked with the oscilloscope that the nominal bit-rates is 500 kbps and configured the data phase bit-rates to be the same as the nominal bit-rates.

    What else could be stopping the data part of the message from being received?

  • Hi Tomas,

    Have you tried changing the sampling point? Additionally, in most of our example the data rate is 1Mbps and the nominal rate is 500kbps. Are you using one of our examples? 

    Kind regards,

    Skyler