Go Down

Topic: USB Host - Keyboard (Read 2614 times) previous topic - next topic


Jan 05, 2013, 05:16 am Last Edit: Jan 05, 2013, 08:50 pm by neil12 Reason: 1
Hi, I'm having a few issues with turning on power to the Native USB port in Host mode/
I wonder if anybody has this working and if I'm missing something.?
I'm using the  V1.5.1r2 with the Keyboard Controller and referencing the Arduino_DUE_V02b schematic. My board is marked DUE R3
I'm powering the board from a 9V external source.
The voltage coming off F1 power the "Native USB" OTG Host - never turns on.

T1 FDN340P switches the+5V to USBVCC to F1. T1 Gate pin 3 must be pulled low to turn it on from IC1b "GATE_CMD" and effectively seems like it should be wiring ANDing  VIn >6.6V  and the processor UOTGVBOF being active low.
However looking at the schematic - its got some puzzling notes:
"Forces OFF the power supply to USB port when the USB port is in HOST mode (board powered from external power supply)"

I would have thought that the "Native USB" port in HOST mode supplies power to port, and it requires the DUE to be externally powered for this to happen.

What is currently happening, is if  Vin is below 6V6 then IC1B pin 5 is less  than pin6@3v3 which means that pin 7 goes low - switching on T1 .
So it seems to me that  IC1B pins 5 & 6 are the wrong way around. That is when Vin is above 6V6, there is +5V power available to supply the USB Host powering ?
OR am I missing something?

So a simple fix for this rev3 is to set VBUSP0 "0" - its default mode to make  UOTGVBOF high for turning on power to USBVCC.
It seems like the code is in  uotghs_host.c/h: UHD_init()
Code: [Select]
// Signal is active low (because all SAM3X Pins are high after startup)
// Hence VBOF must be low after connection request to power up the remote device

and .h
//! Set USB_VBOF output pin polarity
#define uhd_set_vbof_active_high()            (Set_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSPO))
#define uhd_set_vbof_active_low()             (Clr_bits(UOTGHS->UOTGHS_CTRL, UOTGHS_CTRL_VBUSPO))

Anybody got this working?


This problem was seen and spotted with a fix at
The fix for keeping the power ON (for the native USB port) is  to
in loop(), immediately after the line usb.Task();  add the line
Thanks to stimmer who posted it.
It works as it is turning on native USB power all the time, and there is no fault handling.
It looks to me like it is a DueR3 issue and could be  be fixed in
However, this file appears to be pre-compiled to

Go Up