Go Down

Topic: Get the bootloader to a 32U4 using a Leonardo (Read 2029 times) previous topic - next topic

Bouni

Hi erveryone,

i currently develop a small board for a Kids solder workshop and try to get the bootloader to the 32U4 on the board using a Arduino Leonardo as progammer, but without success so far :(

Here is the schematic to the board.



My questions are:

1. Is it possible to upload the bootloader to the 32U4 using a Leo?
2. how can i make sure the processor is running (i have an oscilloscope here).
3. Can anybody spot a major flaw in my schematic?


Thanks so much for any kind of help!

spycatcher2k

Hi - You have not connected the ISP Header to RESET. I have used the Leo as a programmer for other Leos, so no issue there, Don't know how to test a blank Leo.
Mrs Drew
-=-
UK Based PCB Manufacturing - PM for details
I will design & code for you, but I will also charge you (PM me)
Use Google or search this site BEFORE asking!

Bouni

#2
Jul 22, 2015, 10:34 am Last Edit: Jul 22, 2015, 10:35 am by Bouni
Hi,

the reset is connected, its just not clearly visible in the schematic.

I've connected it this way:

Leonardo Pins32U4 ISP Header
10RESET
5V5V
GNDGND
SCKSCK
MISOMISO
MOSIMOSI


Is that correct?

Furthermore I've uploaded the "Examples -> ArduinoISP" sketch to the LEO and extended the "C:\Program Files (x86)\Arduino\hardware\arduino\avr\programmers.txt" with these lines:


Code: [Select]

arduinoispleo.name=Arduino as ISP (Leonardo)
arduinoispleo.communication=serial
arduinoispleo.protocol=arduino
arduinoispleo.speed=19200


Then I've selected "Tools->Programmer->Arduino as ISP (Leonardo)" and hit "Burn Bootloader"
It takes a while and then shows timeout errors from avrdude i think.

Any Ideas what I'm doing wrong?

Maverick71

Hi,

Can You please post a high resolution image of the shematic?
I cant see anything (importand Details) on this image.

I posted similar project with another Problem.
Mine doesn't reset correctly on second upload over USB.

Basically programming over ISP should be without any problems on this Chips.

Regards,
Mav.

dmjlambert

On the Leonoardo when used as a programmer, the SS pin is pin 17, which is not on the header anywhere.  Pin 17 runs the RX LED.   So, you need to edit the ArduinoISP sketch to change

#define RESET     SS

to

#define RESET     10


Bouni

Hi,

@Maverick71: The image is hosted on imgur, here's a direct link: imgur link

@dmjlambert: I've done that but forgot to mention it in my last post.

I've done some further tests, all VCC pins have the 5V and all GND have the GND connection.

Here's a picture that shows front and back layout: imgur link

dmjlambert



Select Tools->Programmer->Arduino as ISP
Do NOT select Tools->Programmer->Arduino as ISP (Leonardo)  ---you do not need that programmers.txt entry.   

I also recommend going in the IDE preferences and checkmark the show verbose output during upload option.


Maverick71

Hi,

I have looked on Your shematic.
You dont have got reverse blocking diode between VCC and USB VCC but this should be not a problem for a test.

1) I used my UNO as programmer but Leonardo must work too.

2) a) LED 13 should "pulsing" for some seconds after You make manual RESET.
    b) Unplug the new Leonardo. After new connection You will see "Leonardo" as USB Device.

3) a) I guess You connected the RESET properly like some people told You allready.
    b) Reverse blocking diode on RESET is missing too.
    c) I dont know if a missing ferrite can make a problem. I'm using 2 of them.

Generally, I would suggest as for the first step You should check if You can reach the ┬ÁC.

Regards,
Maverick

Bouni

Hi,

sorry for the long silence  :smiley-sweat:

I made some progress! The main problem was that i bought dirt cheap 18pF capacitors from China.
With those the crystal doesn't oscillate at all. I fixed that quickly with way to large, but working 1206 caps for the test.

That way I was able to flash the bootloader using an STK500.

Unfortunately the Board is not recognized by may notebook if i plug it in via USB.
Strangely it is recognized if i have the STK connected to the ISP header at the same time!?

Is that maybe a problem with my Reset Pullup? (I had no external resistor soldered in during the test)


Maverick71

Hi,

Sounds like You have got a Problem with GND.
Double check Your traces.

Can You please give me Your Email or Skype name?
Im developing something similar.
Together we would be faster.

Regards,
Maverick

Go Up