xCORE 200 basic questions

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
ben
New User
Posts: 2
Joined: Tue Feb 09, 2021 12:21 am

xCORE 200 basic questions

Postby ben » Tue Feb 09, 2021 12:24 am

I have the XCORE-200 MULTICHANNEL USB AUDIO, which has 8 audio I/O. When connected to the PC, it shows only one sound card. How do I:
1) Change it in the XMOS firmware to have 8 channels?
2) Give each I/O a different sound card name?

I found where you can change the device name in the devicedefines.h, but am not sure how to have set to 8 channels.

I am a novice, and will greatly appreciate any help. Thanks!
User avatar
dsteinwe
Experienced Member
Posts: 83
Joined: Wed Jun 29, 2016 8:59 am

Postby dsteinwe » Thu Feb 18, 2021 4:07 pm

You can find the corresponding informations in manual https://www.xmos.ai/file/usb-audio-soft ... sign-guide in the chapter "5 Programming Guide". There is described how to configure, enable and disable features.
ben
New User
Posts: 2
Joined: Tue Feb 09, 2021 12:21 am

Postby ben » Mon Mar 01, 2021 7:24 pm

Thank you for your help!

I have successfully setup the demo board, but am wanting to do a new design, except with more codec's.

My questions are:
1) What would the general steps be for connecting a Codec to the XMOS chip? For example, if I was wanting to use the CS42448 codec and connect it to the XMOS chip.
2) Where specifically in TimeComposser do I program the pin/port GPIO assignments? For example, I noticed that the ADC SD1 pin goes to the X0D24 xCORE GPIO pin. Where in TimeComposser do I program this pin as an Analog input pin?
3) If I had multiple codecs, could I have one codec on one Tile, and another on the other Tile, and still be able to mix audio? Or does mixing audio require all the codecs to be on the same Tile?

Thanks!
User avatar
dsteinwe
Experienced Member
Posts: 83
Joined: Wed Jun 29, 2016 8:59 am

Postby dsteinwe » Tue Mar 02, 2021 10:23 am

1) What would the general steps be for connecting a Codec to the XMOS chip? For example, if I was wanting to use the CS42448 codec and connect it to the XMOS chip.
It's not like with the STM32CubeIDE, where you configure your mcu and a code generator generates tons of code. You can simply start with a clean new project. And that is the better approach. Promised!
2) Where specifically in TimeComposser do I program the pin/port GPIO assignments? For example, I noticed that the ADC SD1 pin goes to the X0D24 xCORE GPIO pin. Where in TimeComposser do I program this pin as an Analog input pin?
Simply define a port as input in your code like that code example:

Code: Select all

in port mySD1 = XS1_PORT_1P;
Now, it is ready to use. That's all. Read this doc https://www.xmos.ai/download/Introducti ... rts(3).pdf to get an idea of ports, what features they offer. Have a look at some sample code to learn more about programming XMOS processors. It's different to ARMs, but I think, it is more flexible, powerful and straight forward.
3) If I had multiple codecs, could I have one codec on one Tile, and another on the other Tile, and still be able to mix audio? Or does mixing audio require all the codecs to be on the same Tile?
There are no restrictions, on which tile you connect a codec. It's not an ARM or like that.
User avatar
akp
Respected Member
Posts: 492
Joined: Thu Nov 26, 2015 11:47 pm

Postby akp » Tue Mar 02, 2021 12:44 pm

A couple caveats. There are limited resources to move data from one tile to another. There is a switch matrix and it's accessed through resources called channels. Each channel has two channel ends (chanends) and there are only 32 chanends per tile. But there are even fewer paths from one tile to another over the switch matrix, so you can get jammed up there. In my opinion it's better if you don't have to move data from one tile to another and then back again too much. Especially high bandwidth, real time data where you want to use dedicated "streaming" channels which don't release the switch matrix for use by other tasks.

That's to say if you can keep all your audio pretty much on one tile you'll have more flexibility to mix it etc and then put your mixed data over a single streaming channel to the USB (or vice versa for a DAC) for instance. Not to say it won't work, but it might make things a bit easier for you if you can fit all your audio IO and mixing on one tile, and use the other tile for different tasks.

The OP asked about analog inputs. There are no analog inputs to an xCORE-200 part. You'll have to use an external sensor ADC if you need to do some kind of sensing like input voltage or thermistor or something, whereas that's something you can do internally on most ARM MCUs like STM32.

Who is online

Users browsing this forum: No registered users and 2 guests