Skip to content

Commit 67124c8

Browse files
adustmmaciejbocianski
authored andcommitted
Support maximum flash size : 4Gbytes
1 parent ed48e5e commit 67124c8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

targets/TARGET_STM/qspi_api.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
#include "pinmap.h"
3535
#include "PeripheralPins.h"
3636

37-
#define QSPI_FLASH_SIZE_DEFAULT 0x800000
37+
/* Max amount of flash size is 4Gbytes */
38+
/* hence 2^(31+1), then FLASH_SIZE_DEFAULT = 31<<20 */
39+
#define QSPI_FLASH_SIZE_DEFAULT 0x1F00000
3840

3941
void qspi_prepare_command(const qspi_command_t *command, QSPI_CommandTypeDef *st_command)
4042
{

0 commit comments

Comments
 (0)