We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
The first 16 bytes in the boot ROM will contain the vector table for the boot ROM, with the reset vector pointing to the starting address of boot ROM program. During executing of the boot loader program, it will turn off the remap function at some stage, so that the user program in the flash will appear at the beginning of the memory map, and then execute the program in the flash memory if the flash memory has been programmed (this might also depends on other boot settings).Before switching to run the program in flash, the boot loader can read the vector table on the flash memory, and adjust the main stack pointer value accordingly. Then it can read the reset vector in the vector table and branch to this address. In this way, the initial main stack pointer value and starting program address will match the values you placed in the starting of the flash memory.This memory remap function is implemented in the bus system of the NXP LPC17xx. It is not inside the processor core, so you cannot find this information from ARM documentation.regards,Joseph
Hi Narke,Regarding (1):The flash memory in LPC17xx can be programmed using serial communication with some flash programming firmware (in the boot loader) running.See chapter 32 of User manual (http://www.nxp.com/d...ual/UM10360.pdf)An example method of using this flash programming mechanism is flash magic (http://www.flashmagictool.com/).The boot loader also check if the flash is programmed before running the program in flash. This is done by detecting a checksum. (See 32.3.1.1 of the LPC17xx User manual)Regarding (2): Yes, please see "32.4 Boot process flowchart" in the user manual, and section 32.3:"The flash boot loader code is executed every time the part is powered on or reset. Theloader can execute the ISP command handler or the user application code. A LOW levelafter reset at pin P2.10 is considered an external hardware request to start the ISPcommand handler."So when you design your circuit, make sure P2.10 is not low when it startup. (Best to put a jumper or DIP switch so you can control it for debug purpose.)regards,Joseph