read/write flash on XUF216 chip
Posted: Sat Nov 25, 2017 9:24 pm
Hello All,
My questions regard reading and writing to the internal flash of an XUF216 chip. I am a complete noob in the flash realm and in its usage by XMOS, so I hope you'll put up with my very naive questions.
I want to run a program in the field that derives statistics from its operating environment and stores those statistics in flash. I then want to read the statistics back in the lab using XTIMECOMPOSER or another program.
I read app note AN00154, the only XMOS app note I could find on flash usage, but am unsure if it pertains to the flash in the XUF216 chip because the XUF216 flash part (IS25LQ016B from the XUF216 data sheet) is not listed in AN00154, nor are the XUF216 flash SPI signals.
From AN00154, however, I expect I will need to connect to the flash device using something like
fl_connectToDevice(ports, deviceSpecs, sizeof(deviceSpecs)/sizeof(fl_DeviceSpec))
and read and write data using something like
fl_readData(offset, numReadBytes, readBuffer)
and
fl_writeData(offset, numWriteBytes, writeBuffer, scratchBuffer)
and finally disconnect from the device using fl_disconnect().
My specific questions are:
1. Is my general outline of the procedure correct?
2. If general outline is correct, how exactly should I define "ports", and "deviceSpecs", as in AN00154 or some other way?
3. If my general outline is incorrect, what should it be?
4. How many times can I write or read before the flash begins to fail?
5. Can I write and read arbitrary numbers of bytes?
6. Can XTIMECOMPOSER be used to easily dump the flash contents to a file? If so, where can I find out how to do this?
Any pointers would be greatly appreciated!
cheers,
Bill
embedded sys noob
My questions regard reading and writing to the internal flash of an XUF216 chip. I am a complete noob in the flash realm and in its usage by XMOS, so I hope you'll put up with my very naive questions.
I want to run a program in the field that derives statistics from its operating environment and stores those statistics in flash. I then want to read the statistics back in the lab using XTIMECOMPOSER or another program.
I read app note AN00154, the only XMOS app note I could find on flash usage, but am unsure if it pertains to the flash in the XUF216 chip because the XUF216 flash part (IS25LQ016B from the XUF216 data sheet) is not listed in AN00154, nor are the XUF216 flash SPI signals.
From AN00154, however, I expect I will need to connect to the flash device using something like
fl_connectToDevice(ports, deviceSpecs, sizeof(deviceSpecs)/sizeof(fl_DeviceSpec))
and read and write data using something like
fl_readData(offset, numReadBytes, readBuffer)
and
fl_writeData(offset, numWriteBytes, writeBuffer, scratchBuffer)
and finally disconnect from the device using fl_disconnect().
My specific questions are:
1. Is my general outline of the procedure correct?
2. If general outline is correct, how exactly should I define "ports", and "deviceSpecs", as in AN00154 or some other way?
3. If my general outline is incorrect, what should it be?
4. How many times can I write or read before the flash begins to fail?
5. Can I write and read arbitrary numbers of bytes?
6. Can XTIMECOMPOSER be used to easily dump the flash contents to a file? If so, where can I find out how to do this?
Any pointers would be greatly appreciated!
cheers,
Bill
embedded sys noob