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

Thingy91: Wifi over SPI or UART?

Dear all,

after some customs problems I hope I finally will receive my Thingy 91 tomorrow. I have already installed the toolchain and done some readup on the device for the project I'd like to evaluate. I will need access to a Wifi module and I have found 2 modules with available breakouts: ESP8266 and ATWINC1500. The first is over UART while the second is SPI. For what I could find out on this forum full of good advice both methods should in principle be possible

1) UART over uart1, pins 22-25, which requires removing solder bridges and I loose modem tracing

https://devzone.nordicsemi.com/f/nordic-q-a/52545/receive-external-data-through-uart-on-thingy-91

2) SPI over pin 03-05, deselecting the accelerometer with pin 07 and using pin 10 as CS for the external device.

https://devzone.nordicsemi.com/f/nordic-q-a/66111/asset-tracker---adding-spi-sensor/271405#271405

As I am quite a beginner: Are both ways feasible? Any caveats I should have in mind (besides the 1.8V logic level on the Thingy side)? SPI is probably more complicated to program, I coud only find the st25r3911b library as an example implementation.  I won't need to transfer a lot of data, so transfer speed is not much of a problem.

Any advice greatly appreciated!

Parents
  • Hi!

    According to the tickets you linked, it looks like both ways are feasible yes. 

    The main advantage of SPI is the communication speed, as SPI is significantly faster than UART.

    But I think losing access to modem tracing is a bad idea. If you have trouble developing an application and need help from DevZone later to figure out why, our job will be much easier if you have a modem trace available. So, based on that I would recommend the ATWINC1500. 

    As for programming, Zephyr has an SPI driver (ncs/zephyr/drivers/spi). Unfortunately there is no official SPI sample available in NCS, but we have a sample written by one of my colleagues in Tech Support. You can find it in this this git repo. If you are working on the latest NCS tag, this sample won't build but I've attached a modified version that should build for NCS 1.4.0. 

     3806.spi.zip

    FYI: there is also a driver for the ATWINC1500 (ncs/zephyr/drivers/wifi/winc1500) which you can use by enabling the config CONFIG_WIFI_WINC1500.

    Please let me know if you have any more questions!

    Best regards,

    Heidi

Reply
  • Hi!

    According to the tickets you linked, it looks like both ways are feasible yes. 

    The main advantage of SPI is the communication speed, as SPI is significantly faster than UART.

    But I think losing access to modem tracing is a bad idea. If you have trouble developing an application and need help from DevZone later to figure out why, our job will be much easier if you have a modem trace available. So, based on that I would recommend the ATWINC1500. 

    As for programming, Zephyr has an SPI driver (ncs/zephyr/drivers/spi). Unfortunately there is no official SPI sample available in NCS, but we have a sample written by one of my colleagues in Tech Support. You can find it in this this git repo. If you are working on the latest NCS tag, this sample won't build but I've attached a modified version that should build for NCS 1.4.0. 

     3806.spi.zip

    FYI: there is also a driver for the ATWINC1500 (ncs/zephyr/drivers/wifi/winc1500) which you can use by enabling the config CONFIG_WIFI_WINC1500.

    Please let me know if you have any more questions!

    Best regards,

    Heidi

Children
No Data
Related