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.

AWR6843AOPEVM: DCAN on AWR6843AOPEVM

Part Number: AWR6843AOPEVM

I am trying to implement DCAN on AWR6843AOPEVM. I've already tried CANFD and it works well. I have few doubts:

1. The CAN port on AWR6843AOPEVM can work with CANFD as well as CAN Classic but. Can it transmit CAN_Classic frames at 5MHz.
2. I tried shifting frame type from  

 CANFD_MCANFrameType frameType = CANFD_MCANFrameType_FD;
to
CANFD_MCANFrameType frameType = CANFD_MCANFrameType_CLASSIC;
keeping the bit timing params same but the data is not correct.

  • Hi,

    Please allow us 24 hours to look into this and we will get back to you.

    Regards,

    Tim

  • Hello KP! 

    1. To maintain backward compatibility with Classic CAN, which is limited to 1Mbps, it is not generally possible for CAN FD to send Classic CAN frames at rates higher than 5Mbps in order to maintain backward comaptibility. 

    2. You are trying to use the FD timing with Classic CAN?  Classic CAN doesn't support beyond 1Mbps.  

    Regards,

    James

  • That makes sense. Could you help set the timing correct for the classic CAN or atleast point me in the direction so I can do it on my own

        /* Configuring 1Mbps and 5Mbps as nominal and data bit-rate respectively
        Prop seg: 8
        Ph seg 1: 6
        Ph Seg2 : 5
        Sync jump: 1
        BRP(Baud rate Prescaler): 2
        Nominal Bit rate = (40)/(((8+6+5)+1)*BRP) = 1Mhz
        Timing Params for Data Bit rate:
        Prop seg: 2
        Ph seg 1: 2
        Ph Seg2 : 3
        Sync jump: 1
        BRP(Baud rate Prescaler): 1
        Nominal Bit rate = (40)/(((2+2+3)+1)*BRP) = 5Mhz
        */
        mcanBitTimingParams.nomBrp = 0x2U;
        mcanBitTimingParams.nomPropSeg = 0x8U;
        mcanBitTimingParams.nomPseg1 = 0x6U;
        mcanBitTimingParams.nomPseg2 = 0x5U;
        mcanBitTimingParams.nomSjw = 0x1U;

        mcanBitTimingParams.dataBrp = 0x1U;
        mcanBitTimingParams.dataPropSeg = 0x2U;
        mcanBitTimingParams.dataPseg1 = 0x2U;
        mcanBitTimingParams.dataPseg2 = 0x3U;
        mcanBitTimingParams.dataSjw = 0x1U;

  •     mcanBitTimingParams.nomBrp = 0x2U;
        mcanBitTimingParams.nomPropSeg = 0x8U;
        mcanBitTimingParams.nomPseg1 = 0x6U;
        mcanBitTimingParams.nomPseg2 = 0x5U;
        mcanBitTimingParams.nomSjw = 0x1U;

        mcanBitTimingParams.dataBrp = 0x2U;
        mcanBitTimingParams.dataPropSeg = 0x8U;
        mcanBitTimingParams.dataPseg1 = 0x6U;
        mcanBitTimingParams.dataPseg2 = 0x5U;
        mcanBitTimingParams.dataSjw = 0x1U;

    I did this and it works for CANFD @1Mbps but Classic CAN doesn't show anything.

  • Hello KP, 

    could you reference this training on use of CAN?

    CAN Integration User Guide 

  • Hey K P,

    These timing parameters should work fine for 1 Mbps classic CAN messages, but there are two other changes you will need to make to your code assuming you are following the CAN Integration User Guide/application note.

    First, you will need to change the fdMode parameter to 0 which will disable CANFD mode through the CCCR.FDOE bit of the MCAN module. The MCANAppInitParams function sets this to 1 by default .You will also need to reassign the global variable frameType to CANFD_MCANFrameType_CLASSIC. Otherwise, the Can_Transmit_Schedule function will send the message in CANFD format. 

    Regards,

    Kristien