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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

695 Views
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?
Labels (1)
0 Kudos
Reply
1 Reply

646 Views
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 Kudos
Reply