Skip to content

Commit 4a99b3b

Browse files
authored
Merge pull request #4868 from 0xc0170/fix_ublox_nina_flash
STM32F437: remove flash api implementation
2 parents 0e1c20d + f200db3 commit 4a99b3b

File tree

3 files changed

+6
-186
lines changed

3 files changed

+6
-186
lines changed

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F437xG/device/flash_api.c

Lines changed: 0 additions & 184 deletions
This file was deleted.

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F437xG/device/flash_data.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535

3636
#if DEVICE_FLASH
3737

38+
#if defined (STM32F427xx) || defined (STM32F437xx)
39+
#define FLASH_SIZE (uint32_t) 0x100000
40+
#endif
41+
3842
/* Exported types ------------------------------------------------------------*/
3943
/* Exported constants --------------------------------------------------------*/
4044
/* Exported macro ------------------------------------------------------------*/
@@ -53,4 +57,4 @@
5357
#define ADDR_FLASH_SECTOR_11 ((uint32_t)0x080E0000) /* Base @ of Sector 11, 128 Kbytes */
5458

5559
#endif
56-
#endif
60+
#endif

targets/TARGET_STM/TARGET_STM32F4/flash_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ static uint32_t GetSector(uint32_t address)
151151
uint32_t sector = 0;
152152
uint32_t tmp = address - ADDR_FLASH_SECTOR_0;
153153
/* This function supports 1Mb and 2Mb flash sizes */
154-
#if defined(FLASH_SECTOR_12)
154+
#if defined(ADDR_FLASH_SECTOR_12)
155155
if (address & 0x100000) { // handle 2nd bank
156156
sector = FLASH_SECTOR_12;
157157
tmp = address - ADDR_FLASH_SECTOR_12;

0 commit comments

Comments
 (0)