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


preemptive scheduling whith MSP430f169

Posted by Nobody/Anonymous on May 16, 2005
i´m create two tasks whith the same priority for testing the
preemptive scheduling working with MSP430F169 and I use
the following configurations:
#define configUSE_PREEMPTION1
#define configCPU_CLOCK_HZ 32768
#define configTICK_RATE_HZ 1000

was espected that the scheduler share de CPU whith the both tasks switching the context of the task. correct?
but it is not be hapenning
can I be making something wrong?

RE: preemptive scheduling whith MSP430f169

Posted by Richard on May 16, 2005
32768 is a very slow CPU speed. Is this the actual >internal< speed the core is running at, or just the xtal speed. This parameter needs to be the internal speed (after multiplication, etc.).

If 32768 is the internal CPU speed then you will have to use a slow tick rate, I think 1000 Hz as per your setup is too fast for such a slow CPU.

Finally - what priority are your tasks running at?


RE: preemptive scheduling whith MSP430f169

Posted by Nobody/Anonymous on May 16, 2005
I create two tasks, and set the priority 2 for both tasks.

I defined the maximum task priority as 3
#define configMAX_PRIORITIES 3

i take de value of frecquency of the CPU in datasheet of msp430f169 in www.texas.com.


RE: preemptive scheduling whith MSP430f169

Posted by Nobody/Anonymous on May 16, 2005
The datasheet does not tell you the frequency at which you are running the device only how to setup the clocks. It is possible that the exteral clock is 32K, but the internal processor frequency depends on the register setup.

Look at the function prvSetupHardware() in the FreeRTOS/Demo/msp430/main.c file. This sets up the FLL within the msp430 to multiply the external clock frequency in order to generate the faster internal frequency. To complicate things there are more than one frequency to setup. You need to know the internal frequency at which you are running your hardware - then use this as the constant in FreeRTOSConfig.h.

Maybe you have not changed this function in which case the frequency could be 8MHz also? If this is the case you could try setting the configCPU_CLOCK_HZ setting back to the value as downloaded to see if this fixes your problem.

[ 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