Pages: [1]   Go Down
Author Topic: Programming Bare SAM3X Chip  (Read 3239 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Venezuela
Offline Offline
Sr. Member
****
Karma: 12
Posts: 430
Ground.......ground........always ground
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Venezuela
Offline Offline
Sr. Member
****
Karma: 12
Posts: 430
Ground.......ground........always ground
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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. 
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: December 03, 2012, 05:46:45 pm by brichs » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 1
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 121
Posts: 8433
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Rolla, Missouri, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 12
DNA The greatest program ever created.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Any progress on this project? 

Logged

Tom Eldredge

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Full Member
***
Karma: 1
Posts: 160
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: