Go Down

Topic: Programming Bare SAM3X Chip (Read 4118 times) previous topic - next topic

brichs

I am having issues with uploading sketches to a bare SAM3X chip. I have my hardware configured like the USB programming port on the DUE, using an Atmega16u2 interface. I've programmed the 16u2 with the avrisp mkii programmer, with the firmware found here:

https://github.com/arduino/Arduino/tree/master/hardware/arduino/firmwares/atmegaxxu2

(I've also programmed it with the .hex file read directly from the DUE 16u2 chip).

Using the same steps with a DUE, I am able to install the DUE programming port driver, and upload sketches in the Arduino IDE.

With my hardware, I am getting a code 43 (unknown USB device) when plugging into my PC. When I try to load the USB driver directly (from the arduino drivers folder), it doesn't install. I've read in a couple forum posts that the SAM3X is bootloaded by Atmel, and that there is no need to bootload the chip. Since I am observing this disparity between bare SAM3X and the DUE, I am unsure if the issue is in hardware or firmware.

Palliser

I would recommend you to try the firmware for DUE contained in the Arduino IDE 1.5.1r2
Quote
...\arduino-1.5.1r2-windows\arduino-1.5.1r2\hardware\arduino\sam\firmwares\atmega16u2

brichs

Reprogramming with the .hex file in sam\firmwares\atmega16u2 produced the same result.

Palliser

Try with the default USB driver that Windows can recognize as 'compatible hardware' like USB serial port. This has helped me with other third-party UNOs like Osepp. It could work with your DIY DUE. 

brichs

#4
Dec 03, 2012, 10:28 pm Last Edit: Dec 03, 2012, 11:46 pm by brichs Reason: 1
I just noticed the DUE schematic has the crystal Y4 labeled as 12 MHz, when the board actually has a 16 MHz oscillator attached!

Switching these out fixed my driver recognition problem. Now when I try to program with the DUE programming port selected, the Arduino IDE recognizes the COM port of my device, but when uploading it gives error "no device found on COM #". My RX line is toggling at the proper voltage, but the SAM3X doesn't send a response.

I'm curious if you made any progress on this or solved your problem. I'm working on building my own Due and just got my first boards back. Windows isn't recognize it as a USB device and I'm working my way down several avenues to figure out what the issue is.

Interesting bit about the crystal being mislabeled. It appears that may be one of my issues. Thanks for that. Makes me wonder if that' s intentional to make it difficult to make your own...

Are Y1 and Y4 both supposed to be 16MHz, or just Y4?

delsauce


Are Y1 and Y4 both supposed to be 16MHz, or just Y4?


My DUE board has Y1 @ 12MHz and Y4 @ 16MHz.

Graynomad

The SAM uses a 12MHz crystal (Y1), Y4 is shown as 12MHz also on the schematics but 16MHz would be way more likely, I don't have a Due to check.

_____
Rob
Rob Gray aka the GRAYnomad www.robgray.com

tomeldredge

Any progress on this project? 

Tom Eldredge

brichs

michaeluna,

I got this working awhile back; the main things for me were to switch out that oscillator to 16 MHz, and also program the 16u2 with the correct firmware and fuse configurations  using the avrisp mkii programmer and Atmel Studio.

Can you please post a link to the firmware you used, and can you list your fuse settings? Thanks!

aureliusss

any update from anyone in this thread? i'm having the same issues. my arduinoDUE based board is still an Unknown Device.
I've bootloaded the atmega16u2 with the firmware found in the arduino 1.5.2 folder using an Arduino UNO as ISP

Go Up