Sections
You are here: Home Forum Development Discussion SAM-BA boot loading process - is this still valid info ?

SAM-BA boot loading process - is this still valid info ?

Up to Development Discussion

SAM-BA boot loading process - is this still valid info ?

Posted by eapolo at September 01. 2008

I have taken the snippet below in an old forum gmane.comp.hardware.arm.at91sam and wonders if the info is valid? Or it does not apply to our AT91SAM7X256 and is not replaced with just that TST pin pulled high?  Please add comments as what also changed.


Date: 2006-12-05 17:49:49 GMT (1 year, 38 weeks, 5 days, 2 hours and 6 minutes ago)

I have used the SAM-BA bootloader option on several occasions.  The instructions you reference (USB pull up on PIO16, PIO0,1,2 being pulled high, etc) are correct. I don't know if it is possible to get the SAM7S parts in volume with the bootloader already in flash.
The general process that needs to happen is the SAM-BA bootloader needs to be copied from ROM to flash, then you restart with that bootloader and download.  To copy/restore the bootloader you:
- power off the chip (sam7s)
- pull PIO 0,1,2 high and pull TST high
- power-on the chip
- leave the chip on for at least 10 seconds
- power down the chip
- pull TST low, PIO 0,1,2 return to normal state
- power on chip and connect to PC/SAM-BA application using USB or RS-232
- Once you download your bin to the flash on the part, it overwrites the SAM-BA bootloader (it copies to and then executes out of RAM for this).  This requires that you re-copy the bootloader back to flash for the bootloader to work again
- PIO16 as the USB pull-up is only needed if using the bootloader via USB
- PIO13 AT91SAM7S-EK is connected to VBUS_DET (the USB 5V supply detection).&n bsp; I don't know if this is needed for proper operation (it is not specified as needed in the SAM-BA documentation, but I have not tried it without it)
- The USB download with the bootloader requires that PIO16 be connected so that it can control the USB pullup.  (see the AT91SAM7S-EK schematic, USB_DP on the top of page 5-5).  PIO16 does NOT get pulled up, it does the pulling-up on the USB pin.  The stock (unmodified) AT91SAM7S-EK is connected is this way already.

Re: SAM-BA boot loading process - is this still valid info ?

Posted by Lou Deluxe at September 02. 2008

Previously eapolo wrote:

I have taken the snippet below in an old forum gmane.comp.hardware.arm.at91sam and wonders if the info is valid? Or it does not apply to our AT91SAM7X256 and is not replaced with just that TST pin pulled high?  Please add comments as what also changed.

7X is different from 7S regarding this.  The biggest difference is the existence of the GPNVM2 bit, which tells the chip whether it should remap FLASH or an internal ROM to address 0x00000000.  Since the 7X has that bit, SAM-BA doesn't need to be copied to FLASH, and the TST pin does not perform that function.

Since the TST pin doesn't perform anything useful to us, it is generally left unconnected or tied to its inactive level, so the levels on PA0-2 are unimportant.  On the 7S, it is needed to copy SAM-BA to the FLASH.

PA16 is special to the SAM-BA on the 7S.  I don't know whether it is or not on the 7X (the datasheet doesn't mention it), but the MC board doesn't use that line for the USB pullup, so it doesn't matter. 

Powered by Ploneboard
Document Actions