Electronic – ARM Processor board and Programming

arm

I am trying to develop an ARM development board using ATSAM3U4C with a 96 MHz clock, a few LEDs and a button for external interrupt. Shown below is a little circuit that I have put in place. Using Atmel SAM-ICE 20 pin JTAG connector as the debugger and using Atmel Studio 6.0 for programming. For JTAG connection, pin 3 on 20 pin socket connects to NRST and pin 15 connects to NRSTB.

So far I got the LEDs to blink but I have a few questions:

  1. The debugger does not seem to erase the chip when loading the program. I can run the program once but then to run the program again, I have to use one of the buttons to drive the Erase Pin high (using U5 for now).
  2. I noticed that my 96 MHz crystal oscillator is not actually being used by the ARM processor. Have I wired it incorrectly?

These are the only two issues I am facing right now. I have been using 8-bit microcontrollers and thought this would be a good learning to design my own board and learn to program on it.

enter image description here

Best Answer

I'm not familiar with the ATSAM's, but I know the STM32F4's (as a comparative ARM Cortex-M) wouldn't work with an external 96MHz source - their working range is 4 to 26MHz.

I'd try a slower crystal or oscillator and use the PLL (assuming the ATSAM has one) to increase the system clock to 96MHz.

Re your problems with odd behaviour following an erase/program cycle, maybe try a different toolset. The Coocox IDE (at v.1.7.7) appears to support your MCU (AT91SAM3U4C?), although I'm less sure that it supports the SAM-ICE. If it doesn't then you can buy a CoLinkEx debugger that is definitely supported and should work with almost any Cortex-M for around US$20.

Disclaimer: I have no relationship with Coocox, I just think they have an awesome free product.

I suggest this because I've encountered a situation in the past where if I used vendor A's tools then I had to power cycle between erase/program cycles; but if I used vendor B's tools then I didn't, despite flashing exactly the same binary.