Issues getting the 32U4 into USB DFU mode

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

Hi folks,

 

I have a design with a ATmega32U4 that I'm trying to do DFU with. I have a hardware reset button that's confirmed working, as well as a button for HWB with no pullup attached.

 

When I erase program memory, it seems like it jumps straight to DFU mode and I'm able to load firmware using FLIP. However, when I do have a program flashed, it doesn't seem to go into DFU mode when I do a reset with power plugged in while holding HWB low. I've confirmed that the HWBE fuse is set on the device.

 

Looking at this timing diagram, it shows HWB going high after reset before becoming Don't Care, but I'm not sure if that transition is strictly required. Could the issue be the lack of an external pull-up on HWB? I assumed HWB would be pulled up internally, but that may be a bad assumption.

 

 

Thanks in advance!

Hylian

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

The power up and reset actions of the device are dependent on the fuses. The HWB function is only active if the HWBE fuse is programmed. HWBE is programmed (i.e. set to '0') by default on the ATmega32U4. If the BOOTRST fuse is programmed, then the device will always start in the bootloader.

 

When HWBE is programmed, then if HWB is low at least tSHRH before RESET goes high and remains low at least tHHRH after, then the device will start execution at the bootloader base address. HWB may be pulled low and does not have to go high for this function to work.

 

Edit:

I've confirmed that the HWBE fuse is set on the device.

By "set" do you mean '1' (not programmed) or '0' (programmed)?

David (aka frog_jr)

Last Edited: Tue. Jan 2, 2018 - 02:24 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the reply! Here are my fuse registers read out in Atmel Studio. I believe checked means set here, as that would make sense for the other bits.

Another thing I forgot mention is that I'm using the HWB pin as an input within my main application, and enabling the internal pull-up. It shouldn't be an issue since I'm hardware resetting, however.

 

I've also attached my board with the relevant parts highlighted. A pushbutton connects the two labeled pads. The path to ground there is pretty horrid, but it seems to work fine in my application. Next step is to try manually tying that pin to ground to see if it makes a difference.