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