1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Code runs with fewer than recommended flash wait states?

Discussion in 'Microcontrollers' started by dknguyen, Nov 16, 2017.

  1. dknguyen

    dknguyen Well-Known Member

    Joined:
    May 6, 2006
    Messages:
    6,761
    Likes:
    72
    I'm writing a bit of test code for the STM32F303K8 off the HSI (internal) oscillator and stepping it up to 72MHz via the PLL. The reference manual says that 2 flash wait-states are required at this speed. However, the code seems to run with just one wait state. Can anybody provide insight into this?

    My guess would be that the prefetch buffer (which is enabled) combined with the very small program just happens to allow the next instruction to always be in the buffer so there are no guarantees that this would always be the case.
     

Share This Page