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

Is there any advantage of using SPI interface over UART while connecting nBLE51822 to any MCU?

I have the option to connect nBLE51822 to MCU via SPI, UART or I2C. But is there any advantage of using SPI/ I2C interface over UART interface while connecting nBLE51822 to any MCU?

  • Hi

    The main advantage of SPI is that you can clock it significantly higher, which means you can either push more data, or take advantage of the quicker transfer speed to reduce the average current consumption.

    Also, since the SPI master sets the clock you don't have any issues with mismatching clock speeds (which can be an issue with UART).

    In general, if you can spare the GPIO I would always recommend using SPI for those reasons. If GPIO count is a larger concern than transfer speed and average current consumption then UART or I2C might be a better option.

    Since SPI communication is always initiated by the SPI master you might want to consider adding an IRQ line, allowing the slave to signal the master when it has data to send. Then you don't have to regularly poll the slave, and you are able to reduce the average current consumption further.

    Best regards
    Torbjørn

Related