Migrating from XHRA to XU208

Discussions about USB Audio on XMOS devices
just280
Member++
Posts: 22
Joined: Tue Nov 01, 2016 9:02 am

Post by just280 »

No luck programming the spi flash out of circuit. The XU208 still does not enumerate?
I just want to reiterate that my custom board closely resembles the circuit of the XK-USB-AUDIO-HPA board and has worked perfectly until I fitted the XU208, so I don't think PCB layout, USN traces or power will be an issue. I think I'm doing something stupid with the software compile. Does anyone have a compiled binary that will work on the XK-USB-AUDIO-HPA?


just280
Member++
Posts: 22
Joined: Tue Nov 01, 2016 9:02 am

Post by just280 »

** Update **

Turns out that I had the 384K_EN tied high on my original circuit which is X0D06 pin on the XU208 used for boot configuration - need to be tied low for QSPI boot.
Circuit now enumerates on PC as 'xCORE-AUDIO Hi-Res 2' but my new problem is it won't stream audio!!!! If I go into sound properties on my PC the xCORE device has no properties to change like bit rate?

Any clues?
just280
Member++
Posts: 22
Joined: Tue Nov 01, 2016 9:02 am

Post by just280 »

** Update 2 **

Installed the XMOS evaluation drivers and I get streaming... yey!
But why does it not work on the Microsoft native audio class 2 drivers of which the XHRA worked?
sleepfox
Member++
Posts: 16
Joined: Fri Jun 01, 2018 5:03 pm

Post by sleepfox »

Hi, I have almost finished the PCB and have a few hardware questions before print.

1) What is the output impedance of XMOS and what is the correct resistance to source terminate the I2S signal ouput (target characteristic impedance of 50ohm)? 33ohm?

2) I plan to use XUF208 and thus do not need to use external spi flash. Therefore the 1-bit pin X0D00 is available. Can I use this for SPDIF output? I checked XUF208 document and it is not reserved. However, better check here with experts.

3) My pcb will be self-powered and will not use USB power. In this case, can I simply pull down the USB_VBUS pin to ground with a 47K resistor paralled with 0.1uf cap, WITHOUT connecting to the power pin of USB connector (through 10K cap and further paralled with 2uf cap)?

Thanks.
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

@sleepfox, please post your schematic and if possible the pcb layout in pdf format for a review before building the bare pcb.
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

1) - They are FETs so not true resistors. However around 30 ohms is a reasonable approximation for 8mA drivers and 50 ohms for 4mA drivers
2) - Yes, OK to use x0d00 as the internal FLASH variant only reserves the QSPI pins
3) - Self powered system needs to observe VBUS (it's not a supply, it's a comparator input) to know when the host is connected.

mon2's offer to look a the schematics is a good one... He's done a lot of XMOS designs..
sleepfox
Member++
Posts: 16
Joined: Fri Jun 01, 2018 5:03 pm

Post by sleepfox »

Hi, Mon2 and infiniteeimprobability, thank you both for the replies. Just back from a road trip. I will post the schemtic tonight. Quite messy so need to clean it up a little first. It is a very simplied version of the original XHRA usb interface though.
sleepfox
Member++
Posts: 16
Joined: Fri Jun 01, 2018 5:03 pm

Post by sleepfox »

Hi, attached is the schematics. I am not good at creating good looking altium components and thus some parts are really messy. Has cleaned it up a bit, add a few notes and hopefully it is good now.

Anyhow, it is a simplified version of XHRA usb to i2s interface. It is self-powered and its audio clock is supplied externally (and so nothing but a u.fl connnector for MCLK_in). Also I use a slight different power monitor ic for the required boot sequence. I am building this PCB mainly to investigate if a very good and dedicated audio clock is supplied at the beginning of the chain (USB interface) and at the end of the chain (DAC), will the sound be improved?

About the previous three questions asked.

(1) the PCB will be 4-layered so as to make sure that the USB differential signal trace have correct characteristic impedance of 90ohm (45 for each line), and that the i2s signal transmission line has a controled impedance of 50ohm. For i2s transimission line, to keep the 50-ohm impedance, I source-terminate the i2s lines with resistors R01~R03. And the resistence should be such that: "i2s output impedance of XMOS + source termination resistance = 50ohm". That is why I asked the first question about output impedance.

I tended to use 33ohm since most of the cmos device has output impedance of about 15ohm, that will add up to about 50 (48 actually).

(2) thanks for the answer. I've got it. :)

(3) VBUS connection. Still very confused about this one. I did a search and found similar question asked:
https://electronics.stackexchange.com/q ... -host-port

Need to digest a bit before my head can be cleared of cloud.

By the way, I removed one of the LEDs and use the correspondent pin as FSEL, which selects the audio clock frequency. I suppose that would be fine as well? Not sure if I will ever use this one though -- my collection of music files are mostly 44.1k and dsd64, and therefore I might just use 22.5792mHZ or 11.2896mHz. That should further simplify tasks and codes should be easy to modify correspondently. The external discrete audio oscillator will be built with a very high-qualitied AT-cut crystal.

Thanks a lot again.
Attachments
XMOS_Schematics.pdf
(28.04 KiB) Downloaded 829 times
XMOS_Schematics.pdf
(28.04 KiB) Downloaded 829 times
DHembree
Experienced Member
Posts: 75
Joined: Fri Apr 15, 2016 6:46 pm

Post by DHembree »

Question regarding audiohw.xc:

Regardless of the files I stream, even the Windows test tones under the device properties where a variety of sample rates and bit depths can be selected and played, samRes_DAC is never what is expected and appears to be perpetually 32.

Thoughts?
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

@sleepfox, just noted your posted schematic.

1) What are the values for R3, R4 & R5?

2) Can you explain how the LT3045 is working with regards to the voltage divider and PGFB pin 7 of this LDO?

3) A typical wiring diagram for this LDO is as attached. It does not appear that you have the proper voltage divider circuit using the 2 resistors to define the +1v0 you wish to to generate for this design. The resistor values shown in the attachment are for a +3v3 output so you will need to offer the proper resistor values to yield an output of +1v0 using the formula presented inside their datasheet.

Can you check to see what voltage is being generated by this LDO? If it is > +1v0 then most likely the XMOS CPU will be permanently damaged.
Attachments
LT3045_typical.png
(54.52 KiB) Not downloaded yet
LT3045_typical.png
(54.52 KiB) Not downloaded yet
Post Reply