USB-Audio-2.0 Port Reconfiguration possible? Topic is solved

If you have a simple question and just want an answer.
Maran
Junior Member
Posts: 6
Joined: Wed Nov 19, 2014 4:48 pm

USB-Audio-2.0 Port Reconfiguration possible?

Post by Maran »

In order to toggle an ADC I need to declare one free port as an output port, that outputs a custom bit string.

Is it possible to use the XS1_PORT_1L because the SPDIF/OUT in this case is not necessary?

Declaration as:

out buffered port:32 test = XS1_PORT_1L;

test <:0b......... doesn´t work.

Which Scripts have to be changed?

I use the USB-Audio-2.0-Device-Reference-Design-Software(6.6.0).

 

Thank you very much for any request!

 

 

View Solution
User avatar
infiniteimprobability
Verified
XCore Legend
Posts: 1164
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

Yes - this should be absolutely fine.

The key thing is to use a build with SPDIF output disabled. (eg 2iomx) or make sure  -DSPDIF=0  is specified in the  makefile. The SPDIF port is then free for you to use as you wish.

By "not working" is it a compile error or just nothing on the port?

If the port is not working now, then it's likely a port setup issue - sounds like you want to output a serialised bit pattern?

The attached example does that - but you may well want to setup a clock block to divide the port down otherwise it will clock out at 100MHz.. It'll all be over in 320ns..

The document https://www.xmos.com/download/public/In ... s(1.0).pdf is a very good place to start with ports.

 



Engineer at XMOS
Maran
Junior Member
Posts: 6
Joined: Wed Nov 19, 2014 4:48 pm

Post by Maran »

Great it works!

I placed it now in the main.xc and the output is totally correct.

Now I try to divide the clock(ref = XS1_CLKBLK_1) by using the function configure_clock_ref(), so your suggestion was right.

I hope this works!