SAMA5D2 first time boot after board assembly

Discussion around products based on ARM Cortex-A5 core.

Moderator: nferre

bmpenrod
Posts: 17
Joined: Wed Feb 07, 2018 9:39 pm

SAMA5D2 first time boot after board assembly

Mon Feb 12, 2018 6:06 am

From the SAMA5D2 datasheet, it looks like on initial boot it is necessary to override the factory fuse boot configuration register to boot from anything. It looks like at a minimum bit 18 must be set to a 1 to enable booting from external memory. Then more bits need to be set to restrict booting to specific memories and io groups. This must apparently be done from SAM-BA.

Do I understand this correctly? This seems sort of awkward in a production environment where pre-programmed flash is sitting on the board. Is there a reason why the default is not to attempt to boot from all possible memories, so programming of the fuse register may be done in the application code to customize the booting strategy for the specific design?
nferre
Site Admin
Posts: 176
Joined: Wed Feb 14, 2007 11:17 am

Re: SAMA5D2 first time boot after board assembly

Mon Feb 12, 2018 12:22 pm

Hi,

Yes you understand it correctly.
The sama5d2 product doesn't contain the fuse bit set to boot to external memories by default.
As you may know, the sama5d2 product has several "iosets" for a given external memory. Several pins can be used for the same mass storage interface (SD, NAND, SPI, etc.). We didn't want that, during the first boot on a customer's board that the probe of these interfaces would disturb some of the hardware connected to those pins.
So, yes, on a sama5d2 SoC from factory, the only access is SAM-BA boot monitor. Customer would then switch the SoC to secure mode or not, test the boot options on several "ioset" for each boot media available to adapt to the hardware. Then changes would be made permanent with the burning of the fuses.

On the boards that Microchip provide, this fuse bit is already burnt in production.

Best regards
bmpenrod
Posts: 17
Joined: Wed Feb 07, 2018 9:39 pm

Re: SAMA5D2 first time boot after board assembly

Mon Feb 12, 2018 10:50 pm

Hmmm. On my sama5d27-som1-ek board, I get this when querying the fuse boot configuration register:

>w,f804c060,#
0x00020000

I was expecting to see bit 18 set, but this is showing bit 17, which selects the JTAG ioset.

I'm confused.
bmpenrod
Posts: 17
Joined: Wed Feb 07, 2018 9:39 pm

Re: SAMA5D2 first time boot after board assembly

Mon Feb 12, 2018 11:26 pm

In studying the boot methodology for the sama5d2, I see reference to a set of 4 BUREG registers which will supposedly give the ability to test booting configurations prior to burning the fuse bits. Unfortunately, my search of the sama5d2 data sheet does not reveal where these registers are located...

Anybody know?
thackerp
Posts: 6
Joined: Tue Jul 19, 2016 10:19 pm

Re: SAMA5D2 first time boot after board assembly

Mon Feb 12, 2018 11:39 pm

See section 16.4.3 of the datasheet (DS60001476B-page 130). Also note that there differences in the boot sequence between MRLA/B and MRLC revisions.
bmpenrod
Posts: 17
Joined: Wed Feb 07, 2018 9:39 pm

Re: SAMA5D2 first time boot after board assembly

Mon Feb 12, 2018 11:52 pm

Thank you so much! I had an older version of the datasheet circa July 2016. The boot philosophy has been updated to attempt to boot from sd by default before going to samba. That's much more civilized, and explains the missing bit 18 in the fuse register on my board. It's not needed if you are using sd, which I will use for initial configuration in a product.

Return to “SAMA5D Cortex-A5 MPU”

Who is online

Users browsing this forum: No registered users and 1 guest