after working with the EVK for a while (XK-AUDIO-316-MC-AB) it stopped accepting SPI commands using xflash. I can still xrun, xgdb etc, but it seems the Xcore reads all 0 from the SPI flash.
next, the same happened on my custom board. I did flash various images and debug just fine, then it stopped working in the same manner.
I searched the forums and found out about the QE bit, and the toolchain issue WRT "--spi-div=8" but that doesn't seem to be my issue. one of the main problems seems to be that even the chip-id cannot be read, it always reports "Site 0 has ID 0x000000"
please help me unbrick the original EVK and my custom board.
In an attempt to do so, I had changed the 10k pull-up resistor to 1k as it's is documented, but that didn't change things.
here's the full log (they're identical for both boards):
% cat xmos_evk.log % xflash -v --spi-div=8 bin/project/board.xe XFlash_Options::ListDevices : xrun --list-devices devl-6e9b54cd XFlash_Application found _start :80000 on Node 0 XFlash_Application found _DoSyscall :88180 on Node 0 XFlash_Application found _DoException :800c4 on Node 0 XFlash_Application found _start :80000 on Node 0 XFlash_Application found _DoSyscall :822c4 on Node 0 XFlash_Application found _DoException :800c4 on Node 0 XFlash::DoXFlash XFlash::DoImageProgramming XFlash::GetDeviceInfo XFlash_DeviceInfo::GetDeviceInfo_User XFlash_DeviceInfo::PrintDeviceInfo Site 0 (bootFlash) info: _device_size 0x400000 _device_page_size 0x100 _regular_sector_sizes true _device_sector_size 0x1000 _device_protection_available false _device_divider 8 _device_first_user_sector 0x0 _device_search_limit 0x400000 XFlash::BuildFlashBinaryFile XFlash_Builder_S2L::BuildStage2Loaders Factory Stage2_Loader::Compile : xcc -Wno-bidirectional-buffered-port -Wno-timing -Wno-unused-function -Xmapper --dontenablesodlinks -Xmapper --nochaninit -Xmapper --noinitialtidy -Xmapper --image-base -Xmapper 0x80080 -Xmapper --image-size -Xmapper 0x7ff80 -Xmapper --wno110 -Xmapper --wno226 -Xmapper --wnoXN -std=gnu99 -O2 -target=XU316-1024-FB265-C32 -x none "/home/name/CODE/XMOS/toolchain/XMOS/XTC/15.3.1/target/app/xs3a/stage2loader_SQI.o" -lstage2loader -lsqiaccess -lquadspi -llocks -o s2l-n0-4632bcfe Stage2Loader found DEVICE_SECTOR_WORD_SIZE : 0x81650 on Node 0 Stage2Loader found pllConfig : 0x815f8 on Node 0 Stage2Loader found otp_disable : 0x81654 on Node 0 Stage2Loader found debug_stop : 0x81658 on Node 0 Stage2Loader found s2l_record_timings : 0x81644 on Node 0 Stage2Loader found s2l_search_by_address : 0x81648 on Node 0 Stage2Loader found s2l_num_addresses : 0x8164c on Node 0 Stage2Loader found s2l_search_addresses : 0x815b8 on Node 0 Stage2Loader found flash_ports : 0x815c8 on Node 0 Stage2Loader found clock_config : 0x815d8 on Node 0 Stage2Loader found qe_config : 0x815f0 on Node 0 Stage2Loader found spanning_routing_id : 0x8250c on Node 0 Stage2Loader found spanning_table : 0x81388 on Node 0 Stage2Loader found num_spanning_tables : 0x82510 on Node 0 Stage2Loader found routing_table : 0x81ab8 on Node 0 Stage2Loader found num_routing_tables : 0x82514 on Node 0 Stage2Loader found link_info : 0x81c48 on Node 0 Stage2Loader found links_table : 0x81e28 on Node 0 Stage2Loader found num_link_tables : 0x82518 on Node 0 Stage2Loader found galaxian_table : 0x82328 on Node 0 Stage2Loader found num_galaxian_tables : 0x8251c on Node 0 Stage2Loader found pll_table : 0x823a0 on Node 0 Stage2Loader found debug_stop : 0x82524 on Node 0 Stage2Loader found secondaryPllConfig : 0x823c0 on Node 0 Stage2Loader found ddrConfig : 0x823d0 on Node 0 Stage2Loader found ddrEnable : 0x82520 on Node 0 XFlash_Builder_Image::BuildImages Factory XFlash_Builder_Image::BuildImageTable master node = 0 node = 0 XFlash_Builder_Image::BuildImageTable num cores for image table = 2 XFlash_Builder_Image::CalculateBufferSize Starting calculation _total_image_size=0 XFlash_Builder_Image::CalculateBufferSize Add Image Header _total_image_size=38 XFlash_Builder_Image::CalculateBufferSize Add Switch Setup header _total_image_size=40 XFlash_Builder_Image::CalculateBufferSize Add Per Core header _total_image_size=80 XFlash_Builder_Image::CalculateBufferSize_SwitchSetup _total_image_size=25ac XFlash_Builder_Image::CalculateBufferSize_Application application size = c9c0 _total_image_size = ef6c XFlash_Builder_Image::CalculateBufferSize_Application application size = 4094 _total_image_size = 13000 XFlash_Builder_Image::BuildImageTable allocated image buffer size = 13000 XFlash_Builder_Image::WriteBuffer_ImageHeader XFlash_Builder_Image::WriteBuffer_SwitchSetup current switch setup table offset : 38 XFlash_Builder_Image::WriteBuffer_SwitchSetup current application data offset : 80 XFlash_Builder_Image::WriteBuffer_SwitchSetup size : 2528 XFlash_Builder_Image::WriteBuffer_SwitchSetup aligned_size : 252c XFlash_Builder_Image::WriteBuffer_SwitchSetup init_vec_shift : 0 XFlash_Builder_Image::WriteBuffer_Application XFlash_Builder_Image::WriteBuffer_Application for node : 0 XFlash_Builder_Image::WriteBuffer_Application for core : 0 XFlash_Builder_Image::WriteBuffer_Application current core table offset : 40 XFlash_Builder_Image::WriteBuffer_Application current application data offset : 25ac XFlash_Builder_Image::WriteBuffer_Application size : c9bc XFlash_Builder_Image::WriteBuffer_Application aligned_size : c9c0 XFlash_Builder_Image::WriteBuffer_Application init_vec_shift : 0 XFlash_Builder_Image::WriteBuffer_Application chan end : 80020002 XFlash_Builder_Image::WriteBuffer_Application for core : 1 XFlash_Builder_Image::WriteBuffer_Application current core table offset : 60 XFlash_Builder_Image::WriteBuffer_Application current application data offset : ef6c XFlash_Builder_Image::WriteBuffer_Application size : 4090 XFlash_Builder_Image::WriteBuffer_Application aligned_size : 4094 XFlash_Builder_Image::WriteBuffer_Application init_vec_shift : 0 XFlash_Builder_Image::WriteBuffer_Application chan end : 80030002 XFlash_Builder_Image::WriteBuffer_SwMem XFlash_Builder_Image::WriteBuffer_SwMem for node : 0 XFlash_Builder_Image::WriteBuffer_SwMem for core : 0 XFlash_Builder_Image::WriteBuffer_SwMem current core table offset : 40 XFlash_Builder_Image::WriteBuffer_SwMem current application data offset : 13000 XFlash_Builder_Image::WriteBuffer_SwMem for core : 1 XFlash_Builder_Image::WriteBuffer_SwMem current core table offset : 60 XFlash_Builder_Image::WriteBuffer_SwMem current application data offset : 13000 XFlash_Builder_Image::WriteBuffer_ExtMem XFlash_Builder_Image::WriteBuffer_ExtMem for node : 0 XFlash_Builder_Image::WriteBuffer_ExtMem for core : 0 XFlash_Builder_Image::WriteBuffer_ExtMem current core table offset : 40 XFlash_Builder_Image::WriteBuffer_ExtMem current application data offset : 13000 XFlash_Builder_Image::WriteBuffer_ExtMem for core : 1 XFlash_Builder_Image::WriteBuffer_ExtMem current core table offset : 60 XFlash_Builder_Image::WriteBuffer_ExtMem current application data offset : 13000 XFlash_Builder_Image::WriteBuffer_CRC XFlash_Builder_Binary::BuildBinary XFlash_Builder_Binary::CalculateBufferSize_Factory XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l size word (4)4 XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l app (1668) 166c XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l crc (4)1670 XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding factory app (13000) 14670 XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding sector padding (990) 15000 XFlash_Builder_Binary::CalculateBufferSize_Factory : First User Sector offset = 15000 XFlash_Builder_Binary::GetSearchLimitPadding : current size (15000) 0 XFlash_Builder_Binary::CalculateBufferSize_Data XFlash_Builder_Binary::BuildBinary : Allocating buffer - 15000 XFlash_Builder_Binary::GetSearchLimitPadding : current size (15000) 0 XFlash_Builder_Binary::WriteBufferToBinary : flash_bin_node0 XFlash_Builder_Storage_PPB::BuildStorage XFlash_Programmer_Write::DoWrite XFlash_Programmer_Write::IssueCompileCommand xcc -w -Xmapper --dontenablesodlinks -Xmapper --errdemote130 -Xmapper --errdemote131 -x xn "target-xn-v0-6b3fe8a9" -O2 -lquadflash -llocks -D xnPORT_SQI_CS0=PORT_SQI_CS -D xnPORT_SQI_SCLK0=PORT_SQI_SCLK -D xnPORT_SQI_SIO0=PORT_SQI_SIO -x xc "fw-b72a2060" -o "fw-2ad6d7da" XFlash_Utils::BuildRunCommand : xrun --io fw-2ad6d7da Site 0 has started. Site 0 has ID 0x000000. Site 0 erase 0x00000000. Site 0 write 0x00000000. Verify failed for page 0x00000000, offset 0x0000 (read 0x00, expected 0xa9). [long timeout] xrun: Error: Timed out. First stage multi-node boot failed, please check XN file and Xmos link connectivity. Error: F03013 Failed to run : xrun --io fw-2ad6d7da xflash -v --spi-div=8 bin/project/board.xe 7.64s user 1.60s system 5% cpu 2:35.70 total