Microchip® Advanced Software Framework

spi_flash_map.h File Reference

SPI Flash.

Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.

Macros

#define _PROGRAM_POWER_SAVE_
 
#define BT_IMAGE_PRESENT
 
#define FLASH_2M_TOTAL_SZ   (256 * 1024UL)
 
#define FLASH_4M_TOTAL_SZ   (512 * 1024UL)
 
#define FLASH_8M_TOTAL_SZ   (1024 * 1024UL)
 
#define FLASH_BLOCK_SIZE   (32 * 1024UL)
 
#define FLASH_COMMON_SZ
 
#define FLASH_PAGE_SZ   (256)
 
#define FLASH_SECTOR_SZ   (4 * 1024UL)
 
#define FLASH_START_ADDR   (0UL)
 
#define M2M_BACKUP_FLASH_OFFSET   (M2M_CONTROL_FLASH_OFFSET + M2M_CONTROL_FLASH_SZ)
 
#define M2M_BACKUP_FLASH_SZ   (FLASH_SECTOR_SZ * 1)
 
#define M2M_BOOT_FIRMWARE_FLASH_SZ   (FLASH_SECTOR_SZ * 1)
 
#define M2M_BOOT_FIRMWARE_STARTING_ADDR   (FLASH_START_ADDR)
 
#define M2M_BT_FIRMWARE_FLASH_OFFSET   (M2M_PS_FIRMWARE_FLASH_OFFSET + M2M_PS_FIRMWARE_FLASH_SZ)
 
#define M2M_BT_FIRMWARE_FLASH_SZ   (160 * 1024UL)
 
#define M2M_CACHED_CONNS_FLASH_OFFSET   (M2M_TLS_SERVER_FLASH_OFFSET + M2M_TLS_SERVER_FLASH_SZ)
 
#define M2M_CACHED_CONNS_FLASH_SIG
 
#define M2M_CACHED_CONNS_FLASH_SZ   (FLASH_SECTOR_SZ * 1)
 
#define M2M_CONFIG_SECT_TOTAL_SZ   (FLASH_SECTOR_SZ * 2)
 
#define M2M_CONTROL_FLASH_OFFSET   (M2M_BOOT_FIRMWARE_STARTING_ADDR + M2M_BOOT_FIRMWARE_FLASH_SZ)
 
#define M2M_CONTROL_FLASH_SZ   (FLASH_SECTOR_SZ * 1)
 
#define M2M_FIRMWARE_FLASH_OFFSET   (M2M_OTA_IMAGE1_OFFSET)
 
#define M2M_FIRMWARE_FLASH_SZ   (304 * 1024UL) /* downloader firmware and main firmware */
 
#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_HTTP_MEM_FLASH_OFFSET   (M2M_FIRMWARE_FLASH_OFFSET + M2M_FIRMWARE_FLASH_SZ)
 
#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_4M_TOTAL_SZ)
 OTA image 2 offset. More...
 
#define M2M_PLL_FLASH_OFFSET   (M2M_BACKUP_FLASH_OFFSET + M2M_BACKUP_FLASH_SZ)
 
#define M2M_PLL_FLASH_SZ   (1024 * 2)
 
#define M2M_PLL_FREQ_FLASH_OFFSET   (M2M_PLL_WIFI_CHAN_FLASH_OFFSET + M2M_PLL_WIFI_CHAN_FLASH_SZ)
 
#define M2M_PLL_FREQ_FLASH_SZ   ((1+84)*4)
 
#define M2M_PLL_MAGIC_NUMBER_FLASH_SZ   (2*4)
 
#define M2M_PLL_WIFI_CHAN_FLASH_OFFSET   (M2M_PLL_FLASH_OFFSET + M2M_PLL_MAGIC_NUMBER_FLASH_SZ)
 
#define M2M_PLL_WIFI_CHAN_FLASH_SZ   (14*8*4)
 
#define M2M_PROGRAM_FLASH_SZ   (8 * 1024UL) /* downloader firmware */
 
#define M2M_PS_FIRMWARE_FLASH_OFFSET   (M2M_HTTP_MEM_FLASH_OFFSET + M2M_HTTP_MEM_FLASH_SZ)
 
#define M2M_PS_FIRMWARE_FLASH_SZ   (FLASH_SECTOR_SZ * 0)
 
#define M2M_TLS_ROOTCER_FLASH_OFFSET   (M2M_PLL_FLASH_OFFSET + M2M_CONFIG_SECT_TOTAL_SZ)
 
#define M2M_TLS_ROOTCER_FLASH_SIG   {0x01,0xF1,0x02,0xF2,0x03,0xF3,0x04,0xF4,0x05,0xF5,0x06,0xF6,0x07,0xF7,0x08,0xF8}
 
#define M2M_TLS_ROOTCER_FLASH_SIG_LENGTH   16
 
#define M2M_TLS_ROOTCER_FLASH_SZ   (FLASH_SECTOR_SZ * 1)
 
#define M2M_TLS_SERVER_FLASH_OFFSET   (M2M_TLS_ROOTCER_FLASH_OFFSET + M2M_TLS_ROOTCER_FLASH_SZ)
 
#define M2M_TLS_SERVER_FLASH_SIG
 
#define M2M_TLS_SERVER_FLASH_SZ   (FLASH_SECTOR_SZ * 2)
 
#define OTA_IMAGE_SIZE
 

#define _PROGRAM_POWER_SAVE_
#define BT_IMAGE_PRESENT
#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

Referenced by spi_flash_read().

