2022-05-07 01:38 AM
As showed in captures, the cloce source of cortex system timer is AHB/8 but not core clock and the frequency of systick is 22.5Mhz. However the generated clock source is Processor clock (AHB) not AHB/8.
Is this CUBEMX BUG ??
0x07=0111b
Bit 2 CLKSOURCE: Clock source selection
Selects the clock source.
0: AHB/8
1: Processor clock (AHB)
2022-05-07 08:56 AM
This is a known bug (systick divisor ignored, remains 1).
You can set the systick divisor manually.
@Imen DAHMEN Is a fix planned?
2022-05-09 04:08 AM
Hello @ausera uirwaij,
First let me thank you for having reported.
Could you please precise on which MCU you have observed this misbehavior ?
Also, it will be helpful if you attach you .ioc file for further check from my side.
Thanks in advance.
Khouloud.
2022-05-10 08:08 AM
@Khouloud OTHMAN Same issue with H743/753/750.
RM0433 shows the /8 divisor for systick, but I could not find it in RCC registers.
And no code for the divisor is generated.
CubeMX v 6.5.0, library H7 v 10.0
2022-05-10 01:46 PM
It's the SysTick_CTRL register bit CLKSOURCE. Look at PM0214 section 4.5.1. ARM's documentation is generic and it seems that PM0253 is less adapted for STM32...
2022-05-10 02:23 PM
Ah, so this is the "IMPLEMENTATION DEFINED external clock".
Then SysTick_Config() macro needs too much hacking.
Maybe the systick clock parameter should go to stm32...hal_conf.h along with TICK_INT_PRIORITY. Dunno.