2

I'm would like to make a connection between a ESP32 and a Allwinner A20 CPU in which the ESP32 would provide the Wifi/Bluetooth connectivity for the rest of the system.

They both mention i2c, spi and SDIO in their datasheets.

  • Which one of those would be considered the a best practice?
  • Are the additional protocols that could be taken into account?
TheMeaningfulEngineer
  • 961
  • 3
  • 11
  • 25
  • I'm tempted to flag this as too broad, you're asking how to connect two processors together. That depends entirely upon what your final system architecture will be and I wouldn't trust any answers from anyone who hadn't read through the user manuals for both parts, something that will take far too long to do just to be helpful. – Andrew Nov 04 '16 at 11:09
  • @Andrew I will gladly remove the actual processor references. Their purpose was to make the question less vague. When posting the question I was assuming there is a recommended way on what protocol to use given the constraints wifi would impose. I skipped `UART` because I believe it's to slow to be even considered, but don't know about other protocols. – TheMeaningfulEngineer Nov 04 '16 at 11:13
  • All those buses has a master and slave side, you need to make sure ESP32 supports the slave side. Also SDIO looks promising because I've seen SoCs connected to such WIFI modems like TI's wl18xx series http://www.ti.com/product/WL1801MOD – user3528438 Nov 04 '16 at 11:26
  • If the wifi/bluetooth device was a dumb slave then it would be fairly simple, use the highest bandwidth connection available and double check that you didn't need two connections, one for each radio (e.g. it looks like there's an MII interface on there so MII for wifi and then something simple like uart for BT). But at first glance it looks like it's not just a dumb radio, it's a CPU which you run user code on. At that point I'd be passing the list of options over to the guy who's got to write the firmware and asking him what would make his life easier. – Andrew Nov 04 '16 at 11:33
  • It is mainly a question of data throughput. If you want to get close to the claimed 135Mbps you must use SDIO. I don't know the ESP32, but similar modules will give up to 50Mbps on SPI and 1Mbps on I2C. – Steve G Nov 04 '16 at 11:36
  • Also to get the combination to work with full WIFI with fully functional networking capability for Linux (I assume you run Linux on A20), you need to write the linux driver for the host side(A20) and firmware for the device side, if you can not find existing ones, (which, I guess, you probably won't, because you are probably the first person trying to make such a thing). This would involve a lot of programming. – user3528438 Nov 04 '16 at 11:42
  • 1
    Finally, I don't think ESP32 is necessarily in your design because most, if not all, of the components in ESP32 have equivalents in the A20, except the WIFI and Bluetooth modem. It may not be a bad idea to redesign and move ESP32's tasks to A20 and attach A20 to a WIFI/Bluetooth modem. This makes your software work much easier because you can easily find open source or vendor provided driver and firmware if you pick the right component. – user3528438 Nov 04 '16 at 11:49
  • Thank you, you have given me a lot of insight on the exact scenario. Will change the title to explicitly state using ESP32 as a modem. Will wait if someone wants to condense the comments in an answer, if that doesn't happen, I'll do it and accept it as an answer. – TheMeaningfulEngineer Nov 04 '16 at 12:01
  • Fundamentally you have the wrong collection of parts. If you want to use an A20, use a wifi and/or BT solution commonly used with that, not a barely available new part that will at best be a force fit and will require substantially engineering to get to work in this odd way. – Chris Stratton Nov 04 '16 at 17:22
  • Check out https://github.com/espressif/esp-hosted – Navid Mitchell Nov 05 '20 at 22:54

1 Answers1

0

There are a few reasons why the A20/ESP32 aren't the optimal approach:

  • All those buses has a master and slave side. The ESP32 is a full blown programmable microcontroller which one would run user code on. As such it primary function is to be a master. You need to make sure ESP32 supports the slave side.
  • If the ESP32 is capable of being run as a slave, it will need a custom kernel driver on the Linux side to be able to provide the same userspace API that the "dumb" devices do.

Otherwise, choosing the correct protocol is mainly a question of data throughput and availability of Linux driver support.

TheMeaningfulEngineer
  • 961
  • 3
  • 11
  • 25