I am almost new to XMOS and its related stuff. Also I am not familiar with a lot of hardware related concepts and topics. I am familiar with xmos' sdk and many modules there architecture and functionalities(lib_mic_array, module_vocalfusion ... etc). Currently on my project we would like persistent data for couple of variables which will be set from that data and remain the same even after rebooting(power on/off) of device. So I took a look to the AN00188 and added that reading functionality on my scripts but the fl_connectToDevice fails and returns non zero value during the runtime. So I build my project for XCORE-200-EXPLORER with the xTimeComposer14.3 then I flash with the terminal command
Code: Select all
xflash --factory-version 14.3 --upgrade 1 app.xe -o app.bin --no-compression
Code: Select all
xflash --no-compression --target-file XCORE-200_EXPLORER.xn --factory app.xe --boot-partition-size 0x80000 --data data.bin
Code: Select all
xrun --io --verbose app.xe
Code: Select all
xflash --factory app.xe --factory-version 14.3 --upgrade 1 app.xe -o app.bin --no-compression --boot-partition-size 0x80000 --data data.bin --verbose
Code: Select all
static fl_QSPIPorts ports = {
PORT_SQI_CS,
PORT_SQI_SCLK,
PORT_SQI_SIO,
on tile[1]: XS1_CLKBLK_1
};
static fl_QuadDeviceSpec deviceSpecs[] =
{
FL_QUADDEVICE_SPANSION_S25FL116K,
FL_QUADDEVICE_SPANSION_S25FL132K,
FL_QUADDEVICE_SPANSION_S25FL164K,
FL_QUADDEVICE_ISSI_IS25LQ080B,
FL_QUADDEVICE_ISSI_IS25LQ016B,
FL_QUADDEVICE_ISSI_IS25LQ032B,
};
static void readData(){
if(fl_connectToDevice(ports, deviceSpecs, sizeof(deviceSpecs)/sizeof(fl_QuadDeviceSpec)) != 0){
printf("Unable conncet to device\n");
return;
}
printf("Successfully conected\n");
char chars[NUM_DATA_BYTES];
if(fl_readData(0, NUM_DATA_BYTES, chars) != 0){
printf("Unable to read data\n");
return;
}
printf("Successfully read the data\n");
for(size_t i = 0; i < NUM_DATA_BYTES; ++i){
printf("%d, ", (int)chars[i]);
}
fl_disconnect();
return;
}
Thanks in advance,
Rafayel