Search found 12 matches

by mustafacc
Wed Nov 08, 2017 6:51 am
Forum: ESP-IDF
Topic: Setting a GPIO pin to high inside the wake stub
Replies: 1
Views: 4049

Re: Setting a GPIO pin to high inside the wake stub

Got it:

I can use gpio_output_set from gpio.h library:

to trigger a pin to HIGH, find the pin register, i.e. for IO4 it is BIT4 and:

Code: Select all

gpio_output_set(BIT4, 0, BIT4, 0);
similarly, to trigger the pin to low:

Code: Select all

gpio_output_set(0, BIT4, BIT4, 0);
by mustafacc
Wed Nov 08, 2017 4:13 am
Forum: ESP-IDF
Topic: Setting a GPIO pin to high inside the wake stub
Replies: 1
Views: 4049

Setting a GPIO pin to high inside the wake stub

Is it possible to set an RTC GPIO pin to high inside the wake stub?

Cheers,
Mustafa
by mustafacc
Mon Oct 16, 2017 1:49 am
Forum: ESP-IDF
Topic: Is it possible to log the time between deep sleep wake up stubs function calls?
Replies: 7
Views: 13645

Re: Is it possible to log the time between deep sleep wake up stubs function calls?

Also a question regarding the code snippet where you put the device back to deep-sleep inside the wake-stub: // Set the pointer of the wake stub function. REG_WRITE(RTC_ENTRY_ADDR_REG, (uint32_t)&wake_stub); // Go to sleep. CLEAR_PERI_REG_MASK(RTC_CNTL_STATE0_REG, RTC_CNTL_SLEEP_EN); SET_PERI_REG_MA...
by mustafacc
Sun Oct 15, 2017 9:19 pm
Forum: Hardware
Topic: Module ground/thermal pads
Replies: 4
Views: 13810

Re: Module ground/thermal pads

I'm interested in confirming this as well. Most modules with thermal pads are usually mounted on exposed copper and I assume this would be the case for the ESP32.
by mustafacc
Sun Oct 15, 2017 4:56 pm
Forum: ESP-IDF
Topic: Is it possible to log the time between deep sleep wake up stubs function calls?
Replies: 7
Views: 13645

Re: Is it possible to log the time between deep sleep wake up stubs function calls?

The idea is to detect the type of clicks, so If I start a timer once a single click is detected, click count = 1, a timer starts (<.5 sec or so) and the system goes back to sleep. If a second click is detected then click count = 2 and thus the click type is a quick double-click. If the original time...
by mustafacc
Sun Oct 15, 2017 6:02 am
Forum: ESP-IDF
Topic: Is it possible to log the time between deep sleep wake up stubs function calls?
Replies: 7
Views: 13645

Re: Is it possible to log the time between deep sleep wake up stubs function calls?

Thanks for getting back to me. I tried implementing the rtc_time_get function in the wake-stub, however, I'm getting nonsense values for t whenever I print "t" in wake stub call. Most times it's either t == 1073343027 and in the range of t=48770 (either increasing or decreasing randomly). I'm thinki...
by mustafacc
Sat Oct 14, 2017 9:52 pm
Forum: ESP-IDF
Topic: Is it possible to log the time between deep sleep wake up stubs function calls?
Replies: 7
Views: 13645

Is it possible to log the time between deep sleep wake up stubs function calls?

I'm writing a program that detects the type of clicks on a GPIO pin (single click/double click/ etc...) while the device is on deep sleep. I'm basing my code on Ivan's deep sleep click count example: https://gist.github.com/igrr/54f7fbe0513ac14e1aea3fd7fbecfeab So far I got that example to work on m...
by mustafacc
Wed Sep 06, 2017 4:46 am
Forum: General Discussion
Topic: Detecting double clicks, long clicks on ext0 wake up source
Replies: 5
Views: 9678

Re: Detecting double clicks, long clicks on ext0 wake up source

Can anyone please give me any hints or insight about that ^?
by mustafacc
Tue Sep 05, 2017 2:37 am
Forum: General Discussion
Topic: Battery voltage reading via ADC
Replies: 7
Views: 25608

Battery voltage reading via ADC

I'm seeing an interesting behavior from the ESP32 ADC when I'm trying to measure the ESP32's power supply's voltage (LiPo battery). I have my source supplying battery connected to a voltage divider (since the board is powered by 3.3v), and that divided voltage is connected to an ADC pin. I'm reading...
by mustafacc
Mon Sep 04, 2017 10:13 pm
Forum: General Discussion
Topic: Detecting double clicks, long clicks on ext0 wake up source
Replies: 5
Views: 9678

Re: Detecting double clicks, long clicks on ext0 wake up source

I'm having another issue related to ext0 wake up but I didn't want to open another thread so here it is I have my ext0 attached to gpio33 (which is an rtc gpio). In terms of hardware, it is simply attached to a button that will ground it as soon as the button is pressed. I'm printing the wakeup reas...