FreeRTOS with MSP430FG461x

Hi, I’m working on a project that may deem necessary to implement freeRTOS with the MSP430.  The board we’re using is TI Experimenter’s board with the MSP430FG4618.  I altered the demo code from the MSP430IAR port and got it to compile and download. The problem is the scheduler won’t execute any task.  I checked the LED test file and also the hardware setting and they seem fine (I had the LED and serial communication to work before running the scheduler). I also made sure the code conforms with the addressing scheme of the interrupt vector of that chip.  One thing I noticed is that the timer interrupt is not being called.  Does anyone have experienced working with FreeRTOS on this chip that can help me get the demo to work?   

FreeRTOS with MSP430FG461x

The MSP430F461x family uses the extended MSP430X architecture, with 20 bit registers.  If you are accessing anything above the 64K boundary or do 20-bit calculations then you’ll have problems with the FreeRTOS distribution for MSP430, as the context switching doesn’t handle 20-bit registers. I have a portable.c module working on the MSP430F5438, using CCE3 compiler, but not well-tested.  I can email the portable code if your problem is in the MSP430X changes. Did you check the error code when you try to start the scheduler?  You may not have enough heap memory.  If the scheduler doesn’t start, and enable interrupts, then you wouldn’t see the timer interrupt.   Jack Peacock

FreeRTOS with MSP430FG461x

Hi Jack, The scheduler does start and I do see a "Only 16bit will be pushed to the stack" warning when building the port with IAR (I also have CCE).  So the problem probably is with the extended architecture of the MSP430FG4618. Please do send me your portable files, and hopefully I can get it to work my board. Thanks for your help, Tom    

FreeRTOS with MSP430FG461x

Hi Jack,   The same thing I met when I port to MSP430F5438, Please do send me your portable files. Thanks a lot. ZouYong

FreeRTOS with MSP430FG461x

If someone has the time to put together a port for the MSP430X to be included in the FreeRTOS distribution I can contribute the (crude and sketchy) test code I did for the TI MSP430F5438 Eval board.   Jack Peacock

FreeRTOS with MSP430FG461x

Hello Jack, I will be doing just that very soon.  I don’t need the code as I have it.  I’ve been doing some stability tests and it is very stable.  I have the complete demo for TI’s ‘5438 board working – I am running ‘UserExperience’ as a task.  The USB demo works – I have verified that – I haven’t yet tried the audio recording and playback but I should get to that soon. I will be posting the CCE and IAR workspaces for this very soon – as in next week. It is up to Richard if he wants to include or not in the FreeRTOS distribution. Regards, John

FreeRTOS with MSP430FG461x

Richard, I have the CCE port on my web-site – www.WestmorelandEngineering.com – please take a look – note I currently have the port password protected. Regards, John

FreeRTOS with MSP430FG461x

My port succeed.  platform is IAR4.20+MSP430F5438. The kernel dose work. I’ll finish my project of protocol convert using in communication. Thanks John for your CCE files.

FreeRTOS with MSP430FG461x

Jack, Your code is working runs fine, haven’t encountered any problems.  Thanks for you port!

FreeRTOS with MSP430FG461x

Hi Jake, Did you encounter problems with implementing a context switch inside an interrupt? Thanks, Tom