ATmega32u4 DFU Bootloader Basic Question

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

Hello all,

I am currently designing the circuitry for a new musical interface. For this project, all I need is a circuit which reads 48 analog inputs and spits out MIDI through USB. Since I'm new to circuit design, I thought I would work off of pre-existing schematics. Here is my plan:

1. Duplicate the necessary parts of the Teensy 2.0 onto my PCB:

(schematic from Paul Stogreffen's site)

2. Hook up some multiplexers to the duplicated Teensy, similar to this:

(again from Paul)

The assembly house will be soldering fresh ATmegas with the default Atmel bootloader onto the board, and I'm a bit confused about how I would program it. Can I just connect it to my computer through USB and then use the Flip software? I've read something online about having to pull down some HWB pin while holding the reset button...?

I was hoping to get rid of the reset button from the Teensy schematic. Is there a way to program a fresh ATmega32u4 purely through USB, without needing to physically touch the board?

Thanks in advance for any guidance.

Best,
Ray

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

If atmel bootloader is already programmed, then the first time it runs, it will automatically go to bootloader section.

After you program it through the bootloader and reset the device, it will run your freshly burned program unless the bootloader condition is exercised (usually pulling down some hardware pin) in which case it will jump to the bootloader.

You can get rid of the hardware pin to go to bootloader by putting some kind of condition in your application in which case it will jump to the bootloader section and start executing that code. You need to find the address that you should jump to for the bootloader in the relevant app note.

The condition can be anything you want. In your case, you can use some kind of USB event or command given through the USB to trigger the jump to the bootloader.

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

Great, thanks so much for the reply mspeng! To follow up on the question-- if I don't need the reset button, what should I do with the reset pin? Should I connect it to +Vcc, or can I leave it floating?

I'm also wondering what parts of the Teensy are absolutely necessary for my application. I am only interested in using the Atmega32u4's ADCs.

I've eliminated some parts of the Teensy in this schematic-- would the following be functional? In addition, I'm wondering if I can eliminate the part circled in red if I don't need a 3V supply.

Thanks so much for all the help :).