I have quite a few SPI peripherals to be interfaced with nrf52840 chip, for example, Ethernet plug, ATWINC1500 WIFI module etc. What example should i start with to get an idea of the SPI works with nrf52840? I am using sdk15.0.0
Thanks!
I have quite a few SPI peripherals to be interfaced with nrf52840 chip, for example, Ethernet plug, ATWINC1500 WIFI module etc. What example should i start with to get an idea of the SPI works with nrf52840? I am using sdk15.0.0
Thanks!
Hi,
I would recommend that you start with the SPI examples. This example use the SPI master driver directly, and it is quite easy to understand how things work.
The SPI manager example use the SPI manager library, which have a higher abstraction layer on top of the SPI driver. This is useful for handling SPI transactions to multiple SPI slaves, with different configurations (pin, frequency, mode, etc.), but understanding exactly how the example works is a bit more difficult.
If you start with the SPI example first and make this work with a single SPI slave, you can always move to SPI manager after a while if you need to interface multiple devices.
Best regards,
Jørgen
You are only limited by the number of GPIOs used for CS lines and the time available in the CPU to interface the SPI slaves. The nRF52840 have 48 GPIOs, meaning you can interface up to 45 SPI slaves. Note that you can only interface one SPI device at a time with a single SPI interface. If you need to interface multiple SPI slaves simultaneously, the nRF52840 support up to 4 SPI master instances.
You are only limited by the number of GPIOs used for CS lines and the time available in the CPU to interface the SPI slaves. The nRF52840 have 48 GPIOs, meaning you can interface up to 45 SPI slaves. Note that you can only interface one SPI device at a time with a single SPI interface. If you need to interface multiple SPI slaves simultaneously, the nRF52840 support up to 4 SPI master instances.