Cannot start AN00231 on xCORE-200 MC AUDIO Topic is solved

Technical discussions related to any XMOS development kit or reference design. Eg XK-1A, sliceKIT, etc.
User avatar
infiniteimprobability
Verified
XCore Legend
Posts: 1149
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

OK - so you're saying it works fine with the mod if you build and flash, but not when you run/debug?


Can you try from the command line? (open the xtimecomposer shell and do

Code: Select all

xrun bin/AN00231_ASRC_SPDIF_TO_DAC.xe
)
View Solution
User avatar
dsteinwe
XCore Addict
Posts: 144
Joined: Wed Jun 29, 2016 8:59 am

Post by dsteinwe »

I havn't found a shell view inside xtimecomposer. Therefore I have started it from the bash shell. After calling

Code: Select all

source SetEnv
I can run your command successfully. The question is, how can I start it from xtimecomposer?
User avatar
dsteinwe
XCore Addict
Posts: 144
Joined: Wed Jun 29, 2016 8:59 am

Post by dsteinwe »

I haven't changed anything, but today it works. Maybe that the restart of my system has fixed the problem.

I have only one final issue with the example app. XScope doesn't work. I configured as in the manual described "Run Configurations > Target I/O > xSCOPE via xCONNECT" and switched XScope to real-time mode. On starting the perspective "trace" is shown, but all the time is "disconnected" displayed and I cannot enable it with any button. Can you reproduce this issue?
User avatar
infiniteimprobability
Verified
XCore Legend
Posts: 1149
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

Glad it works! If it's running from the command line (forgot to say you could add

Code: Select all

--xscope 
argument to see prints) then fundamentally it's working.
"Run Configurations > Target I/O > xSCOPE via xCONNECT" and switched XScope to real-time mode.
xscope is many things - at a basic level it's a fast print mechanism with low intrusiveness, which is what this app uses. So "Run Configurations > Target I/O > xSCOPE via xCONNECT" is all you need to enable this.
switched XScope to real-time mode
is somethign different. That enables real time graphical scope mode. Like a normal scope, you have to add probes.

Try something like this in main.xc:

Code: Select all

    while (1) {
        select {
            case spdif_receive_sample(c_spdif_rx, sample, index):
                i_serial_in.push(sample, index);   //Push them into serial to block
                if(index ==0 ) xscope_int(0, sample);
            break;
        }
    }
This should plot the left channel of the SPDIF stream.

Have a play - you could plot i2s_buffer_level_from_half for example to see how well the PI loop is doing mathcing the two rates

Section 18 of the xtimecomposer guide describes graphical xscope better than I can!
User avatar
dsteinwe
XCore Addict
Posts: 144
Joined: Wed Jun 29, 2016 8:59 am

Post by dsteinwe »

Perfect! You have helped me alot. Thank you!
User avatar
infiniteimprobability
Verified
XCore Legend
Posts: 1149
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

Just to let anyone reading this thread know that both AN00231 (ASRC using SPDIF rx) and the SPDIF library itself have been updated and are now importing and playing nicely :)
User avatar
Ross
Verified
XCore Legend
Posts: 1150
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Lib_spdif should have these changes applied: https://github.com/xcore/sc_spdif/commi ... 19e4abe79e
User avatar
infiniteimprobability
Verified
XCore Legend
Posts: 1149
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

Lib_spdif should have these changes applied: https://github.com/xcore/sc_spdif/commi ... 19e4abe79e
No need to worry - the updated lib_spdif library (version 2.0.2) has been modified to handle entry from single or dual issue caller:

https://github.com/xmos/lib_spdif/commi ... 1e50ed546f

It has been tested with AN00231 and all seems well.

Cheers