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

Two SPI and one I2C master on nRF51

Hi,

I have a custom board someone designed with two SPI masters and one I2C master.  We're now trying to enable the second SPI master and I'm running into errors because you cannot enable SPI1 when TW1 is enabled.


So the simple question is can I use two SPI masters and one I2C master on the nRF51422 simultaneously?  I'm afraid I know my answer already :-/

Best,
Matt

Parents Reply
  • Hi Jørgen,

    That makes sense, but I think my case is different because I want to do the following:

    1) Initialize SPI0, I2C1

    2) Uninitialize I2C1

    3) Initialize SPI1

    So instead of uninitializing/initializing SPI, I want to uninitialize the I2C1 instance and initialize a SPI1 instance.

    I've gotten through uninitializing I2C, but the issue with starting a second SPI is that my #defines in nrf_drv_config.h have SPI1_ENABLED = 0, so all the SPI driver indicies, interrupt settings, etc are not set up for SPI1.

    What's your recommendation for the cleanest way to transition from one to two SPI instances like this?

    Thanks!

    Matt

Children
No Data
Related