0
votes

Hi I’m newbie to ARM and am using a SAM3S4A ARM processor, with the IAR compiler.

Understanding that the flash code is from 0x00400000 – 0x0043FFFF and that the processor start at address zero (0x00000000), how does the PC jump to 0x00400000 as the VTOR register is zero at default.

1
Well, the memory map in the datasheet shows 0x00000000 - 0x003fffff as "boot memory", and section 8.1.4 ("Boot Strategies") outlines the point of that. Are you after clarification of what the docs say? - Notlikethat
What i'd like to do is change the application start address located at 0x00000004 in run time to a new value and then reset the processor. This is for a bootloader I'm implementing. The issue is, how do I write a new value and save it to the secure register 0x00000004? - IanDD

1 Answers

0
votes

From what I could understand from the document, ARM proc goes to 0x0 on reset. The 4K address space at 0x00000000 can be mapped to either ROM or FLASH using GPNVM register. So at reset ARM starts executing code either from ROM or FLASH. (ROM contains some proprietary bootloader and you can have your own OS/Bootloader at Flash). Once control reaches the code you have written to flash, you can setup a new Vector Table and update VTOR so that new exceptions are routed there.