Using USBtoSerial example project with Arduino Due 16u2

137 views
Skip to first unread message

Dana L. Coe

unread,
Feb 23, 2015, 8:46:05 AM2/23/15
to lufa-s...@googlegroups.com
Hi Everybody,

Has anyone successfully used the USBtoSerial sample project with any Arduino boards in place of the (rather older) version that ships with Arduino?

I'm trying to make some changes, and I'd really like to use the most current code, as the old build system from the time the previous usb_serial drivers was compiled is not nearly as good as the most recent one.

What I'm actually looking to do is be able to dump a hex file through the GenericHID (which works wonderfully as an HID<->UART passthrough) and reprogram my DUE.
I was thinking of perhaps borrowing some code from the USBtoSerial to figure this out...

Any suggestions?

Best regards,
Mr. Dana L. Coe
DLC Science
+86 13905813322
d...@dlc.net

Hangzhou, China
http://dlc.net

Nevada Smith

unread,
Feb 23, 2015, 1:33:56 PM2/23/15
to lufa-s...@googlegroups.com
Hey Dana,
its me again :D
Checkout my new HoodLoader2 and HID Project. This gives you a wide range of possiblities. Not sure what you want to achieve this time with your board ;)
https://github.com/NicoHood/HoodLoader2

You may want to email/skype me whats been new with your stuff :)

Dana Coe

unread,
Feb 24, 2015, 3:22:36 AM2/24/15
to lufa-s...@googlegroups.com
Heya Nico!
As noted in my post, I've swapped processors on my project from mega2560 to the Due - actually I'm using a variant, the 3A8C.
So much as I'd like to use the Hoodloader, alas it does not appear to be what I need ;-)

I have the GenericHID passing data back and forth flawlessly. Right now, if I want to reprogram the 3A8C, I have to swap the code on the 16u2 from GenericHID <-> arduino-serial.
This works very easily via the HID bootloader that Dean developed, but is not really elegant for the eventual end users to reflash their device. 
What I'm doing is digging around in the arduino-serial source code for their 16u2 firmware, but this is several years old, and I was wondering if an updated version that works with the current LUFA build environment had been done by anyone. 

Ideally, I want to trigger the 3A8C erase & bossa load routine from my within my HID firmware. I've found the code in the arduino firmware that controls the reset & erase lines, I just have to activate it from within my firmware, possibly via sniffing the data stream for a particular code or better yet adding an HID feature request that triggers this behavior.

Now I'm digging in the examples to find some code for adding HID feature requests. Any suggestions as to which example is most similar to what I need to do?

Nevada Smith

unread,
Feb 24, 2015, 11:47:21 AM2/24/15
to lufa-s...@googlegroups.com
You are still using a 16u2. You still need a serial bridge. The uno/mega/due use the same usb avr and the same firmware!? Also HoodLoader2 could really be what you need. Just spend a bit of time and read what it can offer to you. Thats all I can say.

And for the examples: simply change the mcu and recompile them? They should work out of the box. use as board UNO to get the leds working and thats it.
Reply all
Reply to author
Forward
0 new messages