2020-05-22 09:53 AM
2020-05-22 10:29 AM
Pretty sure CubeMX will only let you do 1ms frequency, but you can change your code to do whatever you want. This is the default:
HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/1000);
If you want it every 0.1ms, then change it to:
HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/10000);
Most libraries are going to expect a 1ms interval here, so you may run into issues.
2020-05-22 11:39 AM
2020-05-22 12:37 PM
> Is this true both for the F4 and F7 families?
Yes
> And does FreeRTOS use the systick timer exploting the CUBEHAL or directy the systick, so I can eventually utilize a timebase for FreeRTOS and another for the CUBEHAL?
Not sure what FreeRTOS does. There is only one SysTick interrupt though, so both have to use the same systick frequency.
I would not advise changing the frequency to something other than 1ms. You will likely break some implicit assumptions in RTOS. If you need interrupts at a different frequency, any of the timers can be used independently from SysTick.
2020-05-30 04:17 AM
> does FreeRTOS use the systick timer exploting the CUBEHAL or directy the systick
FreeRTOS uses SysTick peripheral directly. You can override HAL tick functions and implement those on FreeRTOS tick functions, but then you must ensure that ST's idiot code are not calling those from interrupts.
> I would not advise changing the frequency to something other than 1ms. You will likely break some implicit assumptions in RTOS.
FreeRTOS (and most other RTOS) itself works on ticks, it doesn't care the absolute time.