Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

MSP430 - ISRs unable to call TaskYield()?

Posted by aLUNZ on January 20, 2005
G'day,

The following is a lengthy-ish explanation of a problem encountered with a
port to the MSP430F149. There seems to be a problem with an ISR calling
TaskYield() which causes other interrupts to be disabled. If anyone has
encountered something like this would appreciate any pointers.

Am attempting to port FreeRTOS onto the EasyWeb2 dev board from Olimex using
the demo MSP430 port (originally for the MSP430F449) as a base.

The EasyWeb2 has only one LED but does have a 16x2 LCD. Therefore, have
modded the demo apps so that the LED flashing routines will toggle a char
that is to be displayed (there is a new task that periodically redraws the
LCD every 50ms). The single main LED is used by the vErrorChecks() routine
to report on the status of the tasks.

So far so good and the program seems to work.

However there is a problem where vErrorChecks() will report that there is a
problem (the LED flashes faster) after the demo routine has been running for
a while. Poking around in the code reveals that the problem is with
ComTest.

What is happening is that after a while the Tx ISR stops working. That is,
characters are not being pulled from the xCharsForTx queue and then sent to
the UART.

Further poking around reveals that the problem goes away if the call to
TaskYield() within the vRxISR() routine is commented out.

Am a bit of a loss to immediately see why this is a problem, so would
appreciate any pointers that people may have.

Thanks for your time,
aLUNZ

RE: MSP430 - ISRs unable to call TaskYield()?

Posted by Nobody/Anonymous on January 20, 2005
I think the 149 and 449 are pretty well compatable regarding memory layout. Are you using the demo application exactly as downloaded - but for the addition of the extra task?


RE: MSP430 - ISRs unable to call TaskYield()?

Posted by aLUNZ on January 21, 2005
Thanks for the very prompt reply. It turned out that the problem as originally reported was caused by creating more threads/tasks than there was memory to support them.

Trimming back the number of threads has mostly got things behaving as they should. Have only got one remaining problem (with the polled queue test) that needs to be investigated. That problem is proving to be very intractable and seems to be defying most physical laws (including causality). May have to ask some more questions on that one if am unable to nut out what is going wrong there.

For the record, the EasyWeb2 port is very much the original Demo port with changes to:
- setting up the hardware (different ports for LED / LCD, different CLK, Timer ISR setup)
- removing one of the LED tasks from Flash.c

and of course the code to use the LCD to simulate LEDs.

Again, thanks for the reply and thanks for FreeRTOS, it is proving to be fun and useful.

aLUNZ

RE: MSP430 - ISRs unable to call TaskYield()?

Posted by Richard on January 21, 2005
With the demo apps I basically just add tasks until all the memory is used. Perhaps I should make this a little clearer in the docs.

The demo tasks are more for testing the kernel and are each written in isolation which is not memory efficient. I have just added a new section to the FreeRTOS.org WEB site about how applications can be written to use less RAM. You might like to take a look.

Regards.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists