mirror of
https://gitee.com/Vancouver2017/luban-lite-t3e-pro.git
synced 2025-12-14 02:18:54 +00:00
V1.0.5
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
MEMORY
|
||||
{
|
||||
/* The last 256KB for bootloader */
|
||||
SRAM_SW : ORIGIN = 0x30100100, LENGTH = 0x40000
|
||||
SRAM_SW : ORIGIN = (0x30040100 + (AIC_SRAM_TOTAL_SIZE - AIC_BOOTLOADER_RESERVE_SIZE)), LENGTH = AIC_BOOTLOADER_RESERVE_SIZE
|
||||
PSRAM : ORIGIN = 0x40000000, LENGTH = AIC_PSRAM_SIZE
|
||||
}
|
||||
|
||||
|
||||
@@ -79,6 +79,28 @@ s32 nor_fwc_prepare(struct fwc_info *fwc, u32 id)
|
||||
return -1;
|
||||
}
|
||||
|
||||
// reset statuts register0 as 0x0 default
|
||||
uint8_t result;
|
||||
uint8_t val = 0x0;
|
||||
uint8_t reg = 0x5;
|
||||
result = sfud_read_reg(flash, reg, &val);
|
||||
if (result == SFUD_SUCCESS) {
|
||||
printf("Read status register0 1, val: %u.\n", val);
|
||||
} else {
|
||||
printf("Read status register0 1 failed.\n");
|
||||
}
|
||||
uint8_t *default_0 = 0x0;
|
||||
result = sfud_write_reg(flash, 0x1, default_0);
|
||||
if (result == SFUD_SUCCESS) {
|
||||
printf("Write status register0 0 success.\n");
|
||||
} else {
|
||||
printf("Write status register0 failed.\n");
|
||||
}
|
||||
result = sfud_read_reg(flash, 0x5, &val);
|
||||
if (result == SFUD_SUCCESS) {
|
||||
printf("Read status register0 2, val: %u.\n\n", val);
|
||||
}
|
||||
|
||||
#ifdef AIC_SPIENC_BYPASS_IN_UPGMODE
|
||||
spienc_set_bypass(1);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user