How to verify Flash programming if Boot ROM is mapped to address 0?

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

How to verify Flash programming if Boot ROM is mapped to address 0?

1,054 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by giusloq on Mon Dec 14 02:04:42 MST 2015
I'm trying to create a DOS script that programs and verifies Flash memory of LPC1778 device. I'm using J-Link debugger probe that includes a simple command-line application that writes and reads memory of the connected device.

The verify process failed immediately at address 0. I think because I verify starting from address 0, but after reset Boot ROM (or a part of it) is mapped to address 0. If I understood correcly, the size of the Boot ROM remapped to address 0 after reset is 0x3FF (1024 bytes).

First question: does this mean the user application code can't use those first 1024 bytes?

Second question: how to implement a correct verify procedure? In this scenario, I think I need to verify starting from address 0x400, ignoring address range 0x000-0x3FF. Correct?
标签 (1)
0 项奖励
回复
1 回复

981 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MikeSimmonds on Mon Dec 14 08:34:30 MST 2015
See section 38.8 in the UM (rev 3.1)

Your verification process should write a 1 to the MEMMAP register at 0x400FC040 before reading the lower part of flash for compare.
NB: use a word access.
Do it anyway, it can't do any harm.

ISTR that only 128 bytes are overlayed, but that is mostly irrelevant as any amount will cause a mismatch.

You can't move you code higher as your app's vectors MUST be placed at 0 for correct operation (and Boot ROM's valid code check).

Cheers, Mike.
0 项奖励
回复