Hi Ed,
As per our separate email discussion, my board works perfectly out of the box.
The app and tools you are using are correct.
The error absolutely relates to incorrect SPI ID. The tools generate C source for the xcore which is compiled to make the flashing agent which is downloaded to the chip during xflash. That what all of those tmp files are that appear - flash source files. You can look at them - they are quite interesting..
The tools generator does the following:
Code: Select all
file << " //Connect to the SPI device\n";
file << " if(fl_connectToDevice(phs, deviceSpecs, sizeof(deviceSpecs)/sizeof(fl_DeviceSpec)) != 0)\n";
file << " {\n";
file << " sprintf(error_str,\"Error on %s: failed to connect to flash device. Please verify that SPI type is supported and that the correct SPI ports are defined within your xn file.\\n\", tile_name);\n";
file << " return 1;\n";
file << " }\n\n”;
The API for the fl_connectToDevice function is as follows:
fl_connectToDevice opens a connection to an SPI device. It iterates through an array of n SPI device specifications, attempting to connect using each specification until one succeeds.
If it fails, it means it can’t see a flash ID it knows.
You can override the know SPI devices using:
Code: Select all
--spi-spec arg Enable support for the user defined SPI device;
arg = <spidevicefile>
Here’s an example:
Code: Select all
0, /* IS25LQ016B */
256, /* page size */
8192, /* num pages */
3, /* address size */
3, /* log2 clock divider */
0x9F, /* QSPI_RDID */
0, /* id dummy bytes */
3, /* id size in bytes */
0x9D4015, /* device id */
0x20, /* QSPI_SE */
4096, /* Sector erase is always 4KB */
0x06, /* QSPI_WREN */
0x04, /* QSPI_WRDI */
PROT_TYPE_NONE, /* no protection */
{{0,0},{0x00,0x00}}, /* QSPI_SP, QSPI_SU */
0x02, /* QSPI_PP */
0xEB, /* QSPI_READ_FAST */
1, /* 1 read dummy byte */
SECTOR_LAYOUT_REGULAR, /* mad sectors */
{4096,{0,{0}}}, /* regular sector sizes */
0x05, /* QSPI_RDSR */
0x01, /* QSPI_WRSR */
0x01, /* QSPI_WIP_BIT_MASK */
However, the fact it should work out of the box and you get “Response to SPI ID command on tile[0]: 0x0, 0x0, 0x0.” suggests a HW issue… It’s not reading a valid SPI ID.
Finally, as per our separate emails, I would suggest that you refit the original device and try Mon2's suggestions, above.
Best regards,
John