PEController BSP v4
Board Support Package for PEController from Taraz Technologies
 
Loading...
Searching...
No Matches
flash_sector_config_t Struct Reference

Defines the flash sectors for configuring storage. More...

Public Attributes

uint32_t sectorNo
 
uint32_t index
 
uint32_t byteCount
 
uint32_t bank
 
uint32_t * addr
 

Detailed Description

//Sample Definition (Should be kept same for the same controller and memory configuration)
storageConfig.sectors[0].sectorNo = FLASH_SECTOR_TOTAL - 2;
storageConfig.sectors[1].sectorNo = FLASH_SECTOR_TOTAL - 1;
for (int i = 0; i < 2; i++)
{
storageConfig.sectors[i].bank = FLASH_BANK_1;
storageConfig.sectors[i].byteCount = FLASH_SECTOR_SIZE;
storageConfig.sectors[i].addr = (uint32_t*)(FLASH_BANK1_BASE + (storageConfig.sectors[i].sectorNo * FLASH_SECTOR_SIZE));
}

Member Data Documentation

◆ addr

uint32_t* flash_sector_config_t::addr

Sector start address

◆ bank

uint32_t flash_sector_config_t::bank

Flash Bank

◆ byteCount

uint32_t flash_sector_config_t::byteCount

No of bytes in a sector

◆ index

uint32_t flash_sector_config_t::index

Sector index in the flash bank

◆ sectorNo

uint32_t flash_sector_config_t::sectorNo

Sector number