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.

IWR6843AOP: Avoid using SYS/BIOS in the mmWave demo

Part Number: IWR6843AOP
Other Parts Discussed in Thread: IWR6843, IWRL6432

We are developing using the IWR6843AOP, with which all the demo projects are using the TI RTOS (SYS/BIOS).

However, we recently found that the TI RTOS (SYS/BIOS) is not going to be maintained anymore. (as mentioned in this discussion: TMS320F28388D: TI-RTOS - C2000 microcontrollers forum - C2000Tm︎ microcontrollers - TI E2E support forums)

Thus we would like to develop the IWR6843AOP without using TI RTOS, for better maintenance in the future.

1. Is there any demo project for the IWR6843 that does not use TI RTOS (SYS/BIOS)? Or is there any implementation guide about how to do this?


We are also trying to re-write the out-of-box demo on our own, but we encountered an error when calling the function MMWave_init (&initCfg, &errCode), which is also mentioned in IWR6843ISK: MMWave_init() function not working - Sensors forum - Sensors - TI E2E support forums

Our error messege lools like this:



A
nd after further investigation, it should due to this function call:


However, we still cannot resolve this issue. 

2. Please help us look into and resolve this issue.



Many thanks!
Po-Chih Chen

  • Hello Po-Chih,

    1. TI is actively in development of a freeRTOS solution for 6843. Currently we have a publicly available solution with freeRTOS for IWRL6432, but IWR6843 will come later.

    2. Have you confirmed that you get the Unable to open the Mailbox statement? What error code comes along with it?

    Best Regards,

    Pedrhom

  • Somehow I still cannot get the error code, and I think it may not be the issue.

    I found that SemaphoreP_create() is called in the MMWave_init, which should only be called in a task environment. Is it possible that it is the semaphore creation that makes the system crash? And if this is the case, then it's almost impossible to get rid of the RTOS when using the mmwave SDK, right?

    The source code for the MMWave_init() is as attached:

    MMWave_Handle MMWave_init (MMWave_InitCfg* ptrCtrlInitCfg, int32_t* errCode)
    {
        MMWave_MCB*         ptrMMWaveMCB = NULL;
        SemaphoreP_Params   semParams;
        int32_t             retVal;
    
        /* Initialize the error code: */
        *errCode = 0;
    
        /* Sanity Check: Validate the arguments */
        if ((ptrCtrlInitCfg == NULL) || (ptrCtrlInitCfg->eventFxn == NULL))
        {
            /* Error: Invalid argument detected */
            *errCode = MMWave_encodeError (MMWave_ErrorLevel_ERROR, MMWAVE_EINVAL, 0);
            goto exit;
        }
    
        /* Initialize the memory block */
        memset ((void *)&gMMWave_MCB, 0, sizeof(MMWave_MCB));
    
        /* Populate the control MCB */
        memcpy ((void *)&gMMWave_MCB.initCfg, (void *)ptrCtrlInitCfg, sizeof(MMWave_InitCfg));
    
        /* Are we operating in full configuration mode? */
        if (gMMWave_MCB.initCfg.cfgMode == MMWave_ConfigurationMode_FULL)
        {
            /* YES: Setup the default semaphore parameters */
            SemaphoreP_Params_init (&semParams);
    
            /* Configure the semaphore parameters */
            semParams.name = "MMWave_CfgSemaphore";
            semParams.mode = SemaphoreP_Mode_BINARY;
    
            /* Create the semaphore used for protection of the *full configuration* */
            gMMWave_MCB.cfgSemHandle = SemaphoreP_create(1U, &semParams);
            if (gMMWave_MCB.cfgSemHandle == NULL)
            {
                /* Error: Semaphore was not created. */
                *errCode = MMWave_encodeError (MMWave_ErrorLevel_ERROR, MMWAVE_EOS, 0);
                goto exit;
            }
        }
    
        /* Setup the default semaphore parameters */
        SemaphoreP_Params_init (&semParams);
    
        /* Configure the semaphore parameters */
        semParams.name = "MMWave_Semaphore";
        semParams.mode = SemaphoreP_Mode_BINARY;
    
        /* Create the mmWave link semaphore: */
        gMMWave_MCB.linkSemHandle = SemaphoreP_create (0U, &semParams);
        if (gMMWave_MCB.linkSemHandle == NULL)
        {
            /* Error: Semaphore was not created. */
            *errCode = MMWave_encodeError (MMWave_ErrorLevel_ERROR, MMWAVE_EOS, 0);
            goto exit;
        }
    
        /* Initialize the mmWave Link module: */
        retVal = MMWave_initLink (&gMMWave_MCB, errCode);
        if (retVal < 0)
        {
            /* Error: Failure to open the mmWave Link; error code is already setup. */
            goto exit;
        }
    
        /* SOC Initializations: */
        retVal = MMWave_deviceInitFxn (&gMMWave_MCB, errCode);
        if (retVal < 0)
        {
            /* Error: SOC Initialization failed; error code is already setup  */
            goto exit;
        }
    
    exit:
        /* Determing the error level from the error code? */
        if (MMWave_decodeErrorLevel (*errCode) == MMWave_ErrorLevel_SUCCESS)
        {
            /* Success: Setup the return value */
            ptrMMWaveMCB = &gMMWave_MCB;
        }
        else
        {
            /* Informational/Error: Setup the return value */
            ptrMMWaveMCB = NULL;
        }
        return (MMWave_Handle)ptrMMWaveMCB;
    }



    Best regards,
    Po-Chih Chen

  • Hello,

    Do you have an ICBOOST which will allow you to set breakpoints? This would help finding the exact location if you are not getting an error code for some reason. It is possible to have a no RTOS solution with the mmWave SDK, obviously it would have no tasks and would all be linear or an interrupt, but there are examples of it within the Radar Toolbox. The examples are not for 6843, but could be used as reference for your own solution. Is there a particular reason you are thinking about a no RTOS solution?

    Best Regards,

    Pedrhom

  • Hi Pedrhom,

    It's great to hear that there are examples without RTOS within the Radar Toolbox, can you tell me which example is it? It will definitely be very helpful!
    We want a no-RTOS solution for we are planning to pass certain safety certifications for our project, which will be a lot easier without the RTOS.

    We do have ICBOOST and I was using the breakpoints to dive deep into the code, some of the behavior is a bit weird and I need some more time to clarify what was going on. I believe the example you just mentioned will be very helpful for me to consult.

    Many thanks,
    Po-Chih Chen

  • Hello Po-Chih,

    The example is for 1642. Once you download and install the Radar Toolbox, it will be in the "C:\ti\<radar_toolbox_version>\source\ti\examples\" directory. The name of the example is "nonos_oob_16xx"

    Best Regards,

    Pedrhom Nafisi