ATmega32U4-AU

Go To Last Post
19 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

I have A ATmega32U4-AU & im trying to program it via the AVR Dragon. I have tried in ISP & JTAG & cant get either of them working (It just comes up with zeros cant read device). Im able to get into it via the USB but i dont want to re-make the PCB. I have checked & re checked is there something i could be missing with ISP/JTAG?

Can Atmel Flip edit fuses

Thanks
Warren

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Could be a _RESET pin issue - what's connected to yours?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

One presumes the chip is powered up?

--greg
Still learning, don't shout at me, educate me.
Starting the fire is easy; the hardest part is learning how to keep the flame!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes both of those conditions are good. I read that you have to erase the bootloader in the chip before you can use the ISP. Is this correct & how do you do it?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

*Solved*

Ok after a whole day i found out you have to ground PE2(_HWB). Then it will skip the bootloader (USB programming function). JTAG now works & reads correct device but i cant write to it. ISP reads it but doesn't get the correct device. I used erase device in the main menu which of course killed the USB function. Then i was able to read & write in ISP or JTAG correctly. Make sure the VBUS wire is connected to supply.

I find no one can ever answer my questions, so i hope this helps someone in the future.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Its lonely at the top aint it Warren?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Warren, did you managed to reprogram the bootloader with the Dragon / Studio4 ? If successful can you please explain the process to me.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi James
Sorry i didn't get your message in time, im not on here much.

Update you must supply power to AVCC as well.
This erases the bootloader forever & Atmel don't supply the firmware to reprogram it last time i checked. If you need to use it in the future sometime use a third party bootloader its much better & has more features. See LUFA (I haven't touched USB myself)

To put ATMEGA32u4 into ISP mode.

1. Have PE2(_HWB) grounded (for this).
2. Have AVCC & VBUS pin connected to VCC.
3. Connect up your programmer(AVR Dragon etc).
4. Load AVR Studio 4 & connect to your programmer.
5. Connect your ISP lead to the device.
6. Power up your Mega32u4
7. Now click read signature in the main tab & you should be able to read the signature of your device
8. Click chip erase in the same main tab & your done.

Note: I used my own supply to do this not the dragons power supply. So make sure you don't send power up the ISP port to the dragon if you circuit is that way.

If you cant read the device then check your ISP routes etc.

Last Edited: Tue. Mar 6, 2012 - 07:20 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
2. Have Vref & VBUS pin connected to VCC.
Vref ?? You must be kidding.
All Vcc-pins as well as AVcc should be powered. All Gnd-pins should be connected to ground. Proper decoupling is another requirement. As are short connection wires between Dragon and Target.

The Dragon measures the voltage of the target to set its interface-levels to the same value.

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Atmel don't supply the firmware to reprogram it last time i checked.

The AVR8 USB bootloader HEX files are now located on this page:

http://www.atmel.com/tools/FLIP....

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Plons wrote:
Quote:
2. Have Vref & VBUS pin connected to VCC.
Vref ?? You must be kidding.
All Vcc-pins as well as AVcc should be powered. All Gnd-pins should be connected to ground. Proper decoupling is another requirement. As are short connection wires between Dragon and Target.

The Dragon measures the voltage of the target to set its interface-levels to the same value.

Well odd enough it worked when i did that so it was right but yes i did think it was odd & i have found out why. AVCC wasn't connected LOL.
I have changed the above so people don't get confused.

Thats true for the signal lines. If you connect dragons VCC to the ISP pin & then send power from your board by mistake you could be in for trouble.

Hi Dean
Which file would you choose on that site The seem to be all for the AT90USB.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hrm - the U4 bootloader is missing (the U2 chips are compatible with the AT90USBXX2 bootloader). Please send an email to avr@atmel.com asking for it, and we'll track it down (and hopefully get it up on the website).

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I have changed the above so people don't get confused.
Very good. Thank you.

Quote:
If you connect dragons VCC to the ISP pin & then send power from your board by mistake you could be in for trouble.
Indeed. An unconnected-to-USB-Dragon should NOT be connected to a powered targetboard.
Since you are using your own (I mean by that: separate) powersupply: it's wise to have a permanent connection between Dragon Ground and Target Ground. Especially if your powersupply is a switching one.

A GIF is worth a thousend words   They are called Rosa, Sylvia, Tessa and Tina, You can find them https://www.linuxmint.com/

Dragon broken ? http://aplomb.nl/TechStuff/Dragon/Dragon.html for how-to-fix tips

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you Warren. My local ATMEL representative mailed me the correct bootloader, bl_usb_32u4.a90. Interesting that the Div8 fuse is set with the Lufa and ATMEL bootloader and the processor is effectively running at 1MHz.
We've changed the Lufa bootloader for the 32U4 to run at full 8MHz.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

abcminiuser wrote:
Quote:

Atmel don't supply the firmware to reprogram it last time i checked.

The AVR8 USB bootloader HEX files are now located on this page:

http://www.atmel.com/tools/FLIP....

- Dean :twisted:


AT90USB64x USB Bootloader v1.0.0
(4878, updated January 1900)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Interesting that the Div8 fuse is set with the Lufa and ATMEL bootloader and the processor is effectively running at 1MHz.
We've changed the Lufa bootloader for the 32U4 to run at full 8MHz.

The fuses are set to enable DIV8, but the software removes the system prescaler on startup.

- Dean :twisted:

Make Atmel Studio better with my free extensions. Open source and feedback welcome!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Visited http://www.atmel.com/tools/FLIP.... , no bootloader for 32u4, only AT90.
Thank you for the information on the Div8 fuse Dean.
- James

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Any word yet on the 32U4 DFU Bootloader hex file? I've been programming via ISP, and want to switch back to USB. However, the hex file for the bootloader is elusive.

Beau
www.goEWS.com (Wireless Modules/Breakout Boards -and- AVR Breakout Boards)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you are still looking for the ATMEGA32U4 bootloader hex file, you can find it on THIS PAGE.

Beau
www.goEWS.com (Wireless Modules/Breakout Boards -and- AVR Breakout Boards)