Skip to content

Commit 9aa6d21

Browse files
committed
Add some definitions for when F412 can be implemented
1 parent 5a2f820 commit 9aa6d21

3 files changed

Lines changed: 26 additions & 1 deletion

File tree

ports/stm32f4/boards/stm32f412zg_discovery/mpconfigboard.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@
3434
#define FLASH_PAGE_SIZE (0x4000)
3535

3636
#define AUTORESET_DELAY_MS 500
37-
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000)
37+
#define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000)
38+

ports/stm32f4/boards/stm32f412zg_discovery/mpconfigboard.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ USB_MANUFACTURER = "STMicroelectronics"
66
INTERNAL_FLASH_FILESYSTEM = 1
77
LONGINT_IMPL = NONE
88

9+
# QSPI_FLASH_FILESYSTEM = 1
10+
# EXTERNAL_FLASH_DEVICE_COUNT = 1
11+
# EXTERNAL_FLASH_DEVICES = N25Q128A
12+
# LONGINT_IMPL = MPZ
13+
914
MCU_SERIES = m4
1015
MCU_VARIANT = stm32f4
1116
MCU_SUB_VARIANT = stm32f412zx

supervisor/shared/external_flash/devices.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,4 +442,23 @@ typedef struct {
442442
.write_status_register_split = false, \
443443
.single_status_byte = false, \
444444
}
445+
446+
// Settings for the Micron N25Q128A 16MiB SPI flash.
447+
// Datasheet: https://www.micron.com/-/media/client/global/documents/products/data-sheet/nor-flash/serial-nor/n25q/n25q_128mb_3v_65nm.pdf
448+
#define N25Q128A {\
449+
.total_size = (1 << 24), /* 16 MiB */ \
450+
.start_up_time_us = 5000, \
451+
.manufacturer_id = 0x20, \
452+
.memory_type = 0xBA, \
453+
.capacity = 0x18, \
454+
.max_clock_speed_mhz = 108, \
455+
.quad_enable_bit_mask = 0x00, \
456+
.has_sector_protection = false, \ /*maybe?*/
457+
.supports_fast_read = true, \
458+
.supports_qspi = true, \
459+
.supports_qspi_writes = true, \
460+
.write_status_register_split = false, \
461+
.single_status_byte = false, \
462+
}
463+
445464
#endif // MICROPY_INCLUDED_ATMEL_SAMD_EXTERNAL_FLASH_DEVICES_H

0 commit comments

Comments
 (0)