Skip to content

Commit 84b4841

Browse files
committed
STM32: enable QSPI test with MX25LM51245G octo SPI
1 parent 91464b2 commit 84b4841

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

TESTS/mbed_hal/qspi/flash_configs/MX25LM51245G_config.h

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
#define QSPI_PAGE_SIZE 256 // 256B
5656
#define QSPI_SECTOR_SIZE 4096 // 4kB
57-
#define QSPI_SECTOR_COUNT 2048
57+
#define QSPI_SECTOR_COUNT 131072 // 512MB / QSPI_SECTOR_SIZE
5858

5959
// Commands for reading
6060
// Only single/octal mode supported with this memory
@@ -67,7 +67,7 @@
6767

6868
// Commands for erasing
6969
#define QSPI_CMD_ERASE_SECTOR 0x20 // 4kB
70-
//#define QSPI_CMD_ERASE_BLOCK_32 // not supported, only ersae block 64
70+
//#define QSPI_CMD_ERASE_BLOCK_32 // not supported
7171
#define QSPI_CMD_ERASE_BLOCK_64 0xD8 // 64kB
7272
#define QSPI_CMD_ERASE_CHIP 0x60 // or 0xC7
7373

@@ -76,13 +76,13 @@
7676
#define QSPI_ERASE_BLOCK_64_MAX_TIME 2400000 // 2s
7777

7878
// max frequency for basic rw operation (for fast mode)
79-
#define QSPI_COMMON_MAX_FREQUENCY 1000000
79+
#define QSPI_COMMON_MAX_FREQUENCY 66000000
8080

81-
#define QSPI_STATUS_REG_SIZE 1 //2 ??
81+
#define QSPI_STATUS_REG_SIZE 1
8282
#define QSPI_CONFIG_REG_0_SIZE 1
83-
#define QSPI_CONFIG_REG_1_SIZE 1
83+
#define QSPI_CONFIG_REG_1_SIZE 12
8484
#define QSPI_SECURITY_REG_SIZE 1
85-
#define QSPI_MAX_REG_SIZE 2
85+
#define QSPI_MAX_REG_SIZE 12
8686

8787
// status register
8888
#define STATUS_BIT_WIP (1 << 0) // write in progress bit
@@ -91,11 +91,5 @@
9191
#define STATUS_BIT_BP1 (1 << 3) //
9292
#define STATUS_BIT_BP2 (1 << 4) //
9393
#define STATUS_BIT_BP3 (1 << 5) //
94-
//#define STATUS_BIT_QE (1 << 6) // Not supported
95-
//#define STATUS_BIT_SRWD (1 << 7) // Not supported
96-
97-
// configuration register 0
98-
// bit 0, 1, 2, 4, 5, 7 reserved
99-
#define CONFIG0_BIT_TB (1 << 3) // Top/Bottom area protect
10094

10195
#endif // MBED_QSPI_FLASH_MX25LM51245G_H

components/storage/blockdevice/COMPONENT_QSPIF/mbed_lib.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
"MX25L51245G": {
2020
"QSPI_FREQ": "8000000"
2121
},
22+
"MX25LM51245G": {
23+
"QSPI_FREQ": "66000000"
24+
},
2225
"N25Q128A": {
2326
"QSPI_FREQ": "80000000"
2427
},

targets/targets.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12014,7 +12014,8 @@
1201412014
"core": "Cortex-M4F",
1201512015
"extra_labels_add": [
1201612016
"STM32L4",
12017-
"STM32L4R9xI"
12017+
"STM32L4R9xI",
12018+
"MX25LM51245G"
1201812019
],
1201912020
"config": {
1202012021
"clock_source": {

0 commit comments

Comments
 (0)