Hi Ross,
I guess ports are enabled by default, I'm using -DXUA_QUAD_SPI_FLASH=1 and calling flash_cmd_enable_ports with that define act exactly as a standard connection.
About p_qflash definition I've:
Code: Select all
fl_QSPIPorts p_qflash =
{
PORT_SQI_CS, // <Port Location="XS1_PORT_1B" Name="PORT_SQI_CS"/>
PORT_SQI_SCLK, // <Port Location="XS1_PORT_1C" Name="PORT_SQI_SCLK"/>
PORT_SQI_SIO, // <Port Location="XS1_PORT_4B" Name="PORT_SQI_SIO"/>
CLKBLK_FLASHLIB
};
DFU_FLASH_DEVICE is not defined.
Anyway the string is readed just fine but then tile 0 crash, here my xgdb, Tile0_adc_task is a simple i2s master loopback that runs (100% fine) on tile 0
Code: Select all
Thread 1.1 hit Breakpoint 1, XUA_Endpoint0_set_serial_number ()
at .../lib_xua/lib_xua/src/core/endpoint0\xua_endpoint0.c:1272
1272 memset(serial_number, '\0', sizeof(serial_number));
(gdb) n
[New tile[0] core[5]]
[New tile[0] core[6]]
1274 flash_get_serial_number(serial_number, 8);
(gdb) n
1276 if(strnlen(serial_number, sizeof(serial_number)) > 0)
(gdb) p serial_number
$1 = "MYSERIAL", '\000' <repeats 23 times>
(gdb) c
Continuing.
[Switching to tile[0] core[5]]
Thread 1.6 hit Catchpoint -1 (XCore Exception ET_ILLEGAL_RESOURCE (DI Resource Lane)), 0x00080498 in Tile0_adc_task (clk=<optimized out>)
at .../lib_i2s/lib_i2s/src\i2s_frame_master_impl.h:82
82 p_lrclk @ 1 <: lr_mask
The crash occours on p_lrck that is on X0D38 aka PORT_1O so I can't find any relation
Disabling the Tile0_adc_task everything works fine and the serial is correctly displayed:
From Thesycon USB Descriptor Dumper:
Code: Select all
------------------------------
Device Descriptor:
------------------------------
0x12 bLength
0x01 bDescriptorType
0x0201 bcdUSB
0xEF bDeviceClass (Miscellaneous device)
0x02 bDeviceSubClass
0x01 bDeviceProtocol
0x40 bMaxPacketSize0 (64 bytes)
0x20B1 idVendor
0x0018 idProduct
0x0900 bcdDevice
0x01 iManufacturer "MANUFACTURER"
0x03 iProduct "PRODUCT"
0x02 iSerialNumber "MYSERIAL"
0x01 bNumConfigurations