Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

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?

Regards.

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.

thanks


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 ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

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

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

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner