You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2022/09/20 06:26:45 UTC

[mynewt-core] branch master updated: stm32f4: Enable prefetch for F405/F407/415/417

This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new e71fb46ef stm32f4: Enable prefetch for F405/F407/415/417
e71fb46ef is described below

commit e71fb46ef10d7cdb3812211c93d4b59f80aa6545
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Fri Sep 16 22:34:38 2022 +0200

    stm32f4: Enable prefetch for F405/F407/415/417
    
    Prefetch is not available only on Revision A.
    Prefetch was enabled only for Revision Z.
    Now revisions 1,2,4,Y also can have prefetch enabled.
---
 hw/mcu/stm/stm32f4xx/src/clock_stm32f4xx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/mcu/stm/stm32f4xx/src/clock_stm32f4xx.c b/hw/mcu/stm/stm32f4xx/src/clock_stm32f4xx.c
index e3602cf11..87d47a673 100644
--- a/hw/mcu/stm/stm32f4xx/src/clock_stm32f4xx.c
+++ b/hw/mcu/stm/stm32f4xx/src/clock_stm32f4xx.c
@@ -275,8 +275,8 @@ SystemClock_Config(void)
 #if PREFETCH_ENABLE
 #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || \
     defined(STM32F417xx)
-    /* RevA (prefetch must be off) or RevZ (prefetch can be on/off) */
-    if (HAL_GetREVID() == 0x1001) {
+    /* RevA (prefetch must be off see errata ES0182) */
+    if (HAL_GetREVID() != 0x1000) {
         __HAL_FLASH_PREFETCH_BUFFER_ENABLE();
     }
 #else