Difference between SPI and UART for HCI BLE

Hello everyone,

We are working on a new project and we will be using BLE over a HCI interface, and we are wondering what is the best HW interface for HCI. We do not have a fixed HW setup for now, and we are testing BLE HCI on a 9160DK which as far as I know supports lpuart HCI.

We would like to know if there is a clear difference between UART/LPUART and SPI speed, stability and low power wise ?

If you have any documentation on this matter I'll gladly dive into it

Thanks

Parents
  • Hello BCartier,

    Thank you for this interesting question. I will try to dig up some relevant material. Details regarding how much data and how often might be relevant as well as how the resources of your devices are in use by your application. A PPK2 could also be handy in order to test your specific use case.

    I am checking with the team for relevant material and experiences.

  • It looks like many of the points below are in favor of SPI.

    Pro SPI:

    • SPI is faster as it is a synchronous protocol.
    • SPI supports up to 8MHz.
    • UART is usually using 115200 but also works up to 1M.
    • UART is slower due to start and stop bits.
    • The run current for SPI and UART are not too different.
    • If, for example, SPI runs 10x faster than UART, current consumption will be roughly 10x less.
    • As UART is asynchronous one would need to run the HF clock from an external crystal to get good enough accuracy.
    • SPI has its own clock and should be stable as long as the signal lines can follow the speed. This requires testing.

    Pro UART:

    • SPI master must run the clock when receiving from slave. As long as this is implemented in the driver it should not be any problem
    • SPI requires four pins(if you are not already using SPI), UART can be implemented with two. However, if one would like to use UART in a low power application one would use two extra pins for flow control, in order to know when to turn off RX. So they require four pins each.
Reply
  • It looks like many of the points below are in favor of SPI.

    Pro SPI:

    • SPI is faster as it is a synchronous protocol.
    • SPI supports up to 8MHz.
    • UART is usually using 115200 but also works up to 1M.
    • UART is slower due to start and stop bits.
    • The run current for SPI and UART are not too different.
    • If, for example, SPI runs 10x faster than UART, current consumption will be roughly 10x less.
    • As UART is asynchronous one would need to run the HF clock from an external crystal to get good enough accuracy.
    • SPI has its own clock and should be stable as long as the signal lines can follow the speed. This requires testing.

    Pro UART:

    • SPI master must run the clock when receiving from slave. As long as this is implemented in the driver it should not be any problem
    • SPI requires four pins(if you are not already using SPI), UART can be implemented with two. However, if one would like to use UART in a low power application one would use two extra pins for flow control, in order to know when to turn off RX. So they require four pins each.
Children
Related