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: How to prestore a default Configuration Parameter in the device?

Expert 2050 points
Part Number: AWR1642BOOST-ODS

Regarding to obstacle detection demo, I have a question about configuration file. 

Can we prestore a default configuration file in the device's memory? Then we do not need to send it every time to the device through UART when power on.

How to prestore a default configuration file?

  • Hello Ree,

    Please refer this lab application which embeds the configuration within the source code-

    https://dev.ti.com/tirex/explore/node?node=AIbEoly4B7.jPYk1aCiO-A__AocYeEd__LATEST

    You need to take reference from this application and implement the same with your application.

    Regards,

    Jitendra

  • Thanks. Is the configuration embeded in demo lab0005_object_data_over_can?

    It is difficult to find where the configuration parameters are embeded in the source code you told. It also seems the SBL demo is quite different from other demos. 

    int32_t MmwDemo_mssDataPathConfig(void)
    
    {
    
    ...
    
    /* Open the mmWave module: */
    if (MMWave_open (gMmwMssMCB.ctrlHandle, &gMmwMssMCB.cfg.openCfg, NULL, &errCode) < 0)
    {
    System_printf ("Error: MMWDemoMSS mmWave open configuration failed [Error code %d]\n", errCode);
    return -1;
    }
    ...

    In the source code, I would like to hardcoding the configuration before MMWave_open function is called. Is it possible to do that? Is the configuration stored in gMmwMssMCB.cfg.openCfg?

    Thanks

  • Hello Ree,

    As per OOB CAN demo, CLI commands are stored in odoc-target\mss\cli.c: radarCmdString array which are automatically processed and consumed within the application. Parameters of gMmwMssMCB.cfg.openCfg is already part of mss_main.c file.

    Regards,

    JG

  • Thank you very much JG. 

    The source code I used is in C:\ti\mmwave_automotive_toolbox_3_2_0\labs\lab0004_obstacle_detection\src\mss

    I cannot find arry radarCmdString in cli.c. I think you may mean struct cliCfg.

    As gMmwMssMCB.cfg.openCfg is already a part of mss_main.c, I think there should be already default configurations.

    I want the device to start sensor working immediately once power supply is connected, without waiting for the CLI startSensor command. 

    For that purpose, I added code

        /* Start DataPathConfig Without CLI Command Trigger*/
        if (MmwDemo_mssDataPathConfig () < 0) {
            Event_post(gMmwMssMCB.eventHandleNotify, MMWDEMO_DSS_START_FAILED_EVT);
        }

    into mss_main.c as below. 

    /**********************************************************************
         * Setup the DS3 LED on the EVM connected to GPIO_2
         **********************************************************************/
        GPIO_setConfig (SOC_XWR16XX_GPIO_2, GPIO_CFG_OUTPUT);
    
        /* Start DataPathConfig Without CLI Command Trigger*/
        if (MmwDemo_mssDataPathConfig () < 0) {
            Event_post(gMmwMssMCB.eventHandleNotify, MMWDEMO_DSS_START_FAILED_EVT);
        }
    
        /* Data Path management task Main loop */
        while (1)
        {
            event = Event_pend(gMmwMssMCB.eventHandle,
                              Event_Id_NONE,
                              MMWDEMO_CLI_EVENTS | MMWDEMO_BSS_FAULT_EVENTS |
                              MMWDEMO_DSS_EXCEPTION_EVENTS,
                              BIOS_WAIT_FOREVER);
    
            /************************************************************************
             * CLI event:: SensorStart
             ************************************************************************/
    
            if(event & MMWDEMO_CLI_SENSORSTART_EVT)
            {
                System_printf ("Debug: MMWDemoMSS Received CLI sensorStart Event\n");
    
                /* Setup the data path: */
                if(gMmwMssMCB.isSensorStarted==false)
                {
                    if (MmwDemo_mssDataPathConfig () < 0) {
                        /* Post start failed event; error printing is done in function above */
                        Event_post(gMmwMssMCB.eventHandleNotify, MMWDEMO_DSS_START_FAILED_EVT);
                        continue;
                    }
                    else
                    {
                        /* start complete event is posted via DSS */
                    }
                }
                else
                {
                    /* Post start complete event as this is just a duplicate command */
                    Event_post(gMmwMssMCB.eventHandleNotify, MMWDEMO_DSS_START_COMPLETED_EVT);
                    continue;
                }
            }

    But I get the error when it is runned. 

    [Cortex_R4_0] Error: MMWDemoMSS mmWave open configuration failed [Error code -203554190]

    Could you please kindly check if this what is the problem?

    Kind regards

  • Hello Ree,

    Device is missing the basic configuration which is done over CLI command in lab0004_obstacle_detection.

    I would suggest you first understand the flow of lab0005_object_data_over_can for embedded command parameters, where application applies all the configuration as soon as it boots.

    Regards,

    Jitendra