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.

LAUNCHXL-F28P65X: MCAN not able to configure as classic CAN

Part Number: LAUNCHXL-F28P65X
Other Parts Discussed in Thread: SYSCONFIG

In example code, mcan_ex7_classic_transmit , i tried to configure 29bit extended identifier  as classic (11-bit standard identifier)  and transmission id as 1,i could see canid as 000 in Peak CAN view software tool.

Below i tried with two canid's configuration, wrt to example code and result

1)txMsg[loopCnt].id = 0x1;
txMsg[loopCnt].rtr = 0U;
txMsg[loopCnt].xtd = 0U;
txMsg[loopCnt].esi = 0U;
txMsg[loopCnt].dlc = 8U;
txMsg[loopCnt].brs = 0U;
txMsg[loopCnt].fdf = 0U;
txMsg[loopCnt].efc = 0U;
txMsg[loopCnt].mm = 0x7FFU;

Result canid: 000h

2)txMsg[loopCnt].id = 0x100000;
txMsg[loopCnt].rtr = 0U;
txMsg[loopCnt].xtd = 0U;
txMsg[loopCnt].esi = 0U;
txMsg[loopCnt].dlc = 8U;
txMsg[loopCnt].brs = 0U;
txMsg[loopCnt].fdf = 0U;
txMsg[loopCnt].efc = 0U;
txMsg[loopCnt].mm = 0x7FFU;

Result canid: 004h

Can you please help me why the result i am getting canid as 004h for 2nd approach and how can i configure as classic can in example project.

If i try to debugstop in between execution of program and resume it again, the transmission of can stop and cannot able to transmit again.

Please can anyone help me on these issue?

  • Naveen,

              Identifiers are of two types, Standard (11-bit) and Extended (29-bit). This is applicable for both classic CAN and CAN FD. In other words, identifier length has nothing to do with which mode is being used. 

    The standard ID is stored in bits 28:18 of the ID field, not in bits 10:0. That is why a value of 0x100000 gets translated into an ID of 0x4.

  • Naveen, 

    As mentioned in the TRM, standard ID is considered by the module from [28:18] of the corresponding field, which is causing the issue you are experiencing. 

    For setting Standard IDs, please set the following:

    txMsg[loopCnt].id       = ((uint32_t)(0x1)) << 18U;

    Thanks. 

  • Hello Hareesh,

       Thank you very much sir for your reply. 

       I have asked another question as mentioned above, while i do debug stop , can tx stops. In example code , the can tx pending bit is set (MCAN_TXBRP)

      if i need to clear , then it would try to initialize the can module. So without re-initializing can-module it is possible to do someother way at debug.

  • If i try to debugstop in between execution of program and resume it again, the transmission of can stop and cannot able to transmit again.

    It could be a characteristic of the module design. Let me check with our Design team.

  • Could you please confirm if your scenario is like this?

    You initiate a debug stop after having initiated transmit for multiple buffers but before transmission is complete. Once you resume debugger running, the pending transmissions don’t happen. Is this correct? 

    I need answers for the following questions: 

    1. What is your autowakeup config?
    2. What is the value of DBGSUSP_FREE bit? Whatever its current value, can you please try the opposite value as well?
    3. At what point are you halting the debugger?
  • Hi Hareesh,

       Debug steps whatever you mentioned above is correct.

    Answers for following questiones mentioned above:

       1. Autowake up config is disabled

       2. DBGSUSP_FREE bit is zero

       3. I am halting the debugger at random, to see my CAN data fetch is proper or not.

    I have checked MCAN configuration with sysconfig. It's working fine with autowakeup config enable.

    So much thanks for your support.