Register / Login  |  Desktop view  |  Jump to bottom of page

tcMenu Arduinio library » eeprom implementation for SPIMemory (eeprom emulation for external SPI-Flash chips)

Author: bitz
03/04/2020 14:43:29
Hi,

i currently use a ItsyBitsy m0 express (SAMD21), it has a SPI Flash chip on it.

I wanted to use it with ioAbstraction/TCMenu, so i made small wrapper for the SPIMemory LIB.
Its not fully tested yet, but worked in (the amended) i2cEepromExample.
I wanted to ask for comments, my c++ is a bit rusty.
If OK you can include it to ioAbstraction, if you like. Otherwise feel free to comment.

Unfortunately i wont be able to do a fork/pull request (at least in the near future).
Here are the files (EepromAbstractionSPIMemory.h and EepromAbstractionSPIMemory.cpp)

https://drive.google.com/drive/folders/10TvEUiQss9t3iPWBamizdXam_gB--K9N?usp=sharing

If someone wants to use it:
The SPIMemory LIB has a small bug in the v 3.4.0 not working with SPI1 (the second SPI line),
where the itsybitsy onboard flash is hardwired to.
There is a SPI.begin missing after line 119 in SPIFlash.cpp (in the SPIFlash::begin()).
I had to add the following:
#elif defined (ARDUINO_ARCH_SAMD)
    BEGIN_SPI
    #endif


Regards,
bitz

PS: ... later i see: this post might belong better to the ioAbstraction forum...

Author: davetcc
04/04/2020 11:05:04
Many thanks for providing this implementation. I'll take a look at it soon to try and integrate it into the library.




Register / Login  |  Desktop view  |  Jump to top of page