#define FLASH_COMMON_SZ
Value:
(\
#define M2M_CACHED_CONNS_FLASH_SZ
Definition: spi_flash_map.h:155
#define M2M_TLS_SERVER_FLASH_SZ
Definition: spi_flash_map.h:148
#define M2M_CONFIG_SECT_TOTAL_SZ
Definition: spi_flash_map.h:132
#define M2M_BOOT_FIRMWARE_FLASH_SZ
Definition: spi_flash_map.h:106
#define M2M_CONTROL_FLASH_SZ
Definition: spi_flash_map.h:112
#define M2M_TLS_ROOTCER_FLASH_SZ
Definition: spi_flash_map.h:138
#define M2M_BACKUP_FLASH_SZ
Definition: spi_flash_map.h:118
#define FLASH_PAGE_SZ   (256)

Page Size in Flash Memory

Referenced by spi_flash_erase(), and spi_flash_write().

#define FLASH_SECTOR_SZ   (4 * 1024UL)

Sector Size in Flash Memory

Referenced by m2m_flash_erase_sector().

#define FLASH_START_ADDR   (0UL)

Starting Address of Flash Memory

#define M2M_BACKUP_FLASH_OFFSET   (M2M_CONTROL_FLASH_OFFSET + M2M_CONTROL_FLASH_SZ)
#define M2M_BACKUP_FLASH_SZ   (FLASH_SECTOR_SZ * 1)
#define M2M_BOOT_FIRMWARE_FLASH_SZ   (FLASH_SECTOR_SZ * 1)
#define M2M_BOOT_FIRMWARE_STARTING_ADDR   (FLASH_START_ADDR)
#define M2M_BT_FIRMWARE_FLASH_OFFSET   (M2M_PS_FIRMWARE_FLASH_OFFSET + M2M_PS_FIRMWARE_FLASH_SZ)
#define M2M_BT_FIRMWARE_FLASH_SZ   (160 * 1024UL)
#define M2M_CACHED_CONNS_FLASH_OFFSET   (M2M_TLS_SERVER_FLASH_OFFSET + M2M_TLS_SERVER_FLASH_SZ)
#define M2M_CACHED_CONNS_FLASH_SIG
#define M2M_CACHED_CONNS_FLASH_SZ   (FLASH_SECTOR_SZ * 1)
#define M2M_CONFIG_SECT_TOTAL_SZ   (FLASH_SECTOR_SZ * 2)
#define M2M_CONTROL_FLASH_SZ   (FLASH_SECTOR_SZ * 1)
#define M2M_FIRMWARE_FLASH_OFFSET   (M2M_OTA_IMAGE1_OFFSET)
#define M2M_FIRMWARE_FLASH_SZ   (304 * 1024UL) /* downloader firmware and main firmware */
#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_HTTP_MEM_FLASH_OFFSET   (M2M_FIRMWARE_FLASH_OFFSET + M2M_FIRMWARE_FLASH_SZ)

Referenced by find_flash_section().

#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)

Referenced by find_flash_section().

#define M2M_OTA_IMAGE2_OFFSET   (FLASH_4M_TOTAL_SZ)

OTA image 2 offset.

#define M2M_PLL_FLASH_OFFSET   (M2M_BACKUP_FLASH_OFFSET + M2M_BACKUP_FLASH_SZ)
#define M2M_PLL_FLASH_SZ   (1024 * 2)
#define M2M_PLL_FREQ_FLASH_OFFSET   (M2M_PLL_WIFI_CHAN_FLASH_OFFSET + M2M_PLL_WIFI_CHAN_FLASH_SZ)
#define M2M_PLL_FREQ_FLASH_SZ   ((1+84)*4)
#define M2M_PLL_MAGIC_NUMBER_FLASH_SZ   (2*4)
#define M2M_PLL_WIFI_CHAN_FLASH_OFFSET   (M2M_PLL_FLASH_OFFSET + M2M_PLL_MAGIC_NUMBER_FLASH_SZ)
#define M2M_PLL_WIFI_CHAN_FLASH_SZ   (14*8*4)
#define M2M_PROGRAM_FLASH_SZ   (8 * 1024UL) /* downloader firmware */
#define M2M_PS_FIRMWARE_FLASH_OFFSET   (M2M_HTTP_MEM_FLASH_OFFSET + M2M_HTTP_MEM_FLASH_SZ)
#define M2M_PS_FIRMWARE_FLASH_SZ   (FLASH_SECTOR_SZ * 0)
#define M2M_TLS_ROOTCER_FLASH_OFFSET   (M2M_PLL_FLASH_OFFSET + M2M_CONFIG_SECT_TOTAL_SZ)
#define M2M_TLS_ROOTCER_FLASH_SIG   {0x01,0xF1,0x02,0xF2,0x03,0xF3,0x04,0xF4,0x05,0xF5,0x06,0xF6,0x07,0xF7,0x08,0xF8}
#define M2M_TLS_ROOTCER_FLASH_SIG_LENGTH   16
#define M2M_TLS_ROOTCER_FLASH_SZ   (FLASH_SECTOR_SZ * 1)
#define M2M_TLS_SERVER_FLASH_OFFSET   (M2M_TLS_ROOTCER_FLASH_OFFSET + M2M_TLS_ROOTCER_FLASH_SZ)
#define M2M_TLS_SERVER_FLASH_SIG
#define M2M_TLS_SERVER_FLASH_SZ   (FLASH_SECTOR_SZ * 2)
#define OTA_IMAGE_SIZE
Value:
(\
#define M2M_PS_FIRMWARE_FLASH_SZ
Definition: spi_flash_map.h:218
#define M2M_FIRMWARE_FLASH_SZ
Definition: spi_flash_map.h:206
#define M2M_BT_FIRMWARE_FLASH_SZ
Definition: spi_flash_map.h:225
#define M2M_HTTP_MEM_FLASH_SZ
Definition: spi_flash_map.h:212