mirror of https://github.com/ARMmbed/mbed-os.git
[Nuvoton] Fix page size in flash IAP
In Mbed OS, page size is program unit, which is different than FMC definition. After fixing page size, we can pass NVSTORE test (mbed-os-features-nvstore-tests-nvstore-functionality).pull/6437/head
parent
816890d646
commit
f0865f8546
|
@ -65,7 +65,8 @@ static const sector_info_t sectors_info[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const flash_target_config_t flash_target_config = {
|
static const flash_target_config_t flash_target_config = {
|
||||||
.page_size = 0x800, // 2 KB
|
.page_size = 4, // 4 bytes
|
||||||
|
// Here page_size is program unit, which is different than FMC definition.
|
||||||
.flash_start = 0x0,
|
.flash_start = 0x0,
|
||||||
.flash_size = 0x40000, // 256 KB
|
.flash_size = 0x40000, // 256 KB
|
||||||
.sectors = sectors_info,
|
.sectors = sectors_info,
|
||||||
|
|
|
@ -69,7 +69,8 @@ static const sector_info_t sectors_info[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const flash_target_config_t flash_target_config = {
|
static const flash_target_config_t flash_target_config = {
|
||||||
.page_size = 0x200, // 512 bytes
|
.page_size = 4, // 4 bytes
|
||||||
|
// Here page_size is program unit, which is different than FMC definition.
|
||||||
.flash_start = 0x0,
|
.flash_start = 0x0,
|
||||||
.flash_size = 0x80000, // 512 KB
|
.flash_size = 0x80000, // 512 KB
|
||||||
.sectors = sectors_info,
|
.sectors = sectors_info,
|
||||||
|
|
|
@ -67,7 +67,8 @@ static const sector_info_t sectors_info[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static const flash_target_config_t flash_target_config = {
|
static const flash_target_config_t flash_target_config = {
|
||||||
.page_size = 0x800, // 2 KB
|
.page_size = 4, // 4 bytes
|
||||||
|
// Here page_size is program unit, which is different than FMC definition.
|
||||||
.flash_start = 0x0,
|
.flash_start = 0x0,
|
||||||
.flash_size = 0x80000, // 512 KB
|
.flash_size = 0x80000, // 512 KB
|
||||||
.sectors = sectors_info,
|
.sectors = sectors_info,
|
||||||
|
|
Loading…
Reference in New Issue