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 SourceportableMPLABPIC32MXport.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
dynamic frequency change
dynamic frequency change
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.
dynamic frequency change
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.
dynamic frequency change
Richard_damon, I agree with you.
Regards.
dynamic frequency change
exactly what was i looking for :)
Thanks!
Thanks!