-
Notifications
You must be signed in to change notification settings - Fork 928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Support for Adafruit Metro M4 Express Airlift #694
Conversation
This is excellent! Let me know if i can help out in any way, although I do not have the particular board. Regarding the ESP32, I think the ideal situation would be to add the SPI interface support to the current What do you think? |
FYI I read the schematic wrong the ESP32 looks like it is on SPI0 but is also connected to a UART interface that is not in the board definition yet. I'm interested in what you are saying about adding support to the espat library, I'm just trying to understand what that will entail. Does that require a different frimware to be installed on the esp32 chip? I found Adafruit's circuitpython driver for the firmware that is on the chip from the factory but at a glance it doesn't look like it is an AT-style protocol, but maybe the binary "commands" map to AT commands in Espressif's firmware (I need to read it more closely to understand I think). It does look like there is some sort of framing of "packets" being done that the request-response communication is implemented on top of; so if the commands line up with AT commands I think your idea is totally doable (source: https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI/blob/master/adafruit_esp32spi/adafruit_esp32spi.py) Or maybe I am misunderstanding what you mean, it is late here :) In any case I'm down to get it working, I need MQTT so espat would really help me |
The ESP32/ESP8266 official firmware is this: https://github.com/espressif/esp-at It supports either AT commands over UART or AT commands over SPI. The Adafruit and Arduino boards usually use the Arduino WifiNina firmware which is an entirely different API: https://github.com/arduino-libraries/WiFiNINA Regarding the UART on that board, it is common to use the SPI interface to the ESP* boards for commands and the UART for debug output. The ESP32 is probably wired for this scenario on that board. Anyhow, the TinyGo |
Ok I will dig into it, get this flashed and see if I can at least verify that I have the correct pins mapped so that the communication is working, and then jump over to the drivers repo for the rest of that work I guess. As an aside I just noticed the 2.0.0.0 release for that firmware cut 2 days ago with shiny new AT commands for BLE HID devices as well as AT commands for MQTT apparently (!): https://github.com/espressif/esp-at/releases/tag/v2.0.0.0_esp32 |
We perhaps do not want to drag the wifi chip into the base implementation for the board itself. That was my mistake probably. If the pins work as mapped on the expected peripherals then probably it is enough for this PR. |
Sounds good. I think I have at least enough code written for the wifi chip to confirm that the pins are correct. I will do a few final tests make sure everything is ready to merge. |
7685c32
to
522377f
Compare
I've completed my testing and I think this board should be good to go now. |
Looks great @bgould thank you very much for another great contribution. Now squash/merging. |
Link: https://www.adafruit.com/product/4000
Schematic: https://cdn-learn.adafruit.com/assets/assets/000/075/654/original/adafruit_products_schem.png?1557700681
So far it works to flash blinky1 onto the board. I still need to test the serial peripherals and the onboard neopixel. Additionally I need to add pin mappings and another SPI for communicating with the integrated ESP32.
Doing an initial commit now to make sure it makes through CI jobs alright.