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.

AWR1843BOOST: Does all AWR1843Boost EVM Rev need ECO's before testing CAN_SBL?

Expert 2050 points
Part Number: AWR1843BOOST
Other Parts Discussed in Thread: AWR1843

Does all AWR1843Boost EVM Rev need ECO's before testing CAN_SBL (lab0012_can_sbl)? 

How to check the Hardware Rev of my AWR1843Boost EVM?

Thanks

  • Hello Ree,

    As mentioned in Section 6 of the Developer's guide, the ECOs are required for enabling the CAN-FD interface on the EVM (Applicable to all AWR1843Boosts).

    To know more about the device, you can refer to section 3 i.e. "Device Markings" section of AWR1843 Device Errata document.

    Regards,

    Ishita

  • Hi Ishita, 

    Thanks for answers. Can I ask more details?

    1. In section 6 of the Developer's guide, R11, R12, R6 and R4 are mentioned. Does they correspond to the components in the Schematics? I could not find them in Developer's guide. 

    2. I have not done any ECOs on my AWR1843Boost EVM, but I did test EVM with lab0005_object_data_over_can. When I use CAN classic:  CANFD_MCANFrameType frameType = CANFD_MCANFrameType_CLASSIC, CAN communications works well. But when I use CAN-FD: CANFD_MCANFrameType frameType = CANFD_MCANFrameType_FD, the communication only runs few seconds and then stops. Is this problem caused by not doing ECOs?

    3. Witout doing ECOs, I tested the lab0012_can_sbl. When run PC based CAN CLI based application, I see the result: File Send.  It looks like image sent successfully. Is it?

  • Hello Ree,

    1. Yes, for the components mentioned in section 6 of the developer's guide refer to the schematics. Can you let us know the Rev of your AWR1843BOOST EVM? The new rev has these connections by default.

    2. For running the lab0005_object_data_over_can, have you executed the Demo GUI located in:  \labs\ lab0005-Object-Data-Over-CAN\odoc-host\gui\gui_exe\MMWAVECANVISUALIZER.exe (developed based on pcan-basic.zip)?

    3. For lab0012_can_sbl, section 6.2 of the developer's guide demonstrates the steps for running the application. As indicated in Figure 7 and 8, If there is no error in the application Meta-Image, the application will start executing automatically after displaying a message of "parsing completed". 

    Regards,

    Ishita

  • Hi Ishita,

    Thanks. 

    1. I don't know how to check the Rev of the board I have. Could you please have a look of the photos I took. 

    2. Yes. I use that tool. Please see the attached photo.

    Kind regar

    Ree

  • At center of front EVM, Rev version is written. And as per your snapshot it is RevC version. ANd on the same front S2 switch provides the SPI interface OR to the onboard CANFD PHY (U3). In this revision, I don't think you need to do the ECO, but just change this switch S2 towards CAN.

    Can you confirm these

    1. When you flash default binary file (xwr16xx_odoc_ti_design_lab.bin: this binary can be used with AWR1843) from lab0005_object_data_over_can to device and use MMWAVECANVISUALIZER.exe; do you see objects plotted? This visualizer and binary files uses CANFD settings.

    2. While using SBL-CAN, you need to connect serial-terminal to the device in parallel to CAN-FD connection. At this serial terminal you can see the application status during the file download over CAN. Refer AWR1843_Secondary_Bootloader.pdf section 6.2

    This application also uses CAN-FD interface to download the firmware to the device.

    So after load of another application metaimage binary file over CAN-FD is over you would see 'Debug: parsing completed' on serial terminal and further loaded application should bootup, this bootup will be the confirmation of correct binary file load.

    Regards,

    Jitendra

  • Thanks Jitendra, 

    1. I cannot see objects plotted when use CAN-FD. I uploaded a screen capture video. The behaviour is the MMWAVCANVISUALIZER receives few CAN messages when initialize button is pressed, then stops working.

    2. Yes. I did that following the steps. But always get ERROR: RPRC Parsing Failure!!! Please see the attached picture.

    Kind regards

    Ree

  • Hello Ree,

    I have tried both of the applications (lab0005_object_data_over_can and lab0012_can_sbl) at my end to be working.

    One thing to note that lab005 is built for CAN-FD only and AWR1843BOOST has onboard CAN-FD (MCAN) PHY. Although CAN-FD phy can support classic CAN (DCAN), backward support.

    In the MMWAVECANVISUALIZER.exe, checkbox is fixed for CAN-FD. So it will listen object data in CAN-FD mode only. I'm not sure how do you change to classic CAN.

    Now coming to SBL_CAN application (lab0012), I guess you are missing a step while flashing the image via CAN_Metaimage_Flasher.exe.

    Here is the snapshot of the execution of my end on AWR1843BOOST.

    You must need to connect the serial COM port first as soon as device is powered on. At the countdown you need to press any key (space) so SBL can move to flashing mode, where it first erase the specific flash memory range to prepare for application.

    After that at 'Start the image download using XMODEM over UART Or Hit 'Space Bar' to start Image download ove CAN interface
    CCCC'   Print on the screen,

    Now hit 'space' key so SBL is prepare for CAN-FD listen mode, ONLY then run 'CAN_Metaimage_Flasher.exe  <application-bianry-full-path>' command from CMD terminal.

    With these steps I was able to flash and loaded application (mmw demo) boots up (as in the snapshot).

    Regards,

    Jitendra

  • Hi Jitendra,

    Unfortunately, both labs do not work well in my side.

    1. To use CAN classic in lab0005, I change the code in main.c and rebuild the binary.  

    //CANFD_MCANFrameType frameType = CANFD_MCANFrameType_FD;
    CANFD_MCANFrameType frameType = CANFD_MCANFrameType_CLASSIC;

    What is the timing, bit rate setup for CAN FD in AWR1843BOOST? 

    2. This is my steps for testing lab0012

    1) Power on AWR1843BOOST

    2) Connect COM port

    3) Open PuTTy, connect the AWR1843BOOST

    4) Before countdown finish, press 'Enter' key

    5) Connect PCAN-USB FD and CAN wires of AWR1843BOOST

    6) When CCC' Print on the screen, press 'space' key

    7) In windows cmd window, run 'CAN_Metaimage_Flasher.exe C:\ti\mmwave_automotive_toolbox_3_1_0\labs\lab0007_medium_range_radar\prebuilt_binaries\xwr18xx_mrr_demo.bin'

    I put some logs into 'SBL_imageParser' function in image_parser.c to check the state, it seems the error happens in the middle of the image parsing process. 

    Log:
    ...
    OK: RPRC Parsing OK!!!
    state: SBL_RPRC_PARSER_SECTION_DOWNLOAD
    Buffer Length: 2048, Remaining Bytes: 0, Total Bytes Used: 2048
    read bytes: 2048
    OK: RPRC Parsing OK!!!
    state: SBL_RPRC_PARSER_SECTION_DOWNLOAD
    Buffer Length: 2048, Remaining Bytes: 0, Total Bytes Used: 2048
    read bytes: 2048
    OK: RPRC Parsing OK!!!
    state: SBL_RPRC_PARSER_SECTION_DOWNLOAD
    Buffer Length: 2048, Remaining Bytes: 0, Total Bytes Used: 2048
    read bytes: 2048
    OK: RPRC Parsing OK!!!
    state: SBL_RPRC_PARSER_SECTION_DOWNLOAD
    Buffer Length: 2048, Remaining Bytes: 0, Total Bytes Used: 2048
    read bytes: 2048
    OK: RPRC Parsing OK!!!
    state: SBL_RPRC_PARSER_SECTION_DOWNLOAD
    Buffer Length: 2048, Remaining Bytes: 0, Total Bytes Used: 2048
    read bytes: 2048
    OK: RPRC Parsing OK!!!
    state: SBL_RPRC_PARSER_SECTION_DOWNLOAD
    Buffer Length: 2048, Remaining Bytes: 0, Total Bytes Used: 2048
    read bytes: 2048
    OK: RPRC Parsing OK!!!
    state: SBL_RPRC_PARSER_SECTION_DOWNLOAD
    Buffer Length: 2048, Remaining Bytes: 0, Total Bytes Used: 2048
    read bytes: 2048
    OK: RPRC Parsing OK!!!
    state: SBL_RPRC_PARSER_SECTION_DOWNLOAD
    Buffer Length: 2048, Remaining Bytes: 1664, Total Bytes Used: 384
    state: SBL_RPRC_PARSER_SECTION_HEADER
    state: SBL_RPRC_PARSER_SECTION_DOWNLOAD
    Buffer Length: 2048, Remaining Bytes: 0, Total Bytes Used: 2048
    read bytes: 2048
    Error: RPRC Parsing Failure!!!

    I think both 1 and 2 maybe caused by the same problem: CAN FD communication error. As CAN FD network needs very accurate time setting, is it possible the issue is caused by time, bit rate setup of CAN FD of AWR1843BOOST?  

    Thanks

  • Hello Ree,

    You above replay doesn't confirm that you have tried default binary images for both of the labs with CAN-FD. ( you are changing main file to switch to CAN-classic whereas this application and visualizer is built for CAN-FD)

    Could you confirm that you flash the prebuilt binaries on the device and run. And use PEAK dongle which is mentioned in the user guide of those Lab.

  • Hi Jitendar,

    I have tried default binary image for lab0005. But I could not find a pre-build image for lab0012, there are only source files in that lib. So I rebuild the lab0012's binary and tested it. 

    For both test, I use PEAK dongle: PCAN-USB-FD

    https://www.peak-system.com/PCAN-USB-FD.365.0.html?&L=1

    Thanks

  • Hello Wang,

    Let me check this internal with team.

    If CAN-classic is working with you then we may need to change SBL-CAN to classic mode (flasher*.exe) to verify once.

    I'll get back to you in 2 days.

    Regards,

    Jitendra

  • Thank you very much Jitendra! If there is a classic mode SBL-CAN, that will be great! 

  • Hi Jitendra, can I know any progress on changing SBL-CAN to classic mode? 

    Kind regards

    Ree

  • Hello Ree,

    CAN-Flasher tool provided in that Lab application is based on PCAN-Basic-API where its sample application is enhanced to read the object data over CAN and plot on the screen.

    Here are the info to implement your own flasher tool based on Classic mode.

    1. Download PCAN-Basic-API from here https://www.peak-system.com/fileadmin/media/files/pcan-basic.zip

    2. CAN Flasher tool uses \pcan-basic.zip\PCAN-Basic API\Samples\C++_MFC as foundation.

    3. And library of PCAN Basic is available \pcan-basic.zip\PCAN-Basic API\Win32\VC_LIB path.

    4. CAN_Metaimage_Flasher.zip Attached is the Flasher main function where you need to change CAN-FD to CAN classic taking reference from PCAN-Baic_api.

    .

    Regards,

    Jitendra

  • Hi Jitendra, I added some printf code in sbl lab demo as below, could you please have a look of these?

    transport.c

    /* Registered callback function to receive data. */
    static void sblDataCallback(CANFD_MsgObjHandle handle, CANFD_Reason reason)
    {
        ...
            /* Message ID for terminate message? */
            if (id == SBL_CANFD_TERMINATE_MSG_ID)
            {
                gLastMsgFlag = 1;
                /* New debug code */
                SBL_printf("!!!!!!!!!!!!!!!!!!!!!!!!!Terminate msg arrived !!!!!!!!!!!!!!!!!!!!!!!!!\n",errCode);
            }
                gRxPkts++;
        }
        return;
    }

    multicoreimage_parser.c

    static uint32_t SBL_stateRPRCDownloadParse(uint32_t readPtrLcl[], uint32_t bufferLen)
    {
        ...
            /* Load image - to the destination location */
            bytesRead = SBL_imageParser(&imageChunk[0], bufferLen);
            /* New debug code */
            SBL_printf("read bytes: %d, 0x%X\r\n", bytesRead,  gSblMCB.errorStatus);
    
            if (SBL_CHECK_ERROR_STATUS)
            {
                SBL_printf("Error: RPRC Parsing Failure!!!\r\n");
                gSblMCB.bufferParserState = SBL_BUFFER_PARSER_COMPLETED;
                bytesRead = 0U;
                DebugP_assert(0);
            }
        ...
    }

    uint32_t SBL_imageParser(uint32_t* bufferPtr, uint32_t bufferLen)
    {
        uint32_t        bytesRead;
        uint32_t        remainingBytes;
        uint32_t        totalBytesUsed = 0U;
        uint32_t*       ptrLcl = bufferPtr;
    
        remainingBytes = bufferLen;
    
        do
        {
            /* STATE 1 for RPRC image parsing */
            if (gSblMCB.imageParams.state == SBL_RPRC_PARSER_STATE_IDLE)
            {
    
                SBL_printf("state: SBL_RPRC_PARSER_STATE_IDLE\r\n");
                bytesRead = SBL_readRPRCHeader(ptrLcl, remainingBytes);
                remainingBytes -= bytesRead;
                ptrLcl += (bytesRead / 4U);
                totalBytesUsed += bytesRead;
            }
    
            /* STATE 2 for reading the section headers in the RPRC Image. */
            if (gSblMCB.imageParams.state == SBL_RPRC_PARSER_SECTION_HEADER)
            {
                SBL_printf("state: SBL_RPRC_PARSER_SECTION_HEADER\r\n");
                bytesRead = SBL_readRPRCSecHeader(ptrLcl, remainingBytes);
                remainingBytes -= bytesRead;
                ptrLcl += (bytesRead / 4U);
                totalBytesUsed += bytesRead;
            }
    
            /* STATE 3 for reading the section content in the RPRC Image
              and loading into the respective memories. */
            if (gSblMCB.imageParams.state == SBL_RPRC_PARSER_SECTION_DOWNLOAD)
            {
                SBL_printf("state: SBL_RPRC_PARSER_SECTION_DOWNLOAD\r\n");
                bytesRead = SBL_readRPRCSecContent(ptrLcl, remainingBytes);
                remainingBytes -= bytesRead;
                ptrLcl += (bytesRead / 4U);
                totalBytesUsed += bytesRead;
            }
    
            /* STATE 4 for reading the alignment bytes at the
              end of the RPRC image before the next RPRC image start. */
            if (gSblMCB.imageParams.state == SBL_RPRC_PARSER_ALIGNMENT_BYTES)
            {
                SBL_printf("state: SBL_RPRC_PARSER_ALIGNMENT_BYTES\r\n");
                bytesRead = SBL_readAlignmentBytes(ptrLcl, remainingBytes);
                remainingBytes -= bytesRead;
                ptrLcl += (bytesRead / 4U);
                totalBytesUsed += bytesRead;
            }
    
            SBL_printf("Buffer Length: %d, Remaining Bytes: %d, Total Bytes Used: %d\r\n", bufferLen, remainingBytes, totalBytesUsed);
        }
        while (remainingBytes != 0U);
    
    
        return(totalBytesUsed);
    }

    Printf log

    C!!!!!!!!!!!!!!!!!!!!!!!!!Terminate msg arrived !!!!!!!!!!!!!!!!!!!!!!!!!
    Debug: Total data written = 0x39e00
    state: SBL_RPRC_PARSER_STATE_IDLE
    state: SBL_RPRC_PARSER_SECTION_HEADER
    state: SBL_RPRC_PARSER_SECTION_DOWNLOAD
    Buffer Length: 1920, Remaining Bytes: 1808, Total Bytes Used: 112
    state: SBL_RPRC_PARSER_SECTION_HEADER
    state: SBL_RPRC_PARSER_SECTION_DOWNLOAD
    Buffer Length: 1920, Remaining Bytes: 0, Total Bytes Used: 1920
    read bytes: 1920, 0x0
    OK: RPRC Parsing OK!!!
    state: SBL_RPRC_PARSER_SECTION_DOWNLOAD
    Buffer Length: 2048, Remaining Bytes: 0, Total Bytes Used: 2048
    read bytes: 2048, 0x0
    OK: RPRC Parsing OK!!!
    ...
    state: SBL_RPRC_PARSER_SECTION_DOWNLOAD
    Buffer Length: 2048, Remaining Bytes: 0, Total Bytes Used: 2048
    read bytes: 2048, 0x0
    OK: RPRC Parsing OK!!!
    state: SBL_RPRC_PARSER_SECTION_DOWNLOAD
    Buffer Length: 2048, Remaining Bytes: 0, Total Bytes Used: 2048
    read bytes: 2048, 0x0
    OK: RPRC Parsing OK!!!
    state: SBL_RPRC_PARSER_SECTION_DOWNLOAD
    Buffer Length: 2048, Remaining Bytes: 1808, Total Bytes Used: 240
    state: SBL_RPRC_PARSER_SECTION_HEADER
    state: SBL_RPRC_PARSER_SECTION_DOWNLOAD
    Buffer Length: 2048, Remaining Bytes: 0, Total Bytes Used: 2048
    read bytes: 2048, 0x80
    Error: RPRC Parsing Failure!!!

     

    As far as I know, if the message "!!!!!!!!!!!!!!!! Terminal msg arrived!!!!!!!!!!!!!!!!!!" is printed out, Indicates that the image has been completely transferred from the PC to the AWR1843BOOST successfully. That is means the CAN_Metaimage_Flasher and SBL work well during the firmware trasmission. 

    Is my understanding correct? If so, then I think we do not need change CAN_Metaimage_Flasher to CAN Classic. 

    It seems the issue happens during parsing the firmware. The state SBL_RPRC_PARSER_ALIGNMENT_BYTES has never occurred, it seems this state should be the end of the parsing process. 

  • Looks like some of data doesn't reach to the application in right order or time.

    Do you see same result with different kind of MetaImage binary file? If you use file size of few KB (much smaller) 

    I see UART SBL is of size 66KB (C:\ti\mmwave_sdk_03_05_00_04\packages\ti\utils\sbl\xwr18xx_sbl.bin)

    Meanwhile I bring original writer of SBL attention to this e2e thread if he can find the reason here.

    .

    Regards,

    Jitendra

  • Yes. I tried two prebuild metaimage binary: 

    ti\mmwave_automotive_toolbox_3_1_0\labs\lab0007_medium_range_radar\prebuilt_binaries\xwr18xx_mrr_demo.bin

    and 

    ti\mmwave_automotive_toolbox_3_1_0\labs\lab0008_automated_parking\prebuilt_binaries\pa_18xx_mss_demo.bin

    Both them hava the same issue. 

    The SBL I used is rebuilded using the C:\ti\mmwave_automotive_toolbox_3_1_0\labs\lab0012_can_sbl

    Regards 

  • In CAN_Metaimage_Flasher.zip, can you please provide CAN.h as well?

  • We have seen that the download is successful if the PCAN View is kept open and then the flash downloader is executed.  This problem is more prominent in the new PCAN USB. I got this info from internal team.

    So make sure that PCAN View GUI is open while you are trying to flash image via CAN-Flasher tool .

    On CAN_MetaImage_Flasher.zip: content of can.h copied to CAN_Metaimage_Flasher.cpp, so you can comment '#include "CAN.h"'

  • Thanks Jitendra.

    I opened PCAN View GUI, but the flasher cannot connect to PCAN-USB then. Are you sure both flasher and PCAN View can connect PCAN-USB at the same time?

    By the way, when I open the PCAN View GUI, the setting is like:

    Kind regards

    Ree

  • You don't need to connect from PCAN-view but just let is open in background and then use CAN-Flasher tool to flash the image to the device.

  • Thanks. PCAN-View is opened and disconnected with device. Then, run Flasher to download the image. But get the same failure. 

    Kind regards

    Ree

  • I am out of clue now. Somehow data from PC (over PCAN) doesn't reach to the device which is causing RPRC parsing failure.

    You need to probe on the CAN pins to check if all the byte data sent to device without any harm.

    At TI we don't observe this failure on different device.

  • Thanks Jitendra, 

    Can TI provide a CAN classic SBL demo? I think CAN classic is more stable than CAN FD when using PCAN-USB.

    Kind regards 

    Ree 

  • CAN flasher tool source files are already shared with you in my last reply.

    SO you can modify application and flasher tool as per your requirement.

    Regards,

    Jitendra

  • Thanks Jitendra,

    Yes. I received it. But it is just CAN flasher. I mean the second bootloader which support CAN classic. 

    I think we also need second bootloader working in CAN classic.

    Kind regards

    Ree

  • Hello Ree,

    As per this thread- https://e2e.ti.com/support/sensors/f/sensors-forum/985772/awr1843boost-does-all-awr1843boost-evm-rev-need-eco-s-before-testing-can_sbl/3642619#3642619

    you were able to set CAN-SBL to classic -CAN and made it work. so this way you can edit the CAN-SBL to use classic-CAN.

    On other hand we have already assisted you with CAN-Flasher source where you can edit to use CAN-Classic on PC end.

    Combining together you have the solution with you.

    Regards,

    Jitendra