Hi,
I have made breakout board for XU216-512-TQ128 and i wanted to use it as basic USB->I2S converter. Now its time to port software, but I must confess, I am newbie in regards to MCU programming and i have real trouble with that. Could someone tell me how to change XU208-XHRA software to run on XU216?
I appreciate all help :)
Migrating from XHRA to XU208
-
- New User
- Posts: 2
- Joined: Mon Oct 28, 2019 3:58 pm
-
- Active Member
- Posts: 35
- Joined: Wed Jan 24, 2018 9:13 am
Attached project is an usb2i2s bridge working on explorerkit XE216-512-TQ128. I have used an01027 as a guide to port from app_usb_aud_mc to explorerkit. You will have to adapt the code so that you can switch between 44.1k and 48k sample rates. That's goes into src/audiohw.xc. I have tested it with Si5340 and adau1467 dev boards.
i2s signals are on (see XCORE-200_EXPLORER.xn file for port details)
x0d23 bclk
x0d22 lrclk
x0d13 mclk audio
x0d36..39 i2s data
x1d35 mclk audio
Hope that it helps you a little bit.
i2s signals are on (see XCORE-200_EXPLORER.xn file for port details)
x0d23 bclk
x0d22 lrclk
x0d13 mclk audio
x0d36..39 i2s data
x1d35 mclk audio
Hope that it helps you a little bit.
You do not have the required permissions to view the files attached to this post.
-
- New User
- Posts: 2
- Joined: Mon Oct 28, 2019 3:58 pm
Hi, thank you very much!
Do I need to provide MCLK for both pins?
Do I need to provide MCLK for both pins?
-
- Active Member
- Posts: 35
- Joined: Wed Jan 24, 2018 9:13 am
Yes. Each tile needs its own mclk audio.
-
- Member
- Posts: 10
- Joined: Wed Jan 08, 2020 8:34 am
Hello!
I'm trying to port the old XHRA design to XU208 hardware. I followed all the steps but I get a build error when building the project:
Anybody got an idea on how to fix this?
I'm trying to port the old XHRA design to XU208 hardware. I followed all the steps but I get a build error when building the project:
Code: Select all
xmake CONFIG=Default all
Checking build modules
Using build modules: module_dfu module_i2c_shared module_i2c_single_port module_spdif_tx module_usb_audio module_usb_device module_usb_shared module_xud module_locks
Creating app_usb_aud_xu208_xhra.xe
cd .build && xcc -DFLASH_MAX_UPGRADE_SIZE=64*1024*3 -fcomment-asm -Xmapper --map -Xmapper MAPFILE -O3 -report -fsubword-select -save-temps -g -DXUD_SERIES_SUPPORT=4 -march=xs2a -DUSB_TILE=tile[0] -DQUAD_SPI_FLASH=1 -lquadflash -L "E:\XMOS\sw_usb_audio-[sw]_6.15.2\sc_xud\module_xud\lib" -lxud_x200 @_obj.rsp "..\.\src\core\xhra_xcore.xn" -o "..\bin\\app_usb_aud_xu208_xhra.xe"
xcc1: terminated due to internal unrecoverable error
For bug reporting instructions, please see:
http://www.xmos.com/support
xmap: Error: Failed to compile multi-tile main.
xmake[1]: *** [bin//app_usb_aud_xu208_xhra.xe] Error 1
xmake: *** [bin//app_usb_aud_xu208_xhra.xe] Error 2
-
- Member
- Posts: 10
- Joined: Wed Jan 08, 2020 8:34 am
Hi, all. This problem is solved. I rebuild this project on windows7 and then success with some warnings... So, it is just a bug that xtimecomposer maybe not stable in windows10...syeric wrote: ↑Fri Jan 17, 2020 3:42 am Hello!
I'm trying to port the old XHRA design to XU208 hardware. I followed all the steps but I get a build error when building the project:Anybody got an idea on how to fix this?Code: Select all
xmake CONFIG=Default all Checking build modules Using build modules: module_dfu module_i2c_shared module_i2c_single_port module_spdif_tx module_usb_audio module_usb_device module_usb_shared module_xud module_locks Creating app_usb_aud_xu208_xhra.xe cd .build && xcc -DFLASH_MAX_UPGRADE_SIZE=64*1024*3 -fcomment-asm -Xmapper --map -Xmapper MAPFILE -O3 -report -fsubword-select -save-temps -g -DXUD_SERIES_SUPPORT=4 -march=xs2a -DUSB_TILE=tile[0] -DQUAD_SPI_FLASH=1 -lquadflash -L "E:\XMOS\sw_usb_audio-[sw]_6.15.2\sc_xud\module_xud\lib" -lxud_x200 @_obj.rsp "..\.\src\core\xhra_xcore.xn" -o "..\bin\\app_usb_aud_xu208_xhra.xe" xcc1: terminated due to internal unrecoverable error For bug reporting instructions, please see: http://www.xmos.com/support xmap: Error: Failed to compile multi-tile main. xmake[1]: *** [bin//app_usb_aud_xu208_xhra.xe] Error 1 xmake: *** [bin//app_usb_aud_xu208_xhra.xe] Error 2
I used oracle jre8u212 and xtimecomposer 14.3.3.
-
- Member++
- Posts: 16
- Joined: Wed May 12, 2010 10:00 pm
Can someone explain what the following code means:
/* Put DAC in reset. All LEDs off */
set_gpio((1<<P_GPO_DAC_RST_N), 0);
I think the value 0 goes to P_GPO_DAC_RST_N, and something is shifter to the left?
Thanks.
/* Put DAC in reset. All LEDs off */
set_gpio((1<<P_GPO_DAC_RST_N), 0);
I think the value 0 goes to P_GPO_DAC_RST_N, and something is shifter to the left?
Thanks.
-
- XCore Legend
- Posts: 1913
- Joined: Thu Jun 10, 2010 11:43 am
@rlim, you are very close on your understanding.Can someone explain what the following code means:
/* Put DAC in reset. All LEDs off */
set_gpio((1<<P_GPO_DAC_RST_N), 0);
I think the value 0 goes to P_GPO_DAC_RST_N, and something is shifter to the left?
In your project, search for the definition (define) for the label P_GPO_DAC_RST_N. Note this value.
Let us assume it is a value of 3, the following line of code will:
Code: Select all
/* Put DAC in reset. All LEDs off */
set_gpio((1<<P_GPO_DAC_RST_N), 0);
Code: Select all
/* Put DAC in reset. All LEDs off */
set_gpio((1<<3), 0);
Code: Select all
/* Put DAC in reset. All LEDs off */
set_gpio((000100b, 0);
Code: Select all
/* Put DAC in reset. All LEDs off */
set_gpio(4, 0);
-
- Member++
- Posts: 16
- Joined: Wed May 12, 2010 10:00 pm
Thanks mon2. I do appreciate your time. P_GPO_DAC_RST_N is indeed defined as 3, and it's tied to the MSB of P4D. Could it be that you are one bit off, meaning shifting 1 to the left by 3 results in 1000b? I am just going by inference, because P4D0(the lsb) is P_GPO_LED_A, defined as 0. And if we want to set that high, then it would be set_gpio((1<<0,1). Am I making sense?
-
- Member++
- Posts: 22
- Joined: Tue Nov 01, 2016 9:02 am
Hi. I've been using the XU208 using the XHRA migrating firmware for a number of years successfully but I now have a requirement to know the current sample rate of the stream. I see on the original XHRA data sheet that GPIO_3, GPIO_4 and GPIO_5 would toggle according to the active sample rate. I know GPIO_3 toggles as I use that as an indicator to switch clocks. GPIO_4 and 5 on the other hand do not seem to toggle? Is there a way of enabling them to? The firmware I'm using is 6.15.2. Thanks