I am newbie. Please help!

New to XMOS and XCore? Get started here.
photivs
Junior Member
Posts: 7
Joined: Fri Oct 04, 2013 9:03 am

I am newbie. Please help!

Post by photivs »

Hello there.
We would like to include in our audio project a USB2.0 input and for that reason we bought the XMOS "USB Audio 2.0 Reference Design" kit together with 6 pieces of XS1-U8R-64 microcontroller since was the only available in small quantities from Digykey which charged us an arm and a leg to ship all these goods to Europe. We also paid a ton of Euros for customs clearance. We hope Farnell.UK (of which we are customers many years ago) will stock shortly XMOS parts.
I installed the Thesycon driver in my PC (Win7-64bit) and i gave a try in the XS1-L1 USB evaluation board with success. Is a very good implementation with very good performance (i checked it with Virtins MI Pro FFT analyzer and i got a DNR in the region of 110dBFs, very reasonable for the Cirrus Logic audio CODEC used on the board) but it is useless for us from now on since we have to built a new custom board with XS1-U8R-64 which is a different micro. We plan to implement a test board including a SPDIF interface (Wolfson WM8804) a USB2.0 audio input (XS1-U8R) a DAC (Wolfson WM8741) and a quad 2:1 multiplexer to switch the I2S lines to the DAC between SPDIF and USB, to built and test the alternative source code that is necessary for the XS1-U8R before we transfer the design into our main project PCB.
Well, i have installed the Xtime Composer Studio 12.2.0 in my PC and the necessary JRE companion and the developement environment is working just fine. Now the problems: a) When i plug the XTAG-2 debugger and i press the corresponding USB button on control panel for hardware recognition i get a message that the connected hardware is "Unidentified".
b) I have downloaded the related file "USB-Audio-2.0-Software-v6.1" but i don't know which is the corresponding source code e.g. for the XS1-L1 board to give a try to flash the EPROM. It is a radical test to know if the Xtime Composer works without mistakes.
c) In the new trial PCB we have to design with XS1-U8R, i am not sure for the circuitry. In which ports should be connected the two XTALs? From which ports i should get the I2S output? d) What is the corresponding source code for the XS1-U8R to work in USB2.0 format providing just an I2S output? We don't need I2S input from an ADC neither SPDIF output neither MIDI input, we need just an I2S output for the DAC.
I have downloaded any manual was available from XMOS site, i have read for 5 days anything was possible and i am still very confused.
I don't know from where i should start. I am newbie.
Any help will be appreciated very much.


User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Post by lilltroll »

a) Do you still power the PCB with the USB cable ? Long time ago, but I think you need one cable to power the board and another cable/port for the XTAG2

b) Have you logged in on xmos.com and checked out "My XMOS" ?
You might need to subscibe etc.

At my XMOS place I can find
ver 6.1.0
USB Audio 2.0 XS1-L1 Software Release
Source code for the USB Audio 2.0 Reference Design
Download the version specific to your tools version


c) You should look for available 1 bit ports in the datasheet, both for I2S and clock input.
photivs
Junior Member
Posts: 7
Joined: Fri Oct 04, 2013 9:03 am

Post by photivs »

Thank you lilltroll for your reply!
lilltroll wrote:a) Do you still power the PCB with the USB cable ? Long time ago, but I think you need one cable to power the board and another cable/port for the XTAG2
I have tried any possible combination: a) XTAG-2 debugger joined with XS1-L1 USB Audio 2.0 board with both boards powered thru separate usb cables from separate usb ports of my PC. b) The same as previously but only with the XTAG-2 debugger connected to PC usb port. c) XTAG-2 debugger as stand alone (XS1-L1 Audio board removed) and connected to PC usb port. In all cases the related hardware is listed on Win7 device manager as "working correctly". In Xtime composer studio i press the "USB icon" button on the right table toolbar and the related "hardware connected scan window" pop-ups and i get as result that the hardware is Unidentified on the right table which ask me what is the hardware connected from a list of links to XMOS support.
lilltroll wrote:b) Have you logged in on xmos.com and checked out "My XMOS" ?
You might need to subscibe etc.
I created "My XMOS" account days ago (when i received the evaluation kit) but i don't knew it that there is need to make subscriptions for the software modules i downloaded. I did it just now.
lilltroll wrote:At my XMOS place I can find
ver 6.1.0
USB Audio 2.0 XS1-L1 Software Release
Source code for the USB Audio 2.0 Reference Design
Download the version specific to your tools version
Yes, after the subscription i can see the same at "My XMOS" subscriptions except "Download the version specific to your tools version" and "Source code for the USB Audio 2.0 Reference Design". What next? Should i download again the software from this specific place?
lilltroll wrote:c) You should look for available 1 bit ports in the datasheet, both for I2S and clock input.
What is the 1bit port? Its register has 1bit length? Can you explain me please? Or better: Could you suggest me 2 ports for the external XTALs and 4 for the I2S lines to DAC on the specific XS1-U8R-64 micro compatible with the source code writen for XS1-L1 micro used on evaluation board?

