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.
Hello ad first problem
-
Verified
- XCore Legend
- Posts: 1135
- Joined: Thu May 27, 2010 10:08 am
Engineer at XMOS
-
- Junior Member
- Posts: 7
- Joined: Mon Oct 09, 2017 10:22 am
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
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
-
Verified
- XCore Legend
- Posts: 1135
- Joined: Thu May 27, 2010 10:08 am
hi,
yes it should be. In audiohw.xc you can see the following section:
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:
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!
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
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);
Engineer at XMOS
-
- Member
- Posts: 13
- Joined: Mon Oct 09, 2023 9:45 pm
What is `USB_SEL_A`? It seems to disable `XUD_UserSuspend` and `XUD_UserResume` if not defined?so it looks like you just need to define USB_SEL_A to get that socket to work.
Last edited by jb123 on Wed Apr 17, 2024 10:30 pm, edited 1 time in total.
-
- Member
- Posts: 13
- Joined: Mon Oct 09, 2023 9:45 pm
Apparently it enables a USB A port on the XK-AUDIO-216-MC-AB? To act as a USB Host?
Code: Select all
6.12.3
------
* ADDED: Added roleswitch compatible build config to app_usb_aud_x200
* CHANGE: iPod detect code upataed and USB mux set appropriately for
roleswitch (guarded by USB_SEL_A)
Code: Select all
#Audio Class 2, iAP enabled, Input, Output, No, No SPDIF Tx. Select USB A port. Ignore VBUS.
#Note, this is the config used for Apple role-switch
XCC_FLAGS_2ioxx_usba_mfi = $(BUILD_FLAGS) -DIAP=1 -DMIDI=0 -DSPDIF_TX=0 -DUSB_SEL_A=1 -DXUD_PWR_CFG=0
INCLUDE_ONLY_IN_2ioxx_usba_mfi =
9
USB Connectivity
The USB connectivity section consists of a USB A connector, USB B connector and a
high-speed 3:1 switch to select between them.
So this is mostly irrelevant now that "USB Device Mode is not recommended for most accessories"?MFi support for Apple Host Mode and USB Role Switch