DFU Process got stuck in XU224 board Topic is solved

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
dkybchoi
Member++
Posts: 18
Joined: Thu Sep 29, 2016 3:03 am

DFU Process got stuck in XU224 board

Post by dkybchoi »

HI All,

We are porting the codes from XU216 to XU224. Everything looks fine but DFU when the FW is running in XU224. During DFU process, it always got stuck before start downloading the upgrade image, it seems that the unit is not able to enter DFU

mode properly in XU224. We tried to debug by printing some messages when the DFU DETACH command being received. But it cannot help to debug as the xTimecomposer Console will always indicate there is memory exception error once DFU process

begins.

Image

Any better way we can utilize to debug the DFU flow ?

We also tried to simply change the.XN file and compile a 2-tiles FW running in XU224 board. The DFU can work again. It is very strange to me.




Thanks a lot.
Last edited by dkybchoi on Tue Sep 05, 2017 12:18 pm, edited 2 times in total.
View Solution
dkybchoi
Member++
Posts: 18
Joined: Thu Sep 29, 2016 3:03 am

Post by dkybchoi »

One of possible cause is related to the reboot problem in XU224, is it required to update anything in reboot routine for XU224 ?

We found that it seems the reboot function in reboot.xc cannot not work properly for XU224. It should be the reason why DFU is not working.

Can someone has experience in XU224 confirm if the reboot process original in 6.15.2 rc1 is already working properly for XU224 or there is something else will affect .
ffomich
Experienced Member
Posts: 119
Joined: Mon Sep 15, 2014 1:32 pm

Post by ffomich »

Hi dkybchoi.
What error message is in the Console output?
What USB driver do you use?

I have problem with DFU in 6.15.2 rc1 on boards with XS1-L2 and with XE216 processors.
In Debug mode firmware crashed with error:

Code: Select all

xrun: Program received signal ET_ILLEGAL_RESOURCE, Resource exception.
[Switching to tile[0] core[3]]
0x000155e8 in Pid_Sof ()
19 Aug 2016 XMOS tech support sent me an answer for my ticket:
I can confirm this is an issue in recent versions of the USB audio software. Engineering team have details of this issue so they can respond appropriately.
Image
dkybchoi
Member++
Posts: 18
Joined: Thu Sep 29, 2016 3:03 am

Post by dkybchoi »

HI ffomich,

Thanks for your sharing. We got the different error message "xrun: Program received signal ET_LOAD_STORE, Memory access exception. But I am not sure if it reflects the real cause of DFU failure. Because DFU is working properly if we simply change the .XN to force FW to be compiled to 2-tile only and execute on same XU224 HW.
Also when running in Debug mode , since it is required to soft reboot once before start downloading file. The above error will always happen even we tested in another HW with XU216 where DFU can work properly.
ffomich
Experienced Member
Posts: 119
Joined: Mon Sep 15, 2014 1:32 pm

Post by ffomich »

Sorry, for misinformation.
With XE216 + FW 6.15.2 + driver Thesycon 4.13/XMOS 4.11/XMOS 3.34 DFU works correctly.
dkybchoi
Member++
Posts: 18
Joined: Thu Sep 29, 2016 3:03 am

Post by dkybchoi »

Hi ffomich , Thanks for your clarification
sflower
Member
Posts: 10
Joined: Thu Feb 16, 2012 6:27 pm

Post by sflower »

Did you manage to find a fix for this? We are having the same problem on an XUF224.

Anyone from XMOS have any pointers?

Thanks!
cl-b
Active Member
Posts: 44
Joined: Fri Sep 15, 2017 2:58 pm

Post by cl-b »

Did you manage to solve the problem ?
we have same problem with a XUF232 based board ?

Thanks
ffomich
Experienced Member
Posts: 119
Joined: Mon Sep 15, 2014 1:32 pm

Post by ffomich »

Hi,
I did nothing for my XE216 board. Build error appeared when I built my test branch. DFU in original project works correctly.
sflower
Member
Posts: 10
Joined: Thu Feb 16, 2012 6:27 pm

Post by sflower »

This issue is only present on devices with multiple nodes - i.e. X224s and bigger.

We found that the code was attempting to reboot nodes twice as it wasn't accounting for the fact that rebooting a tile will reboot all tiles on the same node.

So we now just reboot one tile per node:

Code: Select all

void device_reboot_aux(void)
{
    ...
    /* Find size of tile array - note in future tools versions this will be available from platform.h */
    asm volatile ("ldc %0, tile.globound":"=r"(tileArrayLength));

    /* Reset all remote nodes (tile pairs) */
    for(int i = tileArrayLength - 1; i >= 0; i-=2)
    {
        /* Cannot cast tileref to unsigned! */
        tileId = get_tile_id(tile[i]);

        /* Do not reboot local tile yet! */
        if(localTileId != tileId)
        {
            read_sswitch_reg(tileId, 6, pllVal);
            pllVal &= PLL_MASK;

            write_sswitch_reg_no_ack(tileId, 6, pllVal);
        }
    }

    /* Finally reboot this node! */
    read_sswitch_reg(localTileId, 6, pllVal);
    pllVal &= PLL_MASK;

    write_sswitch_reg_no_ack(localTileId, 6, pllVal);
    ...
}