You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2017/04/25 00:05:16 UTC

[1/2] incubator-mynewt-core git commit: stm32f4xx, erase flash should wait for complete

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/master 271ab1b9c -> ce47d8450


stm32f4xx, erase flash should wait for complete


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/cabdff91
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/cabdff91
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/cabdff91

Branch: refs/heads/master
Commit: cabdff917d4494d6bce6aabdace0533a44b3b2c8
Parents: 271ab1b
Author: wesley <we...@wolinke.com>
Authored: Sun Apr 23 12:39:55 2017 +0800
Committer: wesley <we...@wolinke.com>
Committed: Sun Apr 23 12:39:55 2017 +0800

----------------------------------------------------------------------
 hw/mcu/stm/stm32f4xx/src/hal_flash.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/cabdff91/hw/mcu/stm/stm32f4xx/src/hal_flash.c
----------------------------------------------------------------------
diff --git a/hw/mcu/stm/stm32f4xx/src/hal_flash.c b/hw/mcu/stm/stm32f4xx/src/hal_flash.c
index bc36a3b..2b18772 100644
--- a/hw/mcu/stm/stm32f4xx/src/hal_flash.c
+++ b/hw/mcu/stm/stm32f4xx/src/hal_flash.c
@@ -106,7 +106,16 @@ stm32f4_flash_write(const struct hal_flash *dev, uint32_t address,
 static void
 stm32f4_flash_erase_sector_id(int sector_id)
 {
-    FLASH_Erase_Sector(sector_id, FLASH_VOLTAGE_RANGE_1);
+    FLASH_EraseInitTypeDef eraseinit;
+    uint32_t SectorError;
+    
+    eraseinit.TypeErase = FLASH_TYPEERASE_SECTORS;
+    eraseinit.Banks = 0;
+    eraseinit.Sector = sector_id;
+    eraseinit.NbSectors = 1;
+    eraseinit.VoltageRange = FLASH_VOLTAGE_RANGE_1; 
+
+    HAL_FLASHEx_Erase(&eraseinit, &SectorError);
 }
 
 static int


[2/2] incubator-mynewt-core git commit: This closes #244.

Posted by ma...@apache.org.
This closes #244.

Merge branch 'dev_20170423' of https://github.com/wesley-wu/incubator-mynewt-core


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/ce47d845
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/ce47d845
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/ce47d845

Branch: refs/heads/master
Commit: ce47d8450b153a2ac062534a7857b26192032f8a
Parents: 271ab1b cabdff9
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Mon Apr 24 17:04:43 2017 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Apr 24 17:04:43 2017 -0700

----------------------------------------------------------------------
 hw/mcu/stm/stm32f4xx/src/hal_flash.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------