Pumpkin, Inc.

Pumpkin User Forums

Problem with message Q's and Semaphores

For issues specific to TI's MSP430 line of ultra-low-power microcontrollers, including compilers (e.g. Quadravox AQ430), IDEs (e.g. IAR Embedded Workbench) and development tools (e.g. TI MSP-FET430 Flash Emulation Tool).

Problem with message Q's and Semaphores

Postby jdwalther » Thu May 17, 2007 1:36 am

I have just added a task to my formerly working code. This task receives a message, sets up a buffer and starts an SPI transfer and then waits for a semaphore when the transfer is done. The task that sent the message is waiting on a different semaphore. When the SPI task signals the sending task, the Stack pointer gets trashed. This appears to happen when the SPI task comes around and calls the Waitformsg function.

I hope that some of this made sense and that you can give some ideas. We are running the PRO version with 8 tasks right now.

Posts: 1
Joined: Wed May 16, 2007 11:00 pm
Location: Salt Lake City, Ut, USA

Re: Problem with message Q's and Semaphores

Postby aek » Thu May 17, 2007 8:16 am

Things I would look at:

1) Use of an auto variable in the task. See if things change if all locals are static.

2) Using an event or task that doesn't match the OSEVENTS and OSTASKS settings in your salvocfg.h.

3) Incorrect pointer dereferencing.

It's almost always one of these three.


Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Return to TI's MSP430

Who is online

Users browsing this forum: No registered users and 1 guest