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

Two different I2C channel definition on nRF52840's GPIO

Hi,

I want to define two different channel for I2C and interface two slave devices. nRF52840 will always be master in this case. As mentioned in the Product Spec. of nRF52840 using PSEL.SCL and PSEL.SDA I2C ports can be defined. 

But in case, of two different GPIO ports, can those be defined at same time in these registers? Or in my firmware I will have to keep re-writing the GPIO port values in these registers when ever the respective slave device has to be accessed?

-Thanks

Parents
  • There are two different TWI instances, TWIM0 and TWIM1. They are at different addresses, they are separate peripherals with separate registers so you can use them both at the same time. You can find the peripheral chart under the 'Memory Map' in the documentation; not as easy to find as it used to be, the index isn't very good. 

Reply
  • There are two different TWI instances, TWIM0 and TWIM1. They are at different addresses, they are separate peripherals with separate registers so you can use them both at the same time. You can find the peripheral chart under the 'Memory Map' in the documentation; not as easy to find as it used to be, the index isn't very good. 

Children
Related