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.

AWR1642BOOST-ODS: Error Active status on bus, using MCAN in classic mode with Auto Toolbox 2.8, Kvaser Leaf Light V2 and MATLAB

Part Number: AWR1642BOOST-ODS
Other Parts Discussed in Thread: MMWAVE-SDK

Hello,

I'm attempting to use the Object Detection over CAN lab, but I only get Error Active status on the bus.

Using the ODOC lab 5 from Automotive Toolbox 2.8, I've changed the CAN frame type to Classic and compiled with SDK 2.1

I'm using AWR1642BOOST-ODS ES2 RevB, so I've flicked the selector switch to CAN ON. I don't believe I need to make any further hardware modifations to the PCB to enable CAN.

My CAN interface is Kvaser Leaf Light V2 which only supports CAN2.0B (no CAN FD) and 1Mb/s max bus speed. I don't have access to a Peak interface to test with the supplied visualiser. I also, get Error frame using a logic anlyzer with CAN protocol.

In MATLAB, I need to configure the bus speed: 

configBusSpeed(canch,busspeed,SJW,TSeg1,TSeg2,numsamples) sets the speed of the CAN channel canch to busspeed using the specified bit timing calculation factors to control the timing in an advanced form.

I've tried with SJW = 1, TSeg1 = 4, TSeg2 = 3 and also SJW = 1, TSeg1 = 5, TSeg2 = 2

Using a multimeter, both CAN_L and CAN_H are 2.5V, there is no change.

I don't know what else I can test to debug the issue.

Some questions:

1. The max bus speed for MCAN is stated as 5Mb/s. Does MCAN reduce the bus speed to 1Mb/s when it's in Classic CAN mode? If not, can I make it do so?

2. Is the ODOC demo even applicable for the BOOST-ODS EVM? Do I need to instead modify the Obstacle Detection Lab 4 to transmit using DCAN? If so, can I still use the J3 CAN connector or does it require using the GPIO pins?

3. Can you please advise any other method I can use to access detections over CAN 2.0 with the AWR1642BOOST-ODS?

Regards

Brant

  • Hi Raghu,

    thanks for your reply. However, as I mentioned I've already done what you suggested and get only Error Active frames on the bus.

    Is there any difference between MCAN Classic mode and DCAN frames?

    What is the purpose of the DCAN module if MCAN Classic mode sends the same frames?

    Regards

    Brant 

  • Brant,

    Can you please tell the following values you have set in the ODOC application?

    Prop seg,Ph seg 1, Ph Seg2 , Sync jump, BRP .

    This could be a mismatch in your baudrate settings.

    -Raghu

  • Hi Raghu,

    attached is the default values I'm using in the ODOC lab with MCAN set to Classic mode. I'm using a Kvaser Leaf Light v2 CAN interface, it's limited to 1Mbit/s. I'm then configuring the CAN channel in MATLAB to 1Mbit/s.

    I'm also not using the visualiser executable provided with the ODOC lab. When I run the lab in CCS debug mode, the DS3 led doesn't come on, it sits in MmwDemo_sleep(). Is this becuase the program is waiting for CLI to start the sensor?

    Regards,

    Brant

  • Hi Raghu,

    Using a Logic Analyser, I can see messages are being transmitted over the bus, as shown in the next image:

    I'm using the default ODOC lab, set to classic CAN mode with the following data bit rate settings to account for using a Kvaser leaf Light v2 (not PCAN-USBFD):

    Can you please confirm that the these 'classic' message frames can be read on a CAN 2.0 bus (not a CAN FD device)? In mss_main, I see that using the Classic setting limits the number of data bytes to 8. But does it send the 3 extra bits that differentiate CAN FD from Classic CAN, as shown below? If so, these frames won't be capable of being read on classic CAN bus. 

    Regards

    Brant

  • Brant,

    Have you ever been able to get the CLASSIC CAN working on this setup? Have you tried the sample test code in the "drivers\canfd\test" of the MMWAVE-SDK to check CANFD functionality . You could check this sample application by just changing the MCAN frame type to CLASSIC_CAN messages.

    For ODOC:

    Below are the only changes required in the ODOC (mss_main.c) for supporting the CLASSIC_CAN messages

    1. Change the MCAN Frame type in your initialization.

    CANFD_MCANFrameType frameType = CANFD_MCANFrameType_CLASSIC

    Below is the snapshot I captured just changing the above line in the PCAN-USB tool. I do not have the "Kvaser Leaf Light v2 CAN interface" to check it working using that tool.

    Can you check by modifying the transceiver compensation offset delay value?

    Change the "mcanCfgParams->tdcConfig.tdco " to lower value than 8U and see if the issue gets resolved?

    -Raghu