You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ut...@apache.org on 2020/01/30 13:16:38 UTC

[mynewt-core] branch master updated: Fix stm32f3discovery flash programming

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

utzig 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 c264c36  Fix stm32f3discovery flash programming
c264c36 is described below

commit c264c36edf1fbff684b54be9230b3235fbf72fcb
Author: Fabio Utzig <ut...@apache.org>
AuthorDate: Thu Jan 30 08:29:51 2020 -0300

    Fix stm32f3discovery flash programming
    
    Fixes two issues:
    
    1) Flash size was declared with the wrong size; since the bsp partitions
       where declared inside the valid flash size this fix is only for
       correctness.
    2) Re-enable HSI clock. The flash programming interface on the F3 family
       is directly connected to the HSI clock generator, so without it
       enabled, trying to run any app that requires flash programming (eg
       slinky) would result in a hardfault.
    
    Signed-off-by: Fabio Utzig <ut...@apache.org>
---
 hw/bsp/stm32f3discovery/syscfg.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/bsp/stm32f3discovery/syscfg.yml b/hw/bsp/stm32f3discovery/syscfg.yml
index 3e1f35b..5c2ab97 100644
--- a/hw/bsp/stm32f3discovery/syscfg.yml
+++ b/hw/bsp/stm32f3discovery/syscfg.yml
@@ -20,7 +20,7 @@
 syscfg.defs:
     STM32_FLASH_SIZE_KB:
         description: 'Total flash size in KB.'
-        value: 1024
+        value: 256
 
     UART_0:
         description: 'Whether to enable UART0'
@@ -49,7 +49,7 @@ syscfg.vals:
     BOOT_SERIAL_DETECT_PIN: 0  # USER button
     BOOT_SERIAL_DETECT_PIN_CFG: 'HAL_GPIO_PULL_NONE'
     BOOT_SERIAL_DETECT_PIN_VAL: 1
-    STM32_CLOCK_HSI: 0
+    STM32_CLOCK_HSI: 1
     STM32_CLOCK_HSE: 1
     STM32_CLOCK_HSE_BYPASS: 1
     STM32_CLOCK_PLL_MUL: 'RCC_PLL_MUL9'