Hi,
I think I found a small hardware bug while fixing the v1.0p boards (adding a 100nF capacitor near the LDO pin 4). When I want to put the SAM7S in SAM-BA mode (shorting TEST and 3.3V pins), it does not work, even after waiting a lot of time. The 2 LEDs are on, and when I touch PA0 (pin 48 on the right upper corner of the SAM7S, near the "A") with a piece of metal, the LEDs switch off and putting into SAM-BA mode works. maybe PA0 needs to be low/up but it is not connected and probably floating. The solution is easy, but should we correct that for the next version (if it is a real bug)?
Also, simtrace seems to load sam_ba module, which I have to remove so I can use sam7util multiple times: sudo rmmod cdc_acm && sudo rmmod sam_ba && sudo ./sam7 --exec set_clock --exec unlock_regions --exec "flash ../openpcd/firmware/main_simtrace.samba"
thanks, kevin
On 08/18/2011 10:24 PM, Kevin Redon wrote:
Hi,
I think I found a small hardware bug while fixing the v1.0p boards (adding a 100nF capacitor near the LDO pin 4). When I want to put the SAM7S in SAM-BA mode (shorting TEST and 3.3V pins), it does not work, even after waiting a lot of time. The 2 LEDs are on, and when I touch PA0 (pin 48 on the right upper corner of the SAM7S, near the "A") with a piece of metal, the LEDs switch off and putting into SAM-BA mode works. maybe PA0 needs to be low/up but it is not connected and probably floating. The solution is easy, but should we correct that for the next version (if it is a real bug)?
Interesting, I asked questions about the default state of PA0,PA1 and PA2 in the 'TST PIN and...'. So the SAM7 datasheet in the git repo says that:
PA0-PA... default is: 'Pulled-up input at reset'. Sorry, I am a noob with HW but even with PA0 not connected... it should be pulled up and be a logical one? Did you check if there is a more recent version of the datasheet?
On 18.08.2011 23:17, Holger Hans Peter Freyther wrote:
Interesting, I asked questions about the default state of PA0,PA1 and PA2 in the 'TST PIN and...'. So the SAM7 datasheet in the git repo says that:
PA0-PA... default is: 'Pulled-up input at reset'. Sorry, I am a noob with HW but even with PA0 not connected... it should be pulled up and be a logical one? Did you check if there is a more recent version of the datasheet?
I also though about it and the previous post. But I also saw PA0 needs to be high for SAM-BA, and the the pull-up is enabled at reset. That is why I was wondering.
Also we had no problem with the devboard from olimex (with no additional pull-up). Maybe I'm doing something wrong.
There is a newer version of the datasheet (28-Jul-11), but the information about that did not change.
Thanks, Kevin
Hi,
There is a newer version of the datasheet (28-Jul-11), but the information about that did not change.
I also checked the errata sheet for the AT91SAM128 and didn't see anything relevant.
Maybe we should check if a pullup on PA0 fixes the other board that had troube with SAM-BA, and if it's the case, just add it ... better be safe than sorry IMHO. (even if it's troubling not understanding _why_ ...)
Cheers,
Sylvain
On 08/19/2011 09:04 AM, Sylvain Munaut wrote:
Hi,
[snip]
Maybe we should check if a pullup on PA0 fixes the other board that had troube with SAM-BA, and if it's the case, just add it ... better be safe than sorry IMHO. (even if it's troubling not understanding _why_ ...)
Hello!
First of all, I agree with Sylvain, better be safe than sorry. If you are reworking the boards anyhow, add resistors from PA0-PA3 to 3.3V (100k?). Also add a resistor from ground to the TEST pin (also maybe 100k?). If it doesn't help or screw things up, just don't mount them.
In my designs I usually add a No Mount resistor to every not used pin of the MCU. Easier to patch in a wire if you screw up and floating pins makes me nervous. I am a big fan of 0 ohm and Not Mount resistors.
I have previous experience with SAM7 and SAM-BA, a board for a customer that has been produced in 3 batches of 15 boards each.
First step is to load SAM-BA onto the board. The sequence I have found working was: 1) Press and hold TEST 2) Generate a reset, by pressing and releasing the reset button. 3) Keep TEST pressed at about 20 seconds. If you feed power from an external supply you can see a change in current consumption when SAM-BA is done. Atmel says 10 seconds, but I think it is more.
I then use serial download with Atmels own SAM-BA program (yes Windows in a VirtualBox). In the latest production batch (<6 months ago) of my boards there was a new version of the SAM7S with a C tucked on in the end (if I remember correctly). When I tried to download a program it said it was OK, but then the program was never written into the flash. After a long investigation I realized that it required a patch from Atmel for their SAM-BA program. That patch was not available from any website by then, but when I asked their support why it did not work they sent me the patch with an explanation. I can post it here if anyone is interested.
We have also had problems with too small (physical outline) crystals, since they seems to have a too long startup time for SAM-BA. Should not be a problem here though.
OK that was long, sorry. But my maybe there is a crumble in there that might solve your problem or gives you an epiphany.
Best regards, /Stefan
Hi Kevin,
On Thu, Aug 18, 2011 at 10:24:17PM +0200, Kevin Redon wrote:
maybe PA0 needs to be low/up but it is not connected and probably floating. The solution is easy, but should we correct that for the next version (if it is a real bug)?
As Holger already indicated, the data sheet claims very clearly that PA0 has an internal pull-up which is active at boot time.
So the question is whether this is really the bug that we're seeing with activating SAM-BA using the 'normal' squence.
Regards, Harald