Page 2 of 2

Re: Cannot start AN00231 on xCORE-200 MC AUDIO

Posted: Thu Jun 30, 2016 2:49 pm
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
)

Re: Cannot start AN00231 on xCORE-200 MC AUDIO

Posted: Thu Jun 30, 2016 8:53 pm
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?

Re: Cannot start AN00231 on xCORE-200 MC AUDIO

Posted: Fri Jul 01, 2016 9:45 am
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?

Re: Cannot start AN00231 on xCORE-200 MC AUDIO

Posted: Fri Jul 01, 2016 9:59 am
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!

Re: Cannot start AN00231 on xCORE-200 MC AUDIO

Posted: Fri Jul 01, 2016 2:14 pm
by dsteinwe
Perfect! You have helped me alot. Thank you!

Re: Cannot start AN00231 on xCORE-200 MC AUDIO

Posted: Tue Aug 02, 2016 2:38 pm
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 :)

Re: Cannot start AN00231 on xCORE-200 MC AUDIO

Posted: Tue Aug 02, 2016 7:40 pm
by Ross
Lib_spdif should have these changes applied: https://github.com/xcore/sc_spdif/commi ... 19e4abe79e

Re: Cannot start AN00231 on xCORE-200 MC AUDIO

Posted: Mon Aug 08, 2016 2:10 pm
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