-1

In ARM7,when processor is reset,it starts executing code from 0x00000000 address on reset but in lpc214x,ARM7 based soc ,on reset boot loader is executed whose starting address for lpc2148 is 0x7FFFD000 so how this starting address is loaded to pc while reset.and then how pc will be loaded with 0x00 address?

in below picture, memory map of lpc2148 is given.

neev
  • 11
  • 1
    Does it really boot at 0x7FFFD000 ? I'm pretty sure it does boot at 0. Usually these chips have a special pin that will make the CPU start at the bootloader address if held low. It seems to be pin P0.14 in your case. – ElderBug Apr 26 '16 at 12:25
  • yes you are right but what procedure is done when p0.14 is held low so that pc get loaded with 0x7FFFD000 instead of 0x00? – neev Apr 27 '16 at 12:30
  • Nothing really fancy I guess. The chip is probably hard-wired to load 0x7FFFD000 instead of 0 when P0.14 is low. – ElderBug Apr 27 '16 at 12:57
  • means memory controller will remap boot loader memory to 0x00 address when p0.14 is held low while reset?it is? – neev Apr 27 '16 at 13:03
  • and one more thing is that is it depended to SOC design and it is having nothing to do with arm7tdmi processor core? – neev Apr 27 '16 at 13:04
  • I don't think it involves memory mapping (0x7FFFD000 is already a remapping). It is probably really simple. On boot, PC will be set to 0 on normal circumstances, but when P0.14 is low, it is set to 0x7FFFD000. I don't know how it is implemented, but it is probably at the transistor level, so there is nothing more to it than "it does that because it's wired that way". And yes, this depends on SOC design. On-chip fixed bootloader is a special function, and to my knowledge it's not specified by ARM. – ElderBug Apr 27 '16 at 13:20

1 Answers1

1

it is not our job to read datasheets and users manuals for you.

If you notice in the memory map for that family of parts the flash starts at 0x00000000. 0x7FFFD000 says it is a boot block that is remapped from the internal flash. it is a window into the internal flash.

Then if you continue to read about the boot block in its section, then memory mapping in the section after and then the memory mapping control you see that for normal user mode there is no remapping, for bootloader mode there is.

Also the manual describes that the user vector table needs to have a checksum that adds up to zero. the bootloader boots first (thus the remapping on reset), if it finds a user flash by checking the vector table, and no other straps to change the boot option, then it remaps and executes the user code.

All right there in the manual.

old_timer
  • 69,149
  • 8
  • 89
  • 168
  • thank for answering and the question was regarding datasheet or user manual and if you do not like to read those thing for me,its totally fine then you should not have given answer as i did not ask the question personally to you. – neev Apr 27 '16 at 12:27
  • you should have read the manual before asking the question here. SO is for programming problems, here is my code, it doesnt work, I think it should, can you help me...This question should get closed as off topic... – old_timer Apr 27 '16 at 13:59
  • i have read manual but my question was like what will internally happen inside lpc2148 so that instead of going to 0x00 it will start executing code from 0x7FFFD000 when p0.14 is held to 0 which is not described in manual so can you let me know how memory remapping is done when lpc2148 is reset and p0.14 is held 0,and who is responsible for doing that? – neev Apr 28 '16 at 06:26
  • and yea the way of asking question might be wrong by me.so i will consider your suggestions. – neev Apr 28 '16 at 06:28