Migrating from XHRA to XU208

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
MDuprau
Junior Member
Posts: 6
Joined: Wed Sep 26, 2018 11:27 pm

Re: Migrating from XHRA to XU208

Postby MDuprau » Mon Oct 01, 2018 3:12 pm

mon2 wrote:Mark,

1) try to boot a simple led blinky code on your custom pcb. Does that boot from your flash and work?

2) if yes, try different usb cables that are fully loaded (4 wires) and your usb audio ip. Work? No, then apply xmos usb ip like usb cdc, usb hid to validate if any usb ip works on your pcb.

3) if still failing, post relevant parts of your schematic in pdf format for a review.


Hello,

thnx for your answers, but in the first step will eleminate the posible "problems" i already postet here :
[?] gpio_defines.h @ sw_usb_audio\app_usb_aud_xu208_xhra\src\extensions is right ?
#define P_GPO_LED_A 0
#define P_GPO_LED_B 1
#define P_GPO_MCLK_SEL 3
[?] reason why "set_gpio((1<<P_GPO_DAC_RST_N), 1);" can/must replace "set_gpio(1<<P_GPO_MCLK_SEL, 1);" ?
[?] compile project "app_usb_aud_xu208_xhra" with "Makefile" -> Target "xhra_xcore" (default) for the "XU208-128-TQ64-C10" ?
[?] HEX-Dump from "app_usb_aud_xu208.bin" : "7d 30 00 00 f3 37 00 09 00 b5 00 00 00 00 02 00" it looks differently from other BIN-files i have seen here, is that the right start sequence ?
[?] initialisation/update for the XMOS flash "IS25LQ016B-JNLE" goes over a ATXMEGA (XU208-128-TQ64-C10 is offline in this case), is there a need to change the data from "app_usb_aud_xu208.bin" or can it program one by one ?

Best regards Mark Duprau
MDuprau
Junior Member
Posts: 6
Joined: Wed Sep 26, 2018 11:27 pm

Postby MDuprau » Tue Oct 02, 2018 7:57 am

Hello,

implement a logic analyses over a "Saleae Logic Pro 8" :
- 3V3 @ 0.211.45s
- RST @ 0.222.58s
- D0H @ 0.222.617.50s (D0 to High)
- CS @ 0.222.617.76s
- BGN @ 0.222.62s
- END @ 0.227.47s
- NXT @ 0.659.52s
- END @ 0.664.38s
- NXT @ 1.096.43s
- END @ 1.101.29s
- NXT @ 1.533.34s
- END @ 1.538.20s
... and so on, the XU208 get the code from flash again and again

Best Regards Mark Duprau
MDuprau
Junior Member
Posts: 6
Joined: Wed Sep 26, 2018 11:27 pm

Postby MDuprau » Tue Oct 02, 2018 8:14 am

Hello,

and the timing for 3V3, 1V0, RST :
- 3V3 @ 0.233.92s
- 1V0 @ 0.234.15s
- RST @ 0.244.99s

Best Regards Mark Duprau
MDuprau
Junior Member
Posts: 6
Joined: Wed Sep 26, 2018 11:27 pm

Postby MDuprau » Wed Oct 03, 2018 6:30 pm

Hello,

after the hardware-check with the "saleae pro 8" i go back to check the software/firmware/project, maybe not all of the following steps are necessary :

#1 change inside the "Makefile" the "Target" from "xhra_xcore.xn" to "XUF208-128-TQ64-C10 Device" and import the "XUF208-128-TQ64-C10.xn" (why is inside the "xhra_xcore.xn" the "XUF208-256-TQ64-C20" ?)
#2 import the "Audio Ports" and "USB Ports" sections from "xhra_xcore.xn" to "XUF208-128-TQ64-C10 Device.xn", include some other small delta
#3 make a "Clean"
#4 change some of the hooks from "Used Modules" and remove some unused "#includes" so that the error msg count to zero
#5 make a "Build Project"
#6 convert the new "XE" to "BIN" and but it on the flash one by one

Power on ... Connect LED on, Device online on USB, Audio stream works but sound is bad, the reason the interface wait for a "LJ" signal.
Some changes on die "module_audio_usb/audio.xc" like "p_lrclk <: 0x80000000;" to "p_lrclk <: 0x00000000;" and "p_lrclk <: 0x7FFFFFFF;" to "p_lrclk <: 0xFFFFFFFF;" ... enable "LJ" and everything works fine.
Next steps is to clean up a bit and remove some of the unused functions.

Best Regards Mark Duprau
DHembree
Experienced Member
Posts: 74
Joined: Fri Apr 15, 2016 6:46 pm

Postby DHembree » Thu Oct 04, 2018 3:13 pm

I've asked this question in a separate post, but I feel it needs to be asked within the the context of this thread...

Has anyone had experience using the variable samRes_DAC as it is passed to AudioHwConfig in audiohw.xc within this XHRA to XU208 framework?

It appears to work in app_usb_aud_xk_216_mc, but within app_usb_aud_xu208_xhra it is always 32 regardless of the incoming stream resolution.

PLEASE HELP!
Wavelength
Member
Posts: 9
Joined: Mon Sep 24, 2018 9:56 pm

Postby Wavelength » Tue Oct 09, 2018 5:04 pm

In the customdefines.h you may want to comment out this line:

/* Resolution of PCM interface */
#define HS_STREAM_FORMAT_OUTPUT_1_RESOLUTION_BITS 32

I am not sure if that is what is causing your problem but I did notice the same thing in my setup.

Thanks,
Gordon
Wavelength
Member
Posts: 9
Joined: Mon Sep 24, 2018 9:56 pm

Postby Wavelength » Tue Oct 09, 2018 5:10 pm

infiniteimprobability,

Hey thanks for your source code. I tried the AN1027 app note and had a terrible time as things would crash and code would not be implemented correctly because of the ifdefs. I spent 3 weeks on 3 different computers a total of six times from scratch and I had no luck in getting anything to work. Taking that XU216 code base and adapting it to the XU208 is just a bit silly.

I took your code ported to the 48pin part on my board in about 4 hours.

I wish I would have started with you code first as I might have been done by now.

Thanks again,
Gordon

Who is online

Users browsing this forum: No registered users and 18 guests