Skip to main content
ausera uirwaij
Associate III
May 7, 2022
Question

CubeMX bug??? the generated clock frequency of cortex system timer is not what I set in CubeMX

  • May 7, 2022
  • 2 replies
  • 2583 views

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 ??

0693W00000NpXDRQA3.png 

0693W00000NpXDWQA3.png 

0x07=0111b

Bit 2 CLKSOURCE: Clock source selection

Selects the clock source.

0: AHB/8

1: Processor clock (AHB)

This topic has been closed for replies.

2 replies

Pavel A.
Super User
May 7, 2022

This is a known bug (systick divisor ignored, remains 1).

You can set the systick divisor manually.

@Imen DAHMEN​  Is a fix planned?

Khouloud OTHMAN
Associate
May 9, 2022

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.

Pavel A.
Super User
May 10, 2022

@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.

0693W00000Npi6CQAR.png 

CubeMX v 6.5.0, library H7 v 10.0

Piranha
Principal III
May 10, 2022

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...