Enter SAM-BA with AT91SM7X ?

Microchip in-system programming solution: SAM-BA

Moderators: nferre, fab

ManuelSahm
Posts: 82
Joined: Tue Jun 26, 2007 6:27 pm

Enter SAM-BA with AT91SM7X ?

Mon Dec 15, 2008 12:14 pm

Hello,

1.)
how could I enter SAM-BA Boot with the AT91SAM7X ?

(I have used the AT91SAM7S - there I have to have to connect 3 GPIOs (PA0, PA1,PA2) to a special volatage to enter SAM-BA Boot)


2.)
What about an external circuit for USB enumeration (Pull-Up Control) - On the DemoBaord there isn´t anytghing. (On the demoboard of the At91SAM7S there is an ext. circuit)

3.)
the Pin PA16 is connected to this external circuit and this one is used in SAM-Ba Boot Mode [At91SAM7S]
Which Gpio pin is used on the AT91SAM7X ?



Thanks a lot

Manuel
gerhardf
Posts: 554
Joined: Thu Dec 02, 2004 2:28 pm

Re: Enter SAM-BA with AT91SM7X ?

Mon Dec 15, 2008 12:33 pm

1.)
how could I enter SAM-BA Boot with the AT91SAM7X ?
(I have used the AT91SAM7S - there I have to have to connect 3 GPIOs (PA0, PA1,PA2) to a special volatage to enter SAM-BA Boot)
sam-ba is active by default and controlled through GPNVM bit 2
2.)
What about an external circuit for USB enumeration (Pull-Up Control) - On the DemoBaord there isn´t anytghing. (On the demoboard of the At91SAM7S there is an ext. circuit)

3.)
the Pin PA16 is connected to this external circuit and this one is used in SAM-Ba Boot Mode [At91SAM7S]
Which Gpio pin is used on the AT91SAM7X ?
external pull-up is necessary. at the at91sam7x.ek it si not switchable by a port but with an switch (s1).

regards
gerhard
ManuelSahm
Posts: 82
Joined: Tue Jun 26, 2007 6:27 pm

Re: Enter SAM-BA with AT91SM7X ?

Mon Dec 15, 2008 12:42 pm

sam-ba is active by default and controlled through GPNVM bit 2
Is SAM-Ba Boot always entered when Flash is empty ?

Is it possible to erase the Flash through hardware pins or always through software.
(So how do I erase the flash if my program/firmware cannot erase the flash by software anymore ?)
external pull-up is necessary. at the at91sam7x.ek it si not switchable by a port but with an switch (s1).
As far as I understand I have to place the external circuit, if I want to re- enumerate this dives while my software/firmware is running ?
...ans SAM-Ba Boot doesn´t use any GPIO Pin to force re-enumeration...?

Thanks a lot
dariens_haircut
Posts: 23
Joined: Fri Jul 25, 2008 12:08 am

Re: Enter SAM-BA with AT91SM7X ?

Sat Dec 20, 2008 6:39 pm

Is SAM-Ba Boot always entered when Flash is empty ?
It depends on your definition of empty. SAM-BA will run on reset if GPNVM2 is not set. It doesn't care whether the FLASH is all erased or not.
Is it possible to erase the Flash through hardware pins or always through software.
(So how do I erase the flash if my program/firmware cannot erase the flash by software anymore ?)
Use the ERASE pin/jumper. That will not only erase the FLASH, but will also clear GPNVM2.

Trying to clear GPNVM2 in firmware is a pain. It can be done, but it is full of undocumented gotchas. Basically, clearing the bit makes the program that is doing it crash. Even if interrupts are disabled.
As far as I understand I have to place the external circuit, if I want to re- enumerate this dives while my software/firmware is running ?
...ans SAM-Ba Boot doesn´t use any GPIO Pin to force re-enumeration...?
That is the case. You have to pick your own pin to do this on the 7X. SAM-BA on the 7X apparently doesn't do anything with pullup control and just assumes that it is already enabled. Your pullup hardware would have to be designed such that the pullup is enabled on reset (so SAM-BA can work), and your firmware disables it temporarily when it wants to re-enumerate.

I have done this on both 7S and 7X. They are quite different in this regard.

Return to “SAM-BA”

Who is online

Users browsing this forum: No registered users and 1 guest