FreeRTOS with MSP430FG461x

cantiwrx16 wrote on Wednesday, June 24, 2009:

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?   

jakbird wrote on Thursday, June 25, 2009:

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

cantiwrx16 wrote on Thursday, June 25, 2009:

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    

zy015240 wrote on Friday, June 26, 2009:

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

Thanks a lot.

ZouYong

jakbird wrote on Friday, June 26, 2009:

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

jwestmoreland wrote on Saturday, June 27, 2009:

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

jwestmoreland wrote on Thursday, July 02, 2009:

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

zy015240 wrote on Wednesday, July 08, 2009:

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.

cantiwrx16 wrote on Thursday, July 09, 2009:

Jack,

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

cantiwrx16 wrote on Thursday, July 23, 2009:

Hi Jake,

Did you encounter problems with implementing a context switch inside an interrupt?

Thanks,
Tom