DFU always fail with xu232

New to XMOS and XCore? Get started here.
User avatar
mon2
XCore Legend
Posts: 1636
Joined: Thu Jun 10, 2010 11:43 am

Re: DFU always fail with xu232

Postby mon2 » Mon Dec 23, 2019 1:49 pm

Hi. Please review and test the solution posted here:

viewtopic.php?f=37&t=6053

Please post your updates and results.
TonyXiao
Member++
Posts: 29
Joined: Fri Mar 29, 2019 3:58 am

Postby TonyXiao » Thu Dec 26, 2019 5:31 am

hi, all

with our fae suppurt, now add a 24M clock to PORT_MCLK_IN, now single XUF232 DFU function works.
for our requirements, we don't need play any audio, only need usb midi device, and another problem comes can i delete all the audio ports and dfu still working? so far for usb midi device, i didn't use any of the audio ports, and it indeed works. but i am not sure for the DFU.

and dfu function failed when i xlinked XU208, the program stuck in reboot.xc below sentence:
write_sswitch_reg_no_ack(tileId, 6, pllVal);

After the two XMOS chips are xlinked, should there be some special processing during operate the two XMOS resets?
Instead of simply resetting each tile in turn as one XMOS?
any advice are appreciated.

BR,
Tony
fabriceo
Active Member
Posts: 33
Joined: Mon Jan 08, 2018 4:14 pm

Postby fabriceo » Tue Dec 31, 2019 9:12 am

Hi,
I m also experiencing lot of pain with dfu upgrade (xu216). I got it to work some time ago, but now it doesn't work anymore again.
I have identified that this is because tile1 don't want to reboot.
the device_reboot() in reboot.xc seems to work fine for rebooting tile 0 but tile1 doesn't...
any experience welcome
fabriceo
Active Member
Posts: 33
Joined: Mon Jan 08, 2018 4:14 pm

Postby fabriceo » Wed Jan 01, 2020 1:18 pm

Hi
I tried the run --dump-state as explained here:
viewtopic.php?t=4060
I saw a couple of problem with my application as the dfuhandler was distributed on another task than audio() and also the boot was stuck in ffff04c8 which meant that the xtag/jtag was the problem. finally, doing things step by step and removing the xtag after a cold boot solved it.
my reboot code is simply this one now and looks fine:

Code: Select all

    read_sswitch_reg(get_local_tile_id(), 6, pllVal);
    pllVal &=0xFFFF;
    write_sswitch_reg_no_ack(get_local_tile_id()^1, 6, pllVal);
    write_sswitch_reg_no_ack(get_local_tile_id(),   6, pllVal);
hope this helps
TonyXiao
Member++
Posts: 29
Joined: Fri Mar 29, 2019 3:58 am

Postby TonyXiao » Thu Jan 02, 2020 3:05 am

Hi

DFU reboot soft reset, the principle is realized by writing the PLL register to reset the PLL; first reset the PLL where the non-localtile is located, and then reset the PLL where the localtile is located.
as to 216 there is one PLL,that is to say you only need reset once, either reset tile0 or tile1 should be ok.

now i am trying to delete the audio ports, but dfu failed when i just delete a few of them.
Function_Block_Diagram.jpg
as the function block diagram upside, the function in red circle is what we need, it seems the dfu function should be ok when i delete all the other parts. but dfu failed when i just delete just a few of audio ports.
any ideas?
You do not have the required permissions to view the files attached to this post.
TonyXiao
Member++
Posts: 29
Joined: Fri Mar 29, 2019 3:58 am

Postby TonyXiao » Mon Jan 06, 2020 9:05 am

Hi all

Now the audio ports only left the PORT_I2S_BCLK can not be deleted.
<!-Audio Ports->
<Port Location = "XS1_PORT_1H" Name = "PORT_I2S_BCLK" />

as long as the following p_bclk is commented out, the DFU function fails.
firmware stuck in such if inside sentences:
/* If running in application mode stop audio */
/* Don't interupt audio for save and restore cmds */
if ((DFU_IF == INTERFACE_NUMBER_DFU) && (sp.bRequest != XMOS_DFU_SAVESTATE) &&
(sp.bRequest != XMOS_DFU_RESTORESTATE))
{
printstrln("runs to here 0");
// Stop audio
outuint(c_audioControl, SET_SAMPLE_FREQ);
outuint(c_audioControl, AUDIO_STOP_FOR_DFU);
// Handshake
chkct(c_audioControl, XS1_CT_END);
}

Who is online

Users browsing this forum: No registered users and 0 guests