Skip to main content
dliky2
Associate II
April 23, 2023
Solved

How to configure the FLASH wait states on STM32L432 Nucleo board?

  • April 23, 2023
  • 1 reply
  • 1096 views

Hello all,

I'm currently implementing a double async circular buffer on a STM32L432KC Nucleo board. In order to increase the flow speed of the data leaving the buffers, I'd like to change the FLASH wait states (i.e. set the wait state value to 0). The ST documentation mentions the ART accelerator but does not provide enough details... I've also noticed a few code lines referring to wait states in the HAL_Init function.

Could someone explain how to implement that and which file(s) to modify?

I deeply appreciate your help!

This topic has been closed for replies.
Best answer by Tesla DeLorean

The flash lines (256-bit) likely run about 50-60 ns, so a wait-state for every 16-20MHz

Subsequent word fetches within the line have zero cost, similar for anything in the cache

https://www.st.com/resource/en/product_training/STM32L4_Memory_Flash.pdf

The caching is quite efficient as it has an expedited path. For fast/predictable code execution you could put code in RAM.

1 reply

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
April 23, 2023

The flash lines (256-bit) likely run about 50-60 ns, so a wait-state for every 16-20MHz

Subsequent word fetches within the line have zero cost, similar for anything in the cache

https://www.st.com/resource/en/product_training/STM32L4_Memory_Flash.pdf

The caching is quite efficient as it has an expedited path. For fast/predictable code execution you could put code in RAM.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..