Hi, I am using the Feather STM32F405 together with an Airlift Featherwing NCP to connect to a MQTT broker.
The devices should sleep until a message is published. Then the NCP should wake up, wake up the HOST MCU via GPIO and send the message to it.
How do I have to configure the NCP (AT commands) so that I can use the GIPO0 pin to wake up the host MCU?
Best Regards
Eric
Featherwing Airlift: Host MCU wake up by GPIO0 pin
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- erichbieri
- Posts: 7
- Joined: Sun Apr 02, 2017 4:25 pm
- adafruit_support_mike
- Posts: 65030
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Featherwing Airlift: Host MCU wake up by GPIO0 pin
That isn't possible. The ESP32 can only detect new messages while it's running.erichbieri wrote:The devices should sleep until a message is published.
- erichbieri
- Posts: 7
- Joined: Sun Apr 02, 2017 4:25 pm
Re: Featherwing Airlift: Host MCU wake up by GPIO0 pin
Hi Mike,
Thanks for your response. Okay, let's say the NCP stays running, but the host MCU will be put to sleep. Can the NCP be configured so that when it receives a message, it wakes up the host MCU via GPIO0 pin? How can I configure this using AT commands?
Thanks for your response. Okay, let's say the NCP stays running, but the host MCU will be put to sleep. Can the NCP be configured so that when it receives a message, it wakes up the host MCU via GPIO0 pin? How can I configure this using AT commands?
- adafruit_support_mike
- Posts: 65030
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Featherwing Airlift: Host MCU wake up by GPIO0 pin
The AirLift dosn't have an AT-command interface. It communicates with the host microcontroller using our SDEP protocol:
https://github.com/adafruit/Adafruit_Ci ... sp32spi.py
https://learn.adafruit.com/adafruit-fea ... -transport
I don't know of any way to make the Airlift module generate an interrupt when an MQTT update comes in.. in all the cases I know, the client microcontroller polls the Airlift for new information, and triggers a callback if it sees an update.
The closest thing to a usable interrupt I can think of would be the Airlift's READY pin. I don't know if that's tightly enough related to MQTT input to be useful though. Let me check with the people who manage the Airlift firmware.
https://github.com/adafruit/Adafruit_Ci ... sp32spi.py
https://learn.adafruit.com/adafruit-fea ... -transport
I don't know of any way to make the Airlift module generate an interrupt when an MQTT update comes in.. in all the cases I know, the client microcontroller polls the Airlift for new information, and triggers a callback if it sees an update.
The closest thing to a usable interrupt I can think of would be the Airlift's READY pin. I don't know if that's tightly enough related to MQTT input to be useful though. Let me check with the people who manage the Airlift firmware.
- adafruit2
- Posts: 21109
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Featherwing Airlift: Host MCU wake up by GPIO0 pin
the ready pin is used by the underlying SPI protocol - there is no 'host wake on activity' support OTHER than perhaps if you are using it to detect when 'hosted sockets' are opened. see the webserver examples. (this is not mqtt)
that said, airlift firmware is open source! you could modify it to add any behavior you like and load it onto the ESP32 - its not something we can assist with beyond pointing the code location :) https://github.com/adafruit/nina-fw
that said, airlift firmware is open source! you could modify it to add any behavior you like and load it onto the ESP32 - its not something we can assist with beyond pointing the code location :) https://github.com/adafruit/nina-fw
Please be positive and constructive with your questions and comments.