[LPC5536] Is it possible to access flash below offset when using Dual Boot?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

[LPC5536] Is it possible to access flash below offset when using Dual Boot?

673 次查看
bvp
Contributor II

If the flash is divided into 2 block sizes of 0x1EE00 and the device boots to the 2nd block with an offset of 0x1EE00, is it possible to read the flash region below 0x1EE00 from within the program? From the example I tried reading a block at a lower flash address like so:

memcpy(readPage, 0x0, 512);
 
But because the offset is enabled, 0x0 starts at 0x1EE00. Is there any way around this to read/write to the lower region?
标签 (1)
0 项奖励
回复
1 回复

624 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

First of all, in dual image boot, the application code image can be put to different flash address, it is okay that the application code is put in the higher half flash space and executed, and you can access the lower half flash space.

Regarding the function memcpy(readPage, 0x0, 512); I suppose that the readPage destination address is absolute RAM address, when the source address is in lower half flash space(0x0), you will access the lower half flash space, when the source address is in higher half flash space(0x20000), you will access the higher half flash space.

Hope it can help you

BR

XiangJun Rong

 

0 项奖励
回复