xmosdfu cannot update firmware multiple times using stereo dev kit

Technical questions regarding the XTC tools and programming with XMOS.
rgarb
Newbie
Posts: 1
Joined: Fri Sep 06, 2019 5:15 am

xmosdfu cannot update firmware multiple times using stereo dev kit

Post by rgarb »

I have an xvf3500 stereo dev kit running the usb configuration of the source code downloadable from the xmos website.
When I try to update the firmware using xmosdfu more than once, the firmware returns to running only the "factory image."
The first update does work, though.


Here's an example sequence that cause the error (on ubuntu):

Code: Select all

sudo ./xmosdfu 0x13 --download stereo_led2.bin
runs stereo_led2.bin correctly

Code: Select all

sudo ./xmosdfu 0x13 --revertfactory
runs stereo_factory.xe correctly

Code: Select all

sudo ./xmosdfu 0x13 --download stereo_led2.bin
runs stereo_led2.bin correctly

Code: Select all

sudo ./xmosdfu 0x13 --download stereo_led3.bin
Does NOT run stereo_led3.bin. Now runs stereo_factory.xe, and no invocation of xmosdfu can change anything anymore.


Here's what

Code: Select all

sudo ./xmosdfu 0x13 --download stereo_led3.bin
returns (as do all of the above invocations of xmosdfu):

Code: Select all

VID = 0x1d6b, PID = 0x3, BCDDevice: 0x415
VID = 0x46d, PID = 0xc326, BCDDevice: 0x7900
VID = 0x45e, PID = 0xcb, BCDDevice: 0x100
VID = 0x13d3, PID = 0x3410, BCDDevice: 0x200
VID = 0x20b1, PID = 0x13, BCDDevice: 0x222
XMOS DFU application started - Interface 4 claimed
Detaching device from application mode.
Waiting for device to restart and enter DFU mode...
VID = 0x20b1, PID = 0x13, BCDDevice: 0x222
... DFU firmware upgrade device opened
... Downloading image (stereo_led3.bin) to device
... Download complete
... Returning device to application mode

Here's how I created my binaries:
On command prompt (community 14.3.3) running in Windows 10:
(starting from xw_vocalfusion_xvf3500-[sw]_2.2.2rc1 as downloaded from website)

Code: Select all

xmake CONFIG=usb
cp app_vf_stereo_base_usb.xe stereo_factory.xe
xflash --boot-partition-size 0x40000 stereo_factory.xe
	Warning: F03098 Factory image and boot loader cannot be write-protected on flash device on node 0
	xflash: Warning: F03148 --quad-spi-clock not given, using default 15.62MHz
	xflash: Warning: F03149 QE_REGISTER and/or QE_BIT locations not found in XN file for this flash device. Using default quad_spi_qe_location_status_reg_0 and quad_spi_qe_bit_6.
	Site 0 has finished successfully.
(make an LED change)

Code: Select all

	xmake CONFIG=usb
	cp app_vf_stereo_base_usb.xe stereo_led2.xe

	xflash --factory-version=14.3 --upgrade 2 stereo_led2.xe 0x40000 -o stereo_led2.bin
(make another LED change)

Code: Select all

	xmake CONFIG=usb
	cp app_vf_stereo_base_usb.xe stereo_led3.xe
	xflash --factory-version=14.3 --upgrade 3 stereo_led3.xe 0x40000 -o stereo_led3.bin
As an aside, I did have to add the line

Code: Select all

   { "XMOS_STEREO_PID",             0x0013}
to

Code: Select all

device_pid_t pidList[] = {
   { "XMOS_XCORE_AUDIO_AUDIO2_PID", 0x3066},
   { "XMOS_L1_AUDIO2_PID",          0x0002},
   { "XMOS_L1_AUDIO1_PID",          0x0003},
   { "XMOS_L2_AUDIO2_PID",          0x0004},
   { "XMOS_SU1_AUDIO2_PID",         0x0008},
   { "XMOS_U8_MFA_AUDIO2_PID",      0x000A},
   { "XMOS_STEREO_PID",             0x0013}
};
in xmosdfu.cpp. I invoked make -f Makefile.Linux64 to compile it on Ubuntu 16.04