Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nucleo_g431rb: Blinky too slow / wrong clock setup? #21715

Closed
martinjaeger opened this issue Jan 6, 2020 · 6 comments · Fixed by zephyrproject-rtos/hal_stm32#34
Closed

nucleo_g431rb: Blinky too slow / wrong clock setup? #21715

martinjaeger opened this issue Jan 6, 2020 · 6 comments · Fixed by zephyrproject-rtos/hal_stm32#34
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug platform: STM32 ST Micro STM32 priority: medium Medium impact/importance bug

Comments

@martinjaeger
Copy link
Member

Describe the bug
The LED is on approx. 15 times per minute (measured with stop watch), so it is 2 times slower than expected. On = off time in blinky app is set to 1 second.

To Reproduce
Steps to reproduce the behavior:

  1. west build -b nucleo_g431rb samples/basic/blinky/
  2. west flash

Impact
As I'm dealing with energy measurement in my application, the energy will most probably be wrong by the same factor as the blinky interval is wrong.

Environment:

  • OS: Linux 5.4.2-1-MANJARO zephyr-master_fork #1 SMP PREEMPT Thu Dec 5 09:55:57 UTC 2019 x86_64 GNU/Linux
  • Toolchain: West v0.6.3, Zephyr SDK v0.10.3
  • Commit SHA: ac09bb3

Additional context
I double-checked the clock and PLL configuration in nucleo_g431rb_defconfig vs. ST reference manual already and could not find any mistake.

@martinjaeger martinjaeger added the bug The issue is a bug, or the PR is fixing a bug label Jan 6, 2020
@erwango erwango added priority: medium Medium impact/importance bug platform: STM32 ST Micro STM32 labels Jan 6, 2020
@FRASTM
Copy link
Collaborator

FRASTM commented Jan 7, 2020

This is due to a AHBPrescaler not correct in the LL_PLL_ConfigSystemClock_HSI() function

@martinjaeger
Copy link
Member Author

Great that you found the reason. So will you provide a fix?

@FRASTM
Copy link
Collaborator

FRASTM commented Jan 7, 2020

yes, in progress, I wil attach the PR which is in the Cube

@FRASTM
Copy link
Collaborator

FRASTM commented Jan 7, 2020

Refer to stm32cube: stm32g431: wrong clock setup zephyrproject-rtos/hal_stm32#34

@martinjaeger
Copy link
Member Author

Refer to stm32cube: stm32g431: wrong clock setup #34

Don't understand what exactly you are referring to. Was that a commit / PR? Number 34 doesn't seem related to our problem.

@FRASTM
Copy link
Collaborator

FRASTM commented Jan 7, 2020

Sorry, refer to Refer to stm32cube: stm32g431: wrong clock setup zephyrproject-rtos/hal_stm32#34

FRASTM added a commit to FRASTM/zephyr that referenced this issue Jan 10, 2020
This updates the stm32cube/stm32g4xx/drivers
to wa the issue zephyrproject-rtos#21715

Signed-off-by: Francois Ramu <[email protected]>
jhedberg pushed a commit that referenced this issue Jan 10, 2020
This updates the stm32cube/stm32g4xx/drivers
to wa the issue #21715

Signed-off-by: Francois Ramu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug platform: STM32 ST Micro STM32 priority: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants