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.

Visibility to RTOS tasks on EZ430-RF2560 Accelerometer Application

Other Parts Discussed in Thread: CC2560, MSP430BT5190

I would like to modify the EZ430 accelerometer application code to make the EZ430 into a 'Simple' device as described for the MSP-EXP430F5438.
The first step I would like to take is to understand how the existing code works. I see that main() calls sdk_start_scheduler(), which calls vTaskStartScheduler(), but then it appears that this function is a dead end. What occurs following this call? What is the RTOS scheduler doing? Is there a way that I can see this in code?

  • Fred,

    Could you clarify what you mean by "simple" device?

    The most comprehensive information about the Mindtree stack and the application is available in the Developer's Guide:

    http://processors.wiki.ti.com/images/6/6f/MSP430BT5190_CC2560_Developers_Guide.pdf

     

    Regards,
    Gustavo

  • By 'Simple', I am referring to the application referenced on page 58 of the developer's guide you mentioned above. It appears that there is an SDK for that application on the MSP-EXP430F5438, but not for the EZ430-RF2560.

  • Fred,

    Now I understand. There is no simple application for the EZ430. However, you can directly port the Experimenter board code since the only difference is pin configuration. Take a look at the hardware definitions of the EZ430 and the ones in the experimenter board. Apply the EZ430 hardware to the simple application configuration and you can use it in the EZ430.

    Regards,
    Gustavo

  • That's great, thanks! I will give it a try.

    Back to the RTOS; according the documentation in the code "At least one task should be created via a call to xTaskCreate() before calling vTaskStartScheduler()". Looking at the main() function for the accelerometer application as quoted below, there are no tasks created before the scheduler is called. How is it that any tasks are being called by the RTOS for this application if none were ever created?

    int main(void)
    {
        sdk_start_scheduler();      /* Start OS scheduler */

        return 0;                   /* Should never reach here */
    }

  • Hi, 

    I guess you are referring to the latest FreeRTOS API documentation for vTaskStartScheduler() at http://www.freertos.org/a00132.html

    This page shows an example code where a task created before starting the scheduler. Otherwise, the API call to vTaskStartScheduler() will automatically create the idle task. 

    Additional tasks are simply created as part of the idle task. 

    Regards

     

  • Hi Balaji,

    I'm referring to the MindTree SDK accelerometer demo for the EZ430-RF256x. The vTaskStartScheduler() is shown below. I don't see that any addtional tasks are created. This is why I can't understand what the RTOS is doing. I also searched the project for 'xTaskCreate' and found nothing. I feel like it's hiding from me.

    void vTaskStartScheduler(void)
    {
        portBASE_TYPE xReturn;
        /* Add the idle task at the lowest priority. */
        xReturn = xTaskCreate(prvIdleTask, (signed char *)"IDLE", tskIDLE_STACK_SIZE, (void *)NULL, (tskIDLE_PRIORITY | portPRIVILEGE_BIT), (xTaskHandle *) NULL);
        if (xReturn == pdPASS) {
            portDISABLE_INTERRUPTS();
            xSchedulerRunning = pdTRUE;
            xTickCount = (portTickType) 0;
            portCONFIGURE_TIMER_FOR_RUN_TIME_STATS();
            if (xPortStartScheduler()) {}
            else { /* Should only reach here if a task calls xTaskEndScheduler(). */}
        }
    }

  • Hi Gustavo,

    I didn't have any luck porting the MSPEXP-PAN13xx SDK directly to the EZ430-RF256x, but I did have success using the UART bridge code: http://processors.wiki.ti.com/index.php/CC256x_MT_UART_BRIDGE

    I was able to connect the EZ430-RF256x to my laptop via USB, then connect to the module with my laptop's Bluetooth. I was able to open up two Tera Term sessions (one for the Bluetooth serial connection, one for the USB connection), then pass data back and forth between the two connections. Very cool.

    Thanks!

    Fred

  • Excellent. Happy to hear that.

    Regards,
    Gustavo

  • Please search for the function sdkPlatformInit(). This is invoked as part of the idle taskfunction portTASK_FUNCTION(prvIdleTask, pvParameters) in the file tasks.c. 

    The sdkPlatformInit() function sets up the other tasks in the system. 

    Regards