216 to 208 conversion

Technical questions regarding the XTC tools and programming with XMOS.
egawtry
Member
Posts: 12
Joined: Thu Aug 18, 2011 9:51 pm

216 to 208 conversion

Post 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


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

Post by mon2 »

egawtry
Member
Posts: 12
Joined: Thu Aug 18, 2011 9:51 pm

Post 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
egawtry
Member
Posts: 12
Joined: Thu Aug 18, 2011 9:51 pm

Post 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!
peter
XCore Addict
Posts: 230
Joined: Wed Mar 10, 2010 12:46 pm

Post by peter »

It would help if you could post some more details of the crash - backtrace, register contents, disassembly...
egawtry
Member
Posts: 12
Joined: Thu Aug 18, 2011 9:51 pm

Post 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.
You do not have the required permissions to view the files attached to this post.
Last edited by egawtry on Wed Jun 28, 2017 5:24 pm, edited 1 time in total.
egawtry
Member
Posts: 12
Joined: Thu Aug 18, 2011 9:51 pm

Post 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.
egawtry
Member
Posts: 12
Joined: Thu Aug 18, 2011 9:51 pm

Post 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