New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
USB.Init() function looping forever #402
Comments
Thanks for your reply @xxxajk! |
Should appear on the serial monitor. Make sure that you do Serial.begin()
first.
…On Wed, Aug 15, 2018, 7:19 AM asym1 ***@***.***> wrote:
Thanks for your reply @xxxajk <https://github.com/xxxajk>!
Not sure what you mean by the link tho? Like I said in the first post, I
have already set that to 1, but the thing I don't know is where the
debugging information would show up? Is it in the Serial Monitor or
somewhere else I haven't heard of because nothing shows up in Serial
Monitor.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#402 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADskzDd1glPR4luGAQi_CIiohNLHBqp1ks5uRAPXgaJpZM4V9351>
.
|
Also make sure that you have modified the mini shield to supply 5v. The
default is 3.3v, which is going to cause problems.
…On Wed, Aug 15, 2018, 7:21 AM Andrew Kroll ***@***.***> wrote:
Should appear on the serial monitor. Make sure that you do Serial.begin()
first.
On Wed, Aug 15, 2018, 7:19 AM asym1 ***@***.***> wrote:
> Thanks for your reply @xxxajk <https://github.com/xxxajk>!
> Not sure what you mean by the link tho? Like I said in the first post, I
> have already set that to 1, but the thing I don't know is where the
> debugging information would show up? Is it in the Serial Monitor or
> somewhere else I haven't heard of because nothing shows up in Serial
> Monitor.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#402 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ADskzDd1glPR4luGAQi_CIiohNLHBqp1ks5uRAPXgaJpZM4V9351>
> .
>
|
See this article for all info.
https://www.circuitsathome.com/mcu/teensy-3-0-now-supported-by-the-usb-host-library/
…On Wed, Aug 15, 2018, 7:23 AM Andrew Kroll ***@***.***> wrote:
Also make sure that you have modified the mini shield to supply 5v. The
default is 3.3v, which is going to cause problems.
On Wed, Aug 15, 2018, 7:21 AM Andrew Kroll ***@***.***> wrote:
> Should appear on the serial monitor. Make sure that you do Serial.begin()
> first.
>
> On Wed, Aug 15, 2018, 7:19 AM asym1 ***@***.***> wrote:
>
>> Thanks for your reply @xxxajk <https://github.com/xxxajk>!
>> Not sure what you mean by the link tho? Like I said in the first post, I
>> have already set that to 1, but the thing I don't know is where the
>> debugging information would show up? Is it in the Serial Monitor or
>> somewhere else I haven't heard of because nothing shows up in Serial
>> Monitor.
>>
>> —
>> You are receiving this because you were mentioned.
>> Reply to this email directly, view it on GitHub
>> <#402 (comment)>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/ADskzDd1glPR4luGAQi_CIiohNLHBqp1ks5uRAPXgaJpZM4V9351>
>> .
>>
>
|
The VBUS jumper is cut and the pad is connected to the VIN of the Teensy 3.2. |
Connect to the vbus for the 5v. IIRC vin is diode protected, and an input
only. I'll check the schematic to be certain.
…On Wed, Aug 15, 2018, 7:36 AM asym1 ***@***.***> wrote:
The VBUS jumper is cut and the pad is connected to the VIN of the Teensy
3.2.
Serial.begin() is called in the setup of the XBOXUSB example...
So I'm not sure where the printing of the debug information is going wrong
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#402 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADskzEkxsbfjgWLUFp6p9RpnT01rOhzPks5uRAe_gaJpZM4V9351>
.
|
Vin should be ok. I've always used the vbus pad. I suppose that it
shouldn't matter. Have you checked the voltage on the pin?
…On Wed, Aug 15, 2018, 7:39 AM Andrew Kroll ***@***.***> wrote:
Connect to the vbus for the 5v. IIRC vin is diode protected, and an input
only. I'll check the schematic to be certain.
On Wed, Aug 15, 2018, 7:36 AM asym1 ***@***.***> wrote:
> The VBUS jumper is cut and the pad is connected to the VIN of the Teensy
> 3.2.
> Serial.begin() is called in the setup of the XBOXUSB example...
> So I'm not sure where the printing of the debug information is going wrong
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#402 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ADskzEkxsbfjgWLUFp6p9RpnT01rOhzPks5uRAe_gaJpZM4V9351>
> .
>
|
https://www.pjrc.com/teensy/schematic32.gif Vin is directly connected to Vusb on the Teensy 3.2. I checked the Vbus on the Shield and there's 5V on there aswell. |
Try running the boardqc to make sure that everything is ok with your wires.
…On Wed, Aug 15, 2018, 7:55 AM asym1 ***@***.***> wrote:
https://www.pjrc.com/teensy/schematic32.gif
Vin is directly connected to Vusb on the Teensy 3.2. I checked the Vbus on
the Shield and there's 5V on there aswell.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#402 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADskzELLZE78deBzsqY0gRGzjVQOxObNks5uRAxGgaJpZM4V9351>
.
|
The problem is on Line 36 Usb.Init() is called before any tests are actually performed: So it just gets stuck on that line. Maybe I selected a wrong option in the "Tools" section of the Arduino IDE? These are my current settings: |
These kinds of problems are usually wrong wiring. Post a table or diagram of your wiring. |
Hi @gdsports, I think you just replied to my thread on the PJRC forum (https://forum.pjrc.com/threads/53452-USB-Host-Shield-with-Teensy-3-2). The thing is I have an older Teensy with a preloaded program which uses the exact same wiring and there the xbox controller works without an issue. That's why I doubt it's a wiring issue. Anything else I might try? |
As I said, try the board QC program. |
As I said in an earlier reply. So the output of that program is literally the following:
And then it gets stuck on the Usb.Init() function |
https://github.com/felis/USB_Host_Shield_2.0/blob/master/settings.h#L86 |
@xxxajk Setting that to zero actually fixed the problem! Not sure why tho but I'm glad it's resolved! |
Probabbly means there is a conflict with the built-in library. As far as I can remember PJRC has made the SPI faster. I'll have to look into this a bit deeper. Glad it is now working for you! |
@xxxajk is there any reason why |
I had the same issue, but it is a compiler optimization problem (at least in my environment): NOT OK:
OK:
it works then with the built-in SPI library as well as SPI4TEENSY3 BTW: you can use Versions:
Hardware:
|
Same problem here, solved by setting optimize option to fast. Thank you @wiesl! Software:
Hardware:
|
Hi all,
I'm using a Teensy 3.2 along with the USB Host Shield Mini. I installed both the USB_Host_Shield_2.0 library and spi4teensy3 library. I tried running the XBOXUSB example, as I have a wired Xbox 360 controller plugged in the Shield.
This example, aswell as the USB_desc example both get stuck on the USB.Init() line ( https://github.com/felis/USB_Host_Shield_2.0/blob/master/examples/Xbox/XBOXUSB/XBOXUSB.ino#L23 )
I have also set ENABLE_UHS_DEBUGGING in settings.h to 1 ( https://github.com/felis/USB_Host_Shield_2.0/blob/master/settings.h#L42 )
and
uncommented EXTRADEBUG and PRINTREPORT in XBOXUSB.cpp ( https://github.com/felis/USB_Host_Shield_2.0/blob/master/XBOXUSB.cpp#L20 )
although I'm not sure where this debugging information would be shown? I don't see it show up in the Serial Monitor in the Arduino IDE.
Any help towards resolving this issue would be greatly appreciated. Thanks in advance!
The text was updated successfully, but these errors were encountered: