WINC1500 SPI Flash.
Copyright (c) 2016-2018 Microchip Technology Inc. and its subsidiaries.
#define _PROGRAM_POWER_SAVE_ |
#define FLASH_2M_TOTAL_SZ (256 * 1024UL) |
Total Size of 2M Flash Memory
#define FLASH_4M_TOTAL_SZ (512 * 1024UL) |
Total Size of 4M Flash Memory
#define FLASH_8M_TOTAL_SZ (1024 * 1024UL) |
Total Size of 8M Flash Memory
#define FLASH_BLOCK_SIZE (32 * 1024UL) |
Block Size in Flash Memory
#define FLASH_IMAGE1_CONTENT_SZ (M2M_COMMON_DATA_SEC + OTA_IMAGE_SIZE) |
Flash Total size.
#define FLASH_MAP_VER_0 (0) |
#define FLASH_MAP_VER_1 (1) |
#define FLASH_MAP_VER_2 (2) |
#define FLASH_MAP_VER_3 (3) |
#define FLASH_MAP_VER_4 (4) |
#define FLASH_MAP_VERSION FLASH_MAP_VER_4 |
#define FLASH_PAGE_SZ (256) |
Page Size in Flash Memory
#define FLASH_SECTOR_SZ (4 * 1024UL) |
Sector Size in Flash Memory
#define FLASH_START_ADDR (0UL) |
Starting Address of Flash Memory
#define HTTP_FLASH_SECTION_MAGIC 0xB00B1500 |
Magic value to differentiate between old HTTP flash section format and newer formats.
The lowest byte is ignored when checking the value as it contains the version number (it should always be 00 here, image_builder will set this value in flash).
#define HTTP_FLASH_SECTION_VERSION 2 |
#define M2M_BOOT_FIRMWARE_FLASH_SZ (FLASH_SECTOR_SZ) |
#define M2M_BOOT_FIRMWARE_STARTING_ADDR (FLASH_START_ADDR) |
#define M2M_CACHED_CONNS_FLASH_OFFSET (M2M_HTTP_MEM_FLASH_OFFSET + M2M_HTTP_MEM_FLASH_SZ) |
#define M2M_CACHED_CONNS_FLASH_SZ (FLASH_SECTOR_SZ * 1) |
#define M2M_COMMON_DATA_SEC |
#define M2M_CONFIG_SECT_TOTAL_SZ (FLASH_SECTOR_SZ) |
#define M2M_CONTROL_FLASH_BKP_OFFSET (M2M_CONTROL_FLASH_OFFSET + FLASH_SECTOR_SZ) |
#define M2M_CONTROL_FLASH_OFFSET (M2M_BOOT_FIRMWARE_STARTING_ADDR + M2M_BOOT_FIRMWARE_FLASH_SZ) |
#define M2M_CONTROL_FLASH_SEC_SZ (FLASH_SECTOR_SZ) |
#define M2M_CONTROL_FLASH_TOTAL_SZ (FLASH_SECTOR_SZ * 2) |
#define M2M_FIRMWARE_FLASH_OFFSET (M2M_OTA_IMAGE1_OFFSET) |
#define M2M_FIRMWARE_FLASH_SZ (236 * 1024UL) |
#define M2M_GAIN_FLASH_OFFSET (M2M_PLL_FLASH_OFFSET + M2M_PLL_FLASH_SZ) |
#define M2M_GAIN_FLASH_SZ (M2M_CONFIG_SECT_TOTAL_SZ - M2M_PLL_FLASH_SZ) |
#define M2M_HFD_8M_MEM_FLASH_OFFSET (M2M_OTA_IMAGE2_OFFSET + OTA_IMAGE_SIZE) |
#define M2M_HTTP_MEM_FLASH_OFFSET (M2M_TLS_SERVER_FLASH_OFFSET + M2M_TLS_SERVER_FLASH_SIZE) |
#define M2M_HTTP_MEM_FLASH_SZ (FLASH_SECTOR_SZ * 2) |
#define M2M_OTA_IMAGE1_OFFSET (M2M_CACHED_CONNS_FLASH_OFFSET + M2M_CACHED_CONNS_FLASH_SZ) |
#define M2M_OTA_IMAGE2_OFFSET (FLASH_IMAGE1_CONTENT_SZ) |
OTA image 2 offset.
#define M2M_PLL_FLASH_OFFSET (M2M_CONTROL_FLASH_OFFSET + M2M_CONTROL_FLASH_TOTAL_SZ) |
#define M2M_PLL_FLASH_SZ (1024 * 1) |
#define M2M_TLS_ROOTCER_FLASH_OFFSET (M2M_PLL_FLASH_OFFSET + M2M_CONFIG_SECT_TOTAL_SZ) |
#define M2M_TLS_ROOTCER_FLASH_SIZE (FLASH_SECTOR_SZ * 1) |
Referenced by UpdateRootList(), and WriteRootCertificate().
#define M2M_TLS_SERVER_FLASH_OFFSET (M2M_TLS_ROOTCER_FLASH_OFFSET + M2M_TLS_ROOTCER_FLASH_SIZE) |
#define M2M_TLS_SERVER_FLASH_SIZE (FLASH_SECTOR_SZ * 2) |
Referenced by TlsSrvSecWriteCertChain(), and WriteTlsCertificate().
#define OTA_IMAGE_SIZE (M2M_FIRMWARE_FLASH_SZ) |
OTA image Size.