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.

TI-RTOS on MSP430F5438A

Other Parts Discussed in Thread: MSP430F5438A, SYSBIOS, MSP430F5529

Good day,

I am trying to port TI-RTOS on the MSP430F5438A and I have encountered the following issues.

On the TI-RTOS empty example (which starts an LED toggling task) for the MSP430F5529LP, after changing the target device and compiling the drivers for my specific MCU (as described in this article: processors.wiki.ti.com/.../Creating_TI-RTOS_Projects_for_Other_MSP430_Devices), the project is successfully built and flashed. It is to be noted that the project still links to MSP430F5529LP.lib. Regardless, the GPIO driver works. The System_printf and BIOS_start calls also work. The task is registered, and the loop is executed. However, upon the Task_sleep function call, the task is preempted and never returns to execution. When debugged, the code seems to hang on __interrupt Void ti_sysbios_family_msp430_Hwi54(Void) which contains an infinite while(1) loop. Further testing revealed that if the Task_sleep call is removed, the loop works properly until it is preempted after a period of time. The code hangs on the same interrupt. This test was performed by using both GPIO LED toggle and System_printf calls inside the task loop.

The exact same code (without the GPIO drivers) has also been tested by importing the SYS/BIOS hello example for the MSP430F5438A and the task works properly. It is created and the loop prints a string once a second (using the System_printf and Task_sleep calls).

My guess is that it is a SYS/BIOS scheduling problem.

One other thing that seems dubious to me is the task SYS/BIOS example which uses two tasks (one is called on a timer and increments a counter and the other pends on a semaphore and prints the counter when awakened). The example works, but the task configurations are not present in the main function. Are they placed anywhere else in the project ?

I hope my questions and testing results explanations were clear. 

Thank you for your help in advance !

  • What version of TI-RTOS are you using? What is the full path name fort the MSP430F5529LP.lib library that is being pulling in? Can you look in CCS->Tools->RTOS Object Viewer->BIOS->Scan for Errors to see if any issues are detected?

    Todd
  • Hi Todd,

    The TI-RTOS that I am using is version 2.16. I should mention that it uses bios version 6.45, while the working SYS/BIOS that I tested separately is 6.46.
    The full path for the library is: ti/tirtos_msp43x_2_16_01_14/products/msp430_driverlib_2_21_00_08a/driverlib/MSP430F5xx_6xx/ccs/MSP430F5529.lib.
    Indeed, the ROV BIOS Scan returns Error: Problem fetching Task stack: Error: fetchArray called with length 0.
    However, the 6.46 SYS/BIOS setup shows the same error, while still having the tasks working properly.

    Thank you for your help,
    Cristian
  • Can you look at ROV right before you call Task_sleep? Do you attempt to setup interrupt 54? If so, how did you try?

    Todd
  • It turns out it was an error on my behalf, as the platform field in the RTSC general properties tab was not set to msp430f5438a.
    Now the empty and other examples are working. However, I am still encountering the following problem: the uart echo example is working properly with its default USCI A1 port, but once I change it to A0 (by configuring the UARTUSCIA_HWAttrs structure and the initUART function), the task hangs on Hwi57 once the UART_write function is called. ROV reports no errors right before its call.
    I do not attempt to setup interrupt 57 myself. The example is properly configured and it is working with its default A1 port.

    Cristian
  • I'm glad the first issue is resolved. Can you open a new thread on the UART one? It's a pain but it helps with our book-keeping?
     
    Todd

  • Of course.
    Again, thank you for your help !