USB Audio 2.0 won't compile with DFU disabled

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

Is there any reason I can't use bit 0 of a 4-bit port instead of a 1-bit port? If I change XS1_PORT_1F to XS1_PORT_4C (or 4D) in the XN file then USB enumeration fails. Our XTAG seems to have gone missing so I'm not sure exactly where it's falling over.
I'm afraid not You will be getting an exception. Take a look at the api for set_clock_src in xs1.h...
Ah - I was thinking that the frequency was fixed by the PLL multiplier set by the MODE[1:0] pins, and that the XN file had to reflect that.
It does, but only initially. The second stage bootloader (the one loaded from flash) re-programs the PLL at boot time according to the xn settings before the main image is loaded and run.


ChrisW
Member
Posts: 11
Joined: Tue Apr 22, 2014 11:36 am

Post by ChrisW »

OK I've gone with port 1C instead. It's normally the SPI clock but isn't needed after booting, so I set it as an input and the FPGA can drive at as MCLK. Seems to be working nicely now - still on 6.11.4 though.

Many thanks for all your help infiniteimprobability.
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

Reusing SPI is absolutely fine, unless of course you want to use DFU at a later date, in which case you'll have to think about muxing..
Seems to be working nicely now - still on 6.11.4 though.
Good news! Updating a working configuration to the latest ref design version *should* be very straightforward.
Post Reply