There seems to be 3 different libraries that can be used to access TWI: nrf_drv_twi, twi_hw_master, twi_sw_master. (please correct if i am wrong).
i am using SDK8.1. Which library is the most stable?
Is there any example code i could learn from?
Example of nrf_drv_twi here
thank you. Why are there 3 different libraries? There was an explanation on the difference between twi_sw_master and twi_hw_master, but what is the difference between these two and nrf_drv_twi? Is it just best to use nrf_drv_twi?
Sorry, I can't answer that question, probably it is improved version of hardware implementation. By the way, here is useful note
twi_hw_master : Driver for TWI master that uses TWI hardware in nRF chip
twi_sw_master : driver for TWI master that does not use TWI hardware but uses GPIO to bitbang the protocol.
both of the above are marked as incubated in SDK8.1 and most probably will be depreciated in the future releases. Marking incubated is the way to tell you that support will be stopped for these modules soon.
nrf_drv_twi: New Driver released in SDK8.1 for TWI hardware module for abstracting the TWI hardware in the chip. This module must be used for new development.
Thank you. Your answer really helps set the context for these libraries. I am used to the terminology "deprecated" so thank you also for clarifying "incubated" . When using Keil 5, does it matter if I use the Pack or Zip version of the SDK? Which is the preferred/safest way? I like the Pack installer because I can just click and all dependencies are taken care of.