Thank you
Last edited by photivs on Sun Oct 06, 2013 7:08 pm, edited 1 time in total.
User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Post by lilltroll »

Check out page 8 in this datasheet
https://www.xmos.com/en/download/public ... 19D%29.pdf

If you look at I/O X0D00 you can read P1A, that is the first 1 bit port, you can go further on down to
X0D35 - P1L.

You probably will need a flash on your PCB, it is most often connected to port 1A-1D. Do not use them for your I2S.

1 bit port can be buffered and serialized - and that is what you need for I2S. If you write a 32 bit int to that port each bit will be written at the speed of the clock you connect to that port. This way you do not need to bitbang each bit, it will be done by the port logic.

An introduction to ports can be found here, page 4
https://www.xmos.com/en/download/public ... 50D%29.pdf
photivs
Junior Member
Posts: 7
Joined: Fri Oct 04, 2013 9:03 am

Post by photivs »

lilltroll wrote:Check out page 8 in this datasheet
https://www.xmos.com/en/download/public ... 19D%29.pdf

If you look at I/O X0D00 you can read P1A, that is the first 1 bit port, you can go further on down to
X0D35 - P1L.

You probably will need a flash on your PCB, it is most often connected to port 1A-1D. Do not use them for your I2S.

1 bit port can be buffered and serialized - and that is what you need for I2S. If you write a 32 bit int to that port each bit will be written at the speed of the clock you connect to that port. This way you do not need to bitbang each bit, it will be done by the port logic.

An introduction to ports can be found here, page 4
https://www.xmos.com/en/download/public ... 50D%29.pdf
Yes, i will certainly use an external flash EEPROM to store the program code as these micros are OTP type.
Yes, i can perceive the concept of 1bit port used in XMOS micros and i have read some pages of XS1-U8A-64 manual.
I have another one question: Should i use an external XTAL (13MHz) to clock the included into micro USB2.0 peripheral?
OK, i will do that: i will connect the two XTALs for the audio master clock oscillator at the same pins like in XS1-L1 micro. The same for the flash and the I2S lines to DAC.
I don't know how much should be modified the given source code written for XS1-L1 micro of evaluation board.
I still don't know in which sub-directory of "USB-Audio-2.0-Software-v6.1" is included the SOURCE CODE for XR-USB-Audio-2.0 evaluation board.
I still have the issue of "Unidentified" hardware when i plug the XTAG2 debugger in my PC.
I am not expert in C language so i will need some help to change the source code to fit in XS1-U8A micro.
I will try to upload a block diagram of my application tomorrow.

Thanks a lot
photivs
Junior Member
Posts: 7
Joined: Fri Oct 04, 2013 9:03 am

Post by photivs »

I am so sorry to say that, but i am some disappointed regarding XMOS and all related stuff.
I could not say that i have tried everything but i had no idea that the initial setup of hardware and application would be so difficult and complex, i haven't obtained nothing so far: XTAG2 debugger although its driver is correctly installed in Windows OS it still does not recognized by composser studio and i can't import the source code of usd2.0 audio ref design. Something is missing.
I haven't so much time left over to read so many manuals and docs although i spent 1 week on this. Based on my experience i do believe that something went wrong during installation of development environment or there is need for a lot of upgrades of software (and probably of hardware drivers? Where are?). Based on my experience i couldn't explain it in a different way.
Thank you very much
User avatar
johned
XCore Addict
Posts: 185
Joined: Tue Mar 26, 2013 12:10 pm

Post by johned »

For reference schematics for using the U series, I would recommend the DJ Kit, which uses the U6. You can get the schematics from the downloads section here : http://www.xmos.com/en/products/reference-designs/dj
For importing projects, this sounds like an Eclipse familiarity issue. Some Eclipse operations do take a little learning but once you have mastered it then it is very portable to other Eclipse installations. The standard procedure is :

The first stage is to create a workspace into which we will install the reference design software, using the following procedure :
File | Switch workspace | Other | Browse | Create New Folder
Give the folder the name of your workspace.
Next we need to import the projects within the software reference design archive into xTIMEcomposer as per XMOS Tools User Guide, Chapter 5 "Import or export a project in the XDE". We should use the following commands :
File | Import | General | Existing Projects into Workspace | Next
Select Archive File | Browse to the Archive File | Finish
Then you should be able to right click on the app (e.g. app_usb_aud_l1) and select Build.

Please note that it is important to import projects, rather than just unzipping them and opening as an Eclipse Workspace. The reason for this is that the import process resolves paths and dependencies.

To check the JTAG installation, in xTIMEcomposer :
Right click on the app you have just built and select : Debug As | Debug Configurations...
Double click on the xCORE Application. If you select Device options: | Run on: hardware. You should see the XTAG listed in the Target pull down menu. If you don't then you can hit Refresh and xTIMEcomposer will scan again.

Best regards,
John
mmar
Experienced Member
Posts: 123
Joined: Fri Jul 05, 2013 5:55 pm

Post by mmar »

photivs wrote:I am so sorry to say that, but i am some disappointed regarding XMOS and all related stuff.
I could not say that i have tried everything but i had no idea that the initial setup of hardware and application would be so difficult and complex, i haven't obtained nothing so far: XTAG2 debugger although its driver is correctly installed in Windows OS it still does not recognized by composser studio and i can't import the source code of usd2.0 audio ref design. Something is missing.
I haven't so much time left over to read so many manuals and docs although i spent 1 week on this. Based on my experience i do believe that something went wrong during installation of development environment or there is need for a lot of upgrades of software (and probably of hardware drivers? Where are?). Based on my experience i couldn't explain it in a different way.
Thank you very much
Ahh Xmos is ok, but you need go step by step.
1. Obtain and install ok Composer studio and xtag drivers.
2. Start with simple Hello world... Learn use make configs and xn files.
3. Use Xsoftip with more complex examples.
4. Download and test complicated projects as Audio design...

If you have trouble with XTAG try solve it first and then write about next...
photivs
Junior Member
Posts: 7
Joined: Fri Oct 04, 2013 9:03 am

Post by photivs »

johned wrote:For reference schematics for using the U series, I would recommend the DJ Kit, which uses the U6. You can get the schematics from the downloads section here : http://www.xmos.com/en/products/reference-designs/dj
For importing projects, this sounds like an Eclipse familiarity issue. Some Eclipse operations do take a little learning but once you have mastered it then it is very portable to other Eclipse installations. The standard procedure is :

The first stage is to create a workspace into which we will install the reference design software, using the following procedure :
File | Switch workspace | Other | Browse | Create New Folder
Give the folder the name of your workspace.
Next we need to import the projects within the software reference design archive into xTIMEcomposer as per XMOS Tools User Guide, Chapter 5 "Import or export a project in the XDE". We should use the following commands :
File | Import | General | Existing Projects into Workspace | Next
Select Archive File | Browse to the Archive File | Finish
Then you should be able to right click on the app (e.g. app_usb_aud_l1) and select Build.

Please note that it is important to import projects, rather than just unzipping them and opening as an Eclipse Workspace. The reason for this is that the import process resolves paths and dependencies.

To check the JTAG installation, in xTIMEcomposer :
Right click on the app you have just built and select : Debug As | Debug Configurations...
Double click on the xCORE Application. If you select Device options: | Run on: hardware. You should see the XTAG listed in the Target pull down menu. If you don't then you can hit Refresh and xTIMEcomposer will scan again.

Best regards,
John
Many thanks John for the advices.
Sincerelly it was a different way from what is described in " USB Audio 2.0 Reference Design XS1-L1 Quick Start" pdf 6 page document. You might take care on it.
Following your instructions i ascertained that XTAG2 debugger is indeed recognized from xTIMEcomposer.
According to your advice i managed to open the zip file and to built the "app_usb_aud_l1" in which included all applications e.g. 1ioms, 1ioxs, 2ioms etc. Then i tried to locate the C file that contains the source code for XR-USB-AUDIO-2.0 and i selected the "2ioxs" which i suppose contains the corresponding source code for the evaluation board. Then i did click on Flash and i can confirm you that the XTAG2 works just fine: the on board flash eeprom deletted and the USB2.0 Audio evaluation board does not operates anymore. Success!
As you could understand the eeprom is flashed with wrong code, or simply is deletted.
Now i have to locate the correct SOURCE CODE, to open it on... i don't know, and to flash again the eeprom.
Unfortunatelly i don't know were is hidden the source code.
Finally the thing proved by far most difficult from our initial estimation, the xTIME composser is a very complex development environment.
Many thanks again
mmar
Experienced Member
Posts: 123
Joined: Fri Jul 05, 2013 5:55 pm

Post by mmar »

If your project tree is as on screenshot, then main.c locate by path from top.
First directory app_usb_aud_l1 contains CPU type relevant code for L1 variants.
Next two have identical make sources for SU1 variants.

First for flash is click right on first line app_usb_aud_l1 and select build configurations = set active = for you 2ioxs, then right click and clean project. Console reply :

**** Clean-only build of configuration 2ioxs for project app_usb_aud_l1 ****

xmake CONFIG=2ioxs clean
"Cleaning ..../audio6_1/app_usb_aud_l1"
cmd /c if exist ".\bin\2ioxs" RMDIR /S /Q ".\bin\2ioxs"
cmd /c if exist ".\.build_2ioxs" RMDIR /S /Q ".\.build_2ioxs"

Right click and choice build project.

After build complete without errors you can flash .
Use (create) flash config with project first line app_usb_aud_l1 selected.

After flash turn off and on audio dev board.
You do not have the required permissions to view the files attached to this post.