File tree Expand file tree Collapse file tree
ports/stm32f4/boards/stm32f412zg_discovery
supervisor/shared/external_flash Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+
Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ USB_MANUFACTURER = "STMicroelectronics"
66INTERNAL_FLASH_FILESYSTEM = 1
77LONGINT_IMPL = NONE
88
9+ # QSPI_FLASH_FILESYSTEM = 1
10+ # EXTERNAL_FLASH_DEVICE_COUNT = 1
11+ # EXTERNAL_FLASH_DEVICES = N25Q128A
12+ # LONGINT_IMPL = MPZ
13+
914MCU_SERIES = m4
1015MCU_VARIANT = stm32f4
1116MCU_SUB_VARIANT = stm32f412zx
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments