I would eventually like to use a Due as a custom USB device PC-side (through programming port) while using it as a USB Host on the native port. Adding the programming port endpoints (perhaps willingly removing the CDC endpoints) means I may break USB descriptors, or USB to PC communication generally speaking during development.

On the Micro that's not a problem because a double reset input lets me access the bootloader for 8s and reprogram the board even though I've removed CDC endpoints altogether. But on the Due, which I am not familiar with, I can see that a double reset input does not seem to have the same effect as my script starts right away. So I am quite scared to begin messing with the USB communications if I might just break my Due permanently (or rather, until I can recover it directly accessing the MCU).

Hence the question: is there some equivalent to the bootloader recovery of the Micro (& other older boards) on the Due ?

  • There is an "Erase" button on the Due to wipe your sketch and access the bootloader. – Majenko Sep 23 '20 at 11:21
  • I didn't know that, thanks @Majenko. This solves my problem. Feel free to post this as an answer if you want it accepted. I'll edit the question to add "recovery" [mode]. – Julien BERNARD Sep 23 '20 at 12:22
  • I'm not sure if you're asking the right question though. It sounds like you're going to want to reprogram the USB interface chip, in which case the main MCU has no role in this... – Majenko Sep 23 '20 at 12:24
  • Ah yes I'm very new to the Due so that didn't occur to me, but the programming port uses an external Serial to USB adapter, right ? So it's not the MCU's problem and I'm in for a ride if I try to mess with it. Whereas the native USB port is directly handled by the MCU, correct ? – Julien BERNARD Sep 23 '20 at 12:36
  • 1
    That is correct. Making the programming port anything other than UART will be the same as if you're doing it to the UNO. – Majenko Sep 23 '20 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.