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

how to toggle spim1 and twim1

I want to use nrf52832 to communicate with my sensors , but my three sensors should use spis to communicate, the others use TWI ,so in sampling , I need to switch between spi and twi, in the file nrf_drv_config.h when i use spi ,I should #define SPI0_ENABLED 1,change 0 to 1,when i use TWI ,I shoule change do like this ,too:#define TWI0_ENABLED 1. However,the twim1 and the spim1 is the same address, in my project ,when i use spi this time then the next time i should use TWI,i want to ask question is how to toggle spi or twi enable and diasble ?

Related