samRes_DAC (within audiohw.xc) always 32

Technical discussions around xCORE processors (e.g. xcore-200 & xcore.ai).
DHembree
Experienced Member
Posts: 75
Joined: Fri Apr 15, 2016 6:46 pm

samRes_DAC (within audiohw.xc) always 32

Post by DHembree »

I am attempting to write some code within audiohw.xc that responds to conditions defined by samRes_DAC, but the value is always 32 regardless of the stream.

I'm not sure what else to provide other than I'm using the Thesycon evaluation driver.

Thanks,
Dan


User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

Which version are you using? I checked the signal path in 6.15.2rc2 and it goes from:

Endpoint 0 - interface change (SET_STREAM_FORMAT_OUT) outputs a channel
usb_buffer - sets a shared memory flag
decouple - reads the flag and sends the stream format change to:
audio..

All seems to be well in the source. Are you sure the host is changing the USB interface?
DHembree
Experienced Member
Posts: 75
Joined: Fri Apr 15, 2016 6:46 pm

Post by DHembree »

I am running 6.15.2rc1. Is there any reason to suspect this version is causing the issue?

Do you have any recommendations as to how I can verify what the host is sending? I am using Foobar2000 to stream. Windows has some test tones that can be played back at a variety of sample rates and bit depths (within the playback device properties). I can see no change in samRes_DAC with altering these settings.
DHembree
Experienced Member
Posts: 75
Joined: Fri Apr 15, 2016 6:46 pm

Post by DHembree »

Also, where can I verify the Endpoint, usb_buffer, etc. that you mentioned?
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

I would recommend making sure xscope is on (-fxscope and -DXSCOPE) is switched on (this will mean it won't break realtime) and printing the value as the stream change command propagates through from EP0 down to audiohwconfig().
If you want to check the the App running on your host has properly changed the interface (each bit resolution option will present itself as a USB Alternate interface) then a USB analyser of some sort will be needed. I use a beagle (in circuit) but I understand that software analysers are available that can capture USB transactions.
DHembree
Experienced Member
Posts: 75
Joined: Fri Apr 15, 2016 6:46 pm

Post by DHembree »

Is there any remote possibility I might have a discussion with you about this and a few other issues I need to resolve as quickly as possible?
DHembree
Experienced Member
Posts: 75
Joined: Fri Apr 15, 2016 6:46 pm

Post by DHembree »

-fxscope and -dxscope look like command line switches. I am primarily using the the Edit perspective for editing, compiling, and running. How do I invoke these?
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Hi Dan.

Please review the following appnotes to see if it helps:

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

Code: Select all

https://www.xmos.com/support/appnotes/AN00196
and

https://www.xmos.com/support/tools/docu ... ion=X9923A
DHembree
Experienced Member
Posts: 75
Joined: Fri Apr 15, 2016 6:46 pm

Post by DHembree »

Mon2,

I have followed the app note to the letter but get the following error:

ERROR: plugin 'XScopePlugin.dll' returned 'XSI_STATUS_INVALID_ARGS' on creation with args '-xe 'C:\XMOS Xscope\AN00196_Getting_started_with_real_time_xSCOPE_in_xTIMEcomposer_Studio\bin\app_getting_started_with_real_time_xscope.xe' -realtime localhost:10101 -xe C:\XMOS Xscope\AN00196_Getting_started_with_real_time_xSCOPE_in_xTIMEcomposer_Studio\bin\app_getting_started_with_real_time_xscope.xe'
WARNING: Enabling XLink 7 when not all pads connected
WARNING: Trying to communicate over XLink7 when it is not connected
WARNING: Enabling XLink 7 when not all pads connected

I have no clue what arguments to use. I would like to figure this xscope out. I think it will be useful.

Thank you, sir
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Hi Dan. No pro at this but believe it is working here.

1) Saw the same link issues when selecting a random StartKit as the target. Currently do not have any XMOS hardware connected to my PC so changed the configuration to be Simulator.

Screen grab is copied to this post.
xscope_xmos.png
(138.51 KiB) Not downloaded yet
xscope_xmos.png
(138.51 KiB) Not downloaded yet

2) Try the following:

a) Run Configuration -> Simulator radio button checked.

b) XSCOPE tab -> Select Real-Time Mode for the Mode

c) Now select the RUN button

What are the results?
Post Reply