L4R7 prefetch enabling and disabling
Hello,
Does anybody know if there is any prerequisite when enabling or disabling the prefetch buffer?
More specifically, in the Nucleo L4R5ZI sleep example the prefetch buffer is disabled in main() just before the main loop. It is never re-enabled after this. (Bit FLASH_ACR_PRFTEN.)
__HAL_FLASH_PREFETCH_BUFFER_DISABLE();
__HAL_FLASH_PREFETCH_BUFFER_ENABLE();
Since the prefetch buffer is enabled at reset / power up, the existence of an ENABLE macro suggests that it can be re-enabled, but I haven't been able to find out if this is done in the background by the MCU HW or if you must give the MCU some clock cycles to adjust itself.
Greatful for your input.
Best regards
Niclas

