I2c_read on SAMD21 - why not supported?


i am currently working on an extras module for reading Honeywell ABP-series pressure sensors. During testing I was using a spare ATmega328 as my mcu - but just tried moving the code to its destination machine which is run by a SAMD21 mcu.
Here I get a “i2c_read not supported on samd21” error and just realized that i2c reading indeed is not implemented in the microcontroller firmware for ATSAMD.
Can anyone tell why that is? Just not coded and tested yet, or are there issues that make this impossible?

I would be happy to add and test this if there are chances to get it working…

It’s just that no developer has yet implemented it.


that is good news - I will take on that task, then :+1:

@koconnor, do you know if the existing i2c code in the atsamd firmware has been proven to work yet? I am having trouble to even get a single i2c_read to run without the firmware locking up (“ERROR:root:Got EOF when reading from device”). Seems like i2c_wait is not releasing and therefore stuck in the loop - if it has been used successfully before, I could be certain that it’s my setup and not the code causing this…

@koconnor, sorry, just an obvious oversight on my side - I missed that I need external pullups for the i2c-bus on a SAMD21… seems to be working now. I’ll prepare a PR after further testing…

1 Like