Page 1 of 1

sam3x custom bootloader

Posted: Wed Nov 02, 2016 10:18 pm
I am try to create a custom boot loader for the sam3x8e micro.

I am unclear about the memory allocation on this device. On page 31 Figure 7-1 of the data sheet it shows a boot memory section starting at address 0x00000000 and ending at 0x00080000. Does this mean I can use 512KB in this flash section for a custom boot loader?

Also, this micro has two flash banks. Does the user application have to be no larger then a single bank (256KB) or can the application use both banks as a contiguous single 512KB flash bank?

Re: sam3x custom bootloader

Posted: Fri Nov 04, 2016 6:52 pm
by tsvoipio
If it is an Arduino Due, please say so - we do not like to guess.

On your chip, there is flash from 0x00080000 to 0x000fffff, split into two banks:
bank 0 at 0x00080000
bank 1 at 0x000c0000

There is also a fixed-program ROM at 0x00100000.

The Ffash can be used as a single 512 kiB area, but the system writing the code to flash must be aware of the separate banks.

At boot-up at address 0x00000000 there is a mirror image of either
internal ROM,
flash bank 0, or
flash bank 1.

The memories are always seen at their home locations, but the start-up sequence uses initially the memory image at 0. As the first words of the start-up image have to contain an address to the start-up code, it is recommended to locate the code to the un-mirrord address of the relevant memory.