Pages: [1]   Go Down
Author Topic: Convenient way to put ATMEGA16U2 into DFU mode?  (Read 1365 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I would like to change the firmware on the ATMEGA16U2 on the Due board.

I know from the ATMEGA16U2's datasheet (http://www.atmel.com/Images/doc7799.pdf) that pin 13 (_HWB) needs to be tied high while the ATMEGA16U2 is reset with it's pin 24 (_RESET) - which also needs to be tied high.

Resetting the ATMEGA16U2 is easy (from the ICSP1 header), however I can see from the Due schematic that pin 13 (_HWB) on the ATMEGA16U2 is tied to a 10K resistor (R18) that goes directly to ground. This makes it pretty much impossible to put the ATMEGA16U2 into DFU mode unless one removes R18.

Anyone know of a convenient way to put the ATMEGA16U2 into DFU mode without removing the resistor R18? ... sadly i don't think there really is.

Best Regards,
Michael
Logged

Offline Offline
God Member
*****
Karma: 32
Posts: 507
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As far as I can tell the 16u2 on the Due does not have DFU mode in the firmware (at least my one doesn't). To change the firmware you will need to use an ISP programmer.
Logged


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

Hello Stimmer,

Thanks for your reply.

Have you tried to reset the chip into DFU mode? How would you know your board does not have it if the _HWB pin is always tied to ground through R18?

This chip absolutely does support DFU mode for programming from USB via Atmel flip (thats the beauty of the ATMEGAxU2 series, no ISP required). I have implemented two different PCBs that use the ATMEGA16U2 chip, and it definitely comes from Atmel with DFU mode (by resetting it as i described) in the firmware. I suppose it is possible the manufactures of the Due removed it completely. If i had a secondary Due i would remove the R18 resistor and test, however i don't. Either way thanks for your reply.

Best Regards,
Michael
Logged

Offline Offline
God Member
*****
Karma: 32
Posts: 507
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think _HWB actually needs to be low to enter DFU mode on a 16u2, not high.

I know my Due doesn't have the DFU code in it because I connected up an ISP and had a look - the only code there is the serial code.
Logged


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

Hi Stimmer,

My mistake, _HWB should be low to enable hardware boot (DFU) mode and _RESET, as mentioned in the data sheet. These pin have 'bars' over them indicating negative logic. I don't have an ISP to check, however if you checked with an ISP, and telling by how the circuit is designed they must not have it in there.

Thanks again for your insight!

Best Regards,
Michael
Logged

Pages: [1]   Go Up
Jump to: