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

drivers: clock_control: stm32g0 soc requires flash latency #34307

Closed
wants to merge 1 commit into from

Conversation

FRASTM
Copy link
Collaborator

@FRASTM FRASTM commented Apr 15, 2021

This patch set a flash latency of 1 wait state for the STM32G0 soc devices, as the default value of 0 wait state is not enough
to pass some test cases.
It fixes the tests/kernel/fifo/fifo_timeout executed on nucleo_g071rb

Fix #32839

Signed-off-by: Francois Ramu [email protected]

@github-actions github-actions bot added the platform: STM32 ST Micro STM32 label Apr 15, 2021
This patch set a flash latency of 1 wait state for the STM32G0
soc devices, as the default value of 0 wait state is not enough
to pass some tests cases.

Signed-off-by: Francois Ramu <[email protected]>
Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flash latency is set as part of calls to LL_PLL_ConfigSystemClock_ and LL_SetFlashLatency, which should eventually end up in setting a value of LL_FLASH_LATENCY_2

Forcing a default value overrides previous settings that could be done at these stages and will probably lead to failures in other cases, so I prefer we understand why previous calls failed to set a working value in current case.

@FRASTM
Copy link
Collaborator Author

FRASTM commented May 6, 2021

Correct, the nucleo_g071rb has a flash latency of 2 wait-states, as expect, since the hclk is 64MHz (AHBprescaler is 1).

*** Booting Zephyr OS build zephyr-v2.5.0-3100-g37de0c49878c  ***               
stm32g0 flash latency = 2                                            
Running test suite timer_api        

However it appears that 1-wait state can make the tests/kernel/timer/timer_api/ test_timeout_abs pass.

@FRASTM
Copy link
Collaborator Author

FRASTM commented May 21, 2021

This WA is no more relevant since the #32839 is now closed

@FRASTM FRASTM closed this May 21, 2021
@FRASTM FRASTM deleted the g0_latency branch May 21, 2021 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Clock Control DNM This PR should not be merged (Do Not Merge) platform: STM32 ST Micro STM32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tests/kernel/timer/timer_api/test_timeout_abs still fails on multiple platforms
3 participants