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

dynamic frequency change

Posted by beppe r on November 27, 2009
Hi all,
in a cortexM3 (stm32) project i am using FreeRTOS and i need to change dynamically core frequency (min being 8Mhz and max 72Mhz, default 16Mhz).

in an old post Richard Barry suggested the following:
*In Source\portable\MPLAB\PIC32MX\port.c you will see the function vPortIncrementTick(). This calls vTaskIncrementTick() just once. If you have the frequency, change this so vTaskIncrementTick is called twice. If you quarter the frequency, change this so it is called 4 times. Etc.*

i was wondering if i can instead change the systick interrupt config when i change core freq.

Thanks
Beppe

RE: dynamic frequency change

Posted by Richard on November 27, 2009
Not sure exactly what you are asking - but you have to ensure that time moves at the same speed for the kernel. If you slow down the core speed by 2, then assuming this causes the tick interrupt occurs at half the frequency, you will have to call vTaskIncrementTick() twice in each tick interrupt.

Regards.

RE: dynamic frequency change

Posted by Richard Damon on November 27, 2009
Richard, I believe that he is asking if you cut the clock speed in half, and also cut the clock cycles per tic interrupt in half (so the tics still happen at the same rate) with that work, and I think it should. It will increase the overhead by the tic interrupt, but that is sort of to be expected.

RE: dynamic frequency change

Posted by Richard on November 27, 2009
Richard_damon, I agree with you.

Regards.

RE: dynamic frequency change

Posted by beppe r on November 28, 2009
exactly what was i looking for :)
Thanks!


[ 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