Skip to content

Commit b3d6e28

Browse files
adustm0xc0170
authored andcommitted
Support maximum flash size : 4Gbytes
1 parent b6e1fc1 commit b3d6e28

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)