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

Conflict between SPI1 and TWI1 on nRF51

Hello

I've been having some strange problems with my SPI and TWI bus. In my setup, I'm using SPI0 and TWI1. I noticed that, even though I'm not using it, that SPI1 was consuming a lot of power so I disabled it with NRF_SPI0->ENABLE = 0;.

Now I seem to be having problems with my TWI1 bus, it stops working sometimes when SPI1 is disabled, why is this happening? Are they somehow related? Or how do I stop the SPI1 bus from consuming power when I'm not using it?

Thanks

Parents
  • Thanks, yes they have the same address and from looking at the Peripheral options in the debug menu I can see the TWI1 gets disabled when I disable the SPI1. Do you know a good way to disable the TWI1 bus after I'm finished using it? I've tried disabling with NRF_TWI1->ENABLE = 0; and enabling again with NRF_TWI1->ENABLE = 1; but the bus never re-enables? The combined SPI1/TWI1 bus seems to use a lot of current(~1mA) when its not in use so I'm trying to reduce this.

Reply
  • Thanks, yes they have the same address and from looking at the Peripheral options in the debug menu I can see the TWI1 gets disabled when I disable the SPI1. Do you know a good way to disable the TWI1 bus after I'm finished using it? I've tried disabling with NRF_TWI1->ENABLE = 0; and enabling again with NRF_TWI1->ENABLE = 1; but the bus never re-enables? The combined SPI1/TWI1 bus seems to use a lot of current(~1mA) when its not in use so I'm trying to reduce this.

Children
No Data
Related