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

Is it impossible to use TWI and SPI together on nrf52810?

As the title says,

I combined the TWI function with the ble_app_uart example and the three i2c sensor communication was successful.

However, when I added SPI to develop TFT LCD, SPI communication was not possible.

Can't I use TWI and SPI together on the nRF52810 chip?

Parents
  • Did you enable the SPIM instance in the sdk_config?

    In other MCUs (like the nRF52840) the TWI0/SPI0 for example share the same address, so you need to use different instance IDs.

    But in the nRF52810, as there's only 1 of each (SPI0, TWI0, UARTE0) - each has its own address, so use the same instance ID for each instance

    static const nrfx_spim_t m_spim0 = NRFX_SPIM_INSTANCE(0);
    static const nrfx_twim_t m_twim0 = NRFX_TWIM_INSTANCE(0);

  • That's right. The spi and twi instances are set to zero.

    First of all, I need to make sure the cause of the problem is clear.

    I haven't found out whether the circuit is a problem or my code is a problem yet.

    It was very helpful just to make sure that there was no problem using twi and spi together.

    Thank you for your help.

Reply
  • That's right. The spi and twi instances are set to zero.

    First of all, I need to make sure the cause of the problem is clear.

    I haven't found out whether the circuit is a problem or my code is a problem yet.

    It was very helpful just to make sure that there was no problem using twi and spi together.

    Thank you for your help.

Children
Related