Page 1 of 1

216 to 208 conversion

Posted: Tue Jun 13, 2017 11:00 pm
by egawtry
Hello All,

We are attempting to adapt the Audio 2.0 driver from a XU216 to a XU208. The program runs until the first par line, thread_speed(), which calls set_thread_fast_mode_off(). Then it hangs. Commenting out the line causes a crash on the next function, Endpoint0().

Anyone know what is going on?

Thanks,
-Erik

Danville Signal

Re: 216 to 208 conversion

Posted: Wed Jun 14, 2017 1:47 am
by mon2

Re: 216 to 208 conversion

Posted: Thu Jun 15, 2017 5:33 pm
by egawtry
Yes, I know what set_thread_fast_mode_xxx() is.
What I am asking is:
1. Anyone else do a conversion to XU208?
2. Any idea why it GPFs at startup?


Thank You,
-Erik

Re: 216 to 208 conversion

Posted: Thu Jun 15, 2017 10:57 pm
by egawtry
I am really stuck. If anyone has an idea as to why it GPFs at start, please post. Even crazy ideas welcome. :-)

I am going to have to pester tech support in the morning if no one has anything.

Thanks!

Re: 216 to 208 conversion

Posted: Fri Jun 16, 2017 8:07 am
by peter
It would help if you could post some more details of the crash - backtrace, register contents, disassembly...

Re: 216 to 208 conversion

Posted: Fri Jun 23, 2017 7:05 pm
by egawtry
peter wrote:It would help if you could post some more details of the crash - backtrace, register contents, disassembly...
xmos x200 error.jpg
Here is what I have. This is still vexing me.

Re: 216 to 208 conversion

Posted: Tue Jun 27, 2017 5:00 pm
by egawtry
mon2 wrote:Found the following on topic:

https://www.xcore.com/viewtopic.php?f=26&t=5647
Sorry, It is not on topic.

Re: 216 to 208 conversion

Posted: Thu Jun 29, 2017 8:11 pm
by egawtry
I figured it out. It seems that the endpoint0() function has parameters that crash when passed uninitialized. Here is the fix that takes care of the problem:

Code: Select all

       /* Endpoint 0 Core */
        {
            thread_speed();
            Endpoint0( c_xud_out[0], c_xud_in[0], c_aud_ctl, c_mix_ctl, c_clk_ctl
#ifdef IAP_EA_NATIVE_TRANS
                    , c_EANativeTransport_ctrl
#endif
#if defined(DFU) && (DFU != 0)
                    , dfuInterface
#endif
                    );
        }
Plus the appropriate changes to the prototype and end function:

Code: Select all

void Endpoint0(chanend c_ep0_out, chanend c_ep0_in, chanend c_audioCtrl,
        chanend ?c_mix_ctl,chanend ?c_clk_ctl
#ifdef IAP_EA_NATIVE_TRANS
        , chanend ?c_EANativeTransport_ctr
#endif
#if defined(DFU) && (DFU != 0)
        , client interface i_dfu dfuInterface
#endif
        );

void Endpoint0(chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl,
    chanend c_mix_ctl, chanend c_clk_ctl
#ifdef IAP_EA_NATIVE_TRANS
    , chanend c_EANativeTransport_ctrl
#endif
#if defined(DFU) && (DFU != 0)
    , CLIENT_INTERFACE(i_dfu, dfuInterface)
#endif
    )

-Erik