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.

MSPM0G3507: CAN single message Tx example seeing wrong waveform on TxD

Part Number: MSPM0G3507

Tool/software:

Hi,

I am using mcan_single_message_tx example to verify the CANFD submission. But I see 15 pulse of 5us at the frequency of every 100us on TxD line (PB12). No matter I change the data value or bit rate switching, the waveform stay the same. And when the button is pressed second time, this is not seen any more.

Any idea on what might go wrong?

Thanks!

Crane

  • Hi, 

    According to my previous experience, this SDK code example should be able to communicate normally.

    Also, if you want to verify CAN operation, you can try mcan_loopback demo, this demo configure can loopback internal M0.

    Regards,

    Helic

  • Hi Helic,

    Thanks for your reply.

    Loopback example works fine. When setting external loopback, correct CANFD signal can be seen on TxD pin. But when loopback is disabled, the signal on TxD pin is like what's described in last post. Tried to remove the external connection with TxD pin and it behaves the same.

    The only difference is the loopback enable function:

    Fullscreen
    1
    DL_MCAN_lpbkModeEnable(MCAN0_INST, DL_MCAN_LPBK_MODE_EXTERNAL, true);
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Looking into this function, what it does are:

    Fullscreen
    1
    2
    3
    *regCccr |= 0x00000080; // set CCCR TEST bit
    *regCccr &= (~(0x00000020)); // clear CCCR MON bit (switch between internal and external loopback)
    *regTest |= 0x00000010; // set TEST LPBK bit
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Then my question is, should it work to just disable loopback to make normal transmission work? Or is there anything else that needs to be configured when the loopback is disabled?

    Thanks!

    Crane

  • It works today.