On Saturday, August 13, 2022 we will be working on the Adafruit Customer Support Forums. If you visit over the weekend and things are not complete yet, please check back later, https://adafruit.com/forumupdates
0

Featherwing Airlift: Host MCU wake up by GPIO0 pin
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Featherwing Airlift: Host MCU wake up by GPIO0 pin

by erichbieri on Sun Jul 03, 2022 11:49 am

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

erichbieri
 
Posts: 7
Joined: Sun Apr 02, 2017 4:25 pm

Re: Featherwing Airlift: Host MCU wake up by GPIO0 pin

by adafruit_support_mike on Tue Jul 05, 2022 8:28 pm

erichbieri wrote:The devices should sleep until a message is published.

That isn't possible. The ESP32 can only detect new messages while it's running.

adafruit_support_mike
 
Posts: 64984
Joined: Thu Feb 11, 2010 2:51 pm

Re: Featherwing Airlift: Host MCU wake up by GPIO0 pin

by erichbieri on Wed Jul 06, 2022 11:08 am

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?

erichbieri
 
Posts: 7
Joined: Sun Apr 02, 2017 4:25 pm

Re: Featherwing Airlift: Host MCU wake up by GPIO0 pin

by adafruit_support_mike on Wed Jul 06, 2022 10:00 pm

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.

adafruit_support_mike
 
Posts: 64984
Joined: Thu Feb 11, 2010 2:51 pm

Re: Featherwing Airlift: Host MCU wake up by GPIO0 pin

by adafruit2 on Thu Jul 07, 2022 10:02 pm

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

adafruit2
Site Admin
 
Posts: 21075
Joined: Fri Mar 11, 2005 7:36 pm

Please be positive and constructive with your questions and comments.