This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

disabling twi/i2c

Hey, I am using twi_hw_master.c and twi_master.h libraries for twi and want to disable i2c to save power when not in use. I use the following two lines to disable the i2c:

NRF_TWI1->ENABLE       = TWI_ENABLE_ENABLE_Disabled << TWI_ENABLE_ENABLE_Pos; 

NRF_TWI1->POWER        = 0;

but it still works. What other steps do I need to take in order to disable the twi peripheral? I'm using nrf51822 on a custom board with sdk9.0. Thanks, Vandita

Code files: main.c latch_i2c.c

Parents Reply
  • Hey Bjorn, Thanks for your response. I had earlier tried to use the nrf_drv_twi libraries but faced a lot of issues and moved to the incubated libraries instead. The nrf_drv_twi function takes a TWI instance as an argument and that's not available as I'm using the other libraries.

    What other registers need to be written for disabling the TWI? Thanks, Vandita

Children
No Data
Related