Close

SAMD21 Arduino Zero/MKR support

A project log for High Resolution Absolute Encoder - Arduino & Pi

Bourns ACE-128 Absolute Contacting Encoder - 128 positions - with I2C interface - Arduino & Raspberry Pi libraries

alastair-youngAlastair Young 11/15/2018 at 18:151 Comment

A customer plugged a module into their Arduino MKR WiFI 1010 and discovered the code did not compile.

The current library code uses EEPROM to remember the zero position and multi-turn offset between power cycles. 

Some of the new Arduino boards such as the Zero and the MKR use the SAMD21 chip which has no EEPROM memory, and therefore the current library code is not compatible with these boards. 

I welcome input from customers and observers as to how to work around this problem. Repeatedly writing to the SAMD21 flash instead via EEPROM emulation is generally not recommended due to the limited write cycles on that memory.

A couple of ideas:

Discussions

Chris wrote 11/16/2018 at 20:18 point

You could wear level the writes in data flash to mitigate the much lower erase-write cycle endurance.

  Are you sure? yes | no