This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Getting I2C/TWI working?

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?

thank you.

Parents
  • 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.

  • If you are asking, then my personal opinion is that I would prefer zip. Extract the zip and all the extracted examples work right away. Packs are nice when they work, but they have a lot of dependencies and also many places where it could go wrong. Again it is a personal choice and we recommend you to use zip files. Gives you clear picture of what you are doing. If this has answered your question please accept this answer by clicking ' ✓' near the votes button

Reply
  • If you are asking, then my personal opinion is that I would prefer zip. Extract the zip and all the extracted examples work right away. Packs are nice when they work, but they have a lot of dependencies and also many places where it could go wrong. Again it is a personal choice and we recommend you to use zip files. Gives you clear picture of what you are doing. If this has answered your question please accept this answer by clicking ' ✓' near the votes button

Children
No Data
Related