Two USB audio stacks running on two XLinked XMOSes Topic is solved

If you have a simple question and just want an answer.
Post Reply
Dohny
Member++
Posts: 26
Joined: Tue Dec 03, 2013 6:57 pm

Two USB audio stacks running on two XLinked XMOSes

Post by Dohny »

Hello guys,

just dealing with another design and this time we are implementing XU216 and XUF208 in one design, we will connect them thru XLink and XTAG so we can boot all three tiles from one flash from the XUF208.

Do I understand correctly that now I will have to have one project with three tiles in xTimeComposer? In that case, what is the way to do two USB audio stacks as each XMOS is connected to a host PC? We then send the audio from XUF208 to XU216 over I2S for more processing, but we have that working. The whole point of this is just having one programming header and one DFU, we don't even need the XLink communication, we are good with uart. So if there is a way to merge two binnaries/XE+XN files, that is better for us. If not, then how can we have two UAC2 stacks running with different PIDs and vendor info on two MCUs merged/connected like this?

Thank you very much.


View Solution
User avatar
akp
XCore Expert
Posts: 578
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

This won't help you but I am interested to know why you are using I2S to send the audio between the two chips rather than xConnect?
Dohny
Member++
Posts: 26
Joined: Tue Dec 03, 2013 6:57 pm

Post by Dohny »

Well, we didn't get to that stage yet. We have two XMOSes on the board with their separate JTAG headers working. Now we found out that we can have one flash memory and boot both MCUs, which simplifies our design a lot because we need to have working DFU in both MCUs.
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

I think the issue is that sc_xud (and other parts of USB audio) was never designed to be instantiated more than once in the same project (uses globals).
If you want a single flash (and have the tools handle the complications of network setup and distribution of the program at boot) then they would need to be part of the same project.
I have seen cases of renaming/prefixing all of the global symbols to crudely allow two instances but it's time consuming (many days of renaming) and error prone and not recommended.
So by far the easiest solution would be to have two projects/binaries and connect either via I2S or xlink. If you go the xlink route this may be helpful:

http://www.xmos.com/download/private/AN ... rc4%29.pdf

If you really don't want two flashes then this may help too:

https://www.xmos.com/support/appnotes/AN00238

although the USB DFU mechanism will require some thought
Post Reply