ULP Process Stops Running after making http POST call

michaelbenbender
Posts: 1
Joined: Tue Dec 14, 2021 2:00 am

ULP Process Stops Running after making http POST call

Postby michaelbenbender » Tue Dec 14, 2021 2:10 am

I have a ULP process that wakes the device on hall sensor input, so when a magnet comes near the device it wakes up. This will work over and over with various functions of my device. Device wakes up, does something, goes to sleep within about 3 seconds. If my device hits the path to use an HTTP client to POST some JSON data, which succeeds and everything looks fine and shuts down, the ULP process for the hall sensor stops working. I can try making a contrived example if that is needed, but I thought as a first pass, if anyone had any thoughts as to why or what an HTTP POST might be doing that you could envision messing with the ULP process.

My app is using Arduino as a component and is built using ESP-IDF. I make use of threads and events. So far in my troubleshooting, only the POST request causes the issue. I have an OTA process that works fine and the ULP process continues to function after it executes (but it's not using HTTP Client... it uses IDF esp ota update functions. Any thoughts or potential leads would be helpful. Thank you!

cdollar
Posts: 5
Joined: Wed Sep 08, 2021 3:57 pm

Re: ULP Process Stops Running after making http POST call

Postby cdollar » Tue Dec 14, 2021 5:53 pm

You might try adding a call to adc1_ulp_enable() before re-entering deep sleep after you've done your HTTP upload. I noticed something similar recently where I had a ULP program reading ADC values, and occasionally waking to upload the values to via MQTT. Simply connecting to wifi was enough to have the ULP hang when trying to get an ADC value after going back to sleep, but adding the call to adc1_ulp_enable() before sleeping seemed to fix it.

Who is online

Users browsing this forum: No registered users and 39 guests