facing issue in DFU with UAC1.0 - mac

Technical questions regarding the XTC tools and programming with XMOS.
raja
Newbie
Posts: 1
Joined: Thu Jan 12, 2017 2:22 pm

facing issue in DFU with UAC1.0 - mac

Post by raja »

Hi,
I have an existing firmware with UAC1.0 and a HID Interface. I used XMOS sw_usb_audio-[sw]_6.15.2rc1 as a reference to start with.

Now I am trying to add DFU with this firmware. I came to know that DFU descriptors are included by default in UAC2.0 and not in UAC1.0. So instead of adding this interface, I was planning to use the HID Interface to put the firmware in DFU mode. The below is the sequence I am trying on a mac machine.

1.Send a HID command that does the same as XMOS_DFU_RESETINTODFU.(set DFU flag and reset device)
2.After the device reboots, it enumerates as DFU device.(same as UAC2.0)
3.Modify the host application provided in module_dfu to avoid the step of putting the device in DFU(as I have used HID to achieve the same)
4. The host utility downloads the new firmware.
5. The host utility sends a DFU command XMOS_DFU_RESETFROMDFU that reboots and start the new application.

Problem:
The utility is able to download the firmware. But, it is not able to boot the new application in the final Step. But, if I power cycle the board, the new firmware is being loaded. Why is the XMOS_DFU_RESETINTODFU unable to do it?

P.S:
1. I am sure that XMOS_DFU_RESETFROMDFU command is received and the device reboots. I checked it by toggling a GPIO pin where the command is executed.
2. The same sequence worked in windows with Thesycon's dfucons and its utility.

Please let me know what is being missed out and how can I get my issue solved. Thanks in advance.
User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

I would expect XMOS_DFU_RESETFROMDFU to work. It's what we use in the built-in class 2 DFU.

Code: Select all

I am sure that XMOS_DFU_RESETFROMDFU command is received and the device reboots. I checked it by toggling a GPIO pin where the command is executed.
Can you post a state dump after device has rebooted?

Code: Select all

xgdb -batch -ex att -ex 'thread apply all where' -ex 'thread apply all info all-registers' binary.xe
Does the device stay on the bus or come off after XMOS_DFU_RESETFROMDFU is received?