Page 1 of 1

SAMA5D2 first time boot after board assembly

Posted: Mon Feb 12, 2018 6:06 am
by bmpenrod
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?

Re: SAMA5D2 first time boot after board assembly

Posted: Mon Feb 12, 2018 12:22 pm
by nferre
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

Re: SAMA5D2 first time boot after board assembly

Posted: Mon Feb 12, 2018 10:50 pm
by bmpenrod
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.

Re: SAMA5D2 first time boot after board assembly

Posted: Mon Feb 12, 2018 11:26 pm
by bmpenrod
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?

Re: SAMA5D2 first time boot after board assembly

Posted: Mon Feb 12, 2018 11:39 pm
by thackerp
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.

Re: SAMA5D2 first time boot after board assembly

Posted: Mon Feb 12, 2018 11:52 pm
by bmpenrod
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.