Pages: [1]   Go Down
Author Topic: USB Host - Keyboard  (Read 1462 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 32
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
// 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
uhd_set_vbof_active_low();

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?



* NattiveUsbPowering.JPG (45.19 KB, 740x549 - viewed 70 times.)
« Last Edit: January 05, 2013, 02:50:21 pm by neil12 » Logged

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

This problem was seen and spotted with a fix at
http://arduino.cc/forum/index.php/topic,135399.0.html
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
uhd_set_vbof_active_high();
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
hardware\arduino\sam\system\libsam\source\uotghs_host.c:UHD_Init()
However, this file appears to be pre-compiled to
hardware\arduino\sam\variants\arduino_due_x\libsam_sam3x8e_gcc_rel.a
Logged

Pages: [1]   Go Up
Jump to: