Page 2 of 2

Re: Hello ad first problem

Posted: Mon Oct 16, 2017 10:34 am
by infiniteimprobability
Hi,
I just downloaded the test binary I posted and tried on a different board and it works fine (enumerates as stereo USB audio class 1 device). So I have to conclude there is a HW issue with your board - probably at the USB end.
Checking BCLK and LRCLK toggling will be interesting, but I think it won't fix the USB interface and the debugger is saying the code runs fine.

I know it's a pain, but I'd suggest returning the board from your supplier. Please feel free to reference this thread.

Re: Hello ad first problem

Posted: Wed Oct 25, 2017 11:53 am
by PaoloF
All right, I already figured I had to ship the board to the assistance, but first I would like to have a last test:
in the tests I've done so far, I've always used the micro-USB port, can you use the USB type-A?
If the issue is at USB end, is possible that USB type-A work well?
I tried to connect an type-A/type-A cable, but from the documentation I did not understand how I should do it to enable it

Re: Hello ad first problem

Posted: Wed Oct 25, 2017 2:16 pm
by infiniteimprobability
hi,
yes it should be. In audiohw.xc you can see the following section:

Code: Select all

    /* 0b11 : USB B */
    /* 0b01 : Lightning */
    /* 0b10 : USB A */
#ifdef USB_SEL_A
    set_gpio(P_GPIO_USB_SEL0, 0);
    set_gpio(P_GPIO_USB_SEL1, 1);
#else
    set_gpio(P_GPIO_USB_SEL0, 1);
    set_gpio(P_GPIO_USB_SEL1, 1);
#endif
so it looks like you just need to define USB_SEL_A to get that socket to work. The LED should swap over (see schematic or hw manual).

The low level USB software still wants to see VBUS though to tell it a host is present so ensure that you do:

Code: Select all

    set_gpio(P_GPIO_VBUS_EN, 1);
to get VBUS to drive back to the xmos chip (you can see this further down). This will also drive 5v out of USB A too so be careful about driving 5v against 5v!