Recently I built a custom device with an AT91SAM7S64-microcontroller from Atmel. The schematic is based on an evaluation-kit from Olimex, this one, to be precise: http://www.olimex.com/dev/pdf/ARM/ATMEL ... -REV-E.pdf.
Alas, the AT91SAM7S64 is insanely difficult to get; it's more or less sold out everywhere, even at big distributors like Farnell, RS and Mouser. Luckily the AT91SAM7S321 is pin- and function-compatible (less memory, but that's ok) and in stock. So I used that MCU instead.
Tried to program it with a simple blink-a-led for a led on pin 9 (PA17, D0 in Flowcode), with my new copy of Flowcode 4. This didn't work, checked my soldering and replaced the MCU. Again, nothing, not even on the second PCB I built.

So, that's when I decided to check all the pins with a scope and lots of wires. Here's what I found out:
- Toggle pin C1 and you'll actually toggle pin D0
- Toggle pin C2 and you'll actually toggle pin D1
- Toggle pin C3 and you'll actually toggle pin D2
- Toggle pin C4 and you'll actually toggle pin D3
- Toggle pin C5 and you'll actually toggle pin C7
- Toggle pin D1 and you'll actually toggle pin C4
- Toggle pin D2 and you'll actually toggle pin C1
- Toggle pin D3 and you'll actually toggle pin D2
I've tried different settings in Flowcode, even changed my project setting to AT91SAM7S64 to see if it had anything to do with the defines for the AT91SAM7S321... no effect.
There must be something wrong with the GPIO settings. Can somebody please look at this, since it's kind of frustrating to change all my pin settings. Thanks in advance for your help.
Regards,
Paul