Search found 566 matches

by boarchuz
Sun Jan 17, 2021 8:54 am
Forum: ESP-IDF
Topic: Does the ULP have a fixed execution frequency?
Replies: 4
Views: 4185

Re: Does the ULP have a fixed execution frequency?

istokm wrote:
Sun Jan 17, 2021 1:16 am
Oh I thought that ESP32_RTC_CLK_SRC also applies to the ULP..
You're right, it does. I assumed you were using 150khz internal. Ignore that part.
by boarchuz
Sat Jan 16, 2021 8:11 am
Forum: ESP-IDF
Topic: Does the ULP have a fixed execution frequency?
Replies: 4
Views: 4185

Re: Does the ULP have a fixed execution frequency?

Cycles for all instructions are included here: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/ulp_instruction_set.html read the RTC_TIME registers at the very beginning, then reading them at the very end of the program, and using the difference to alter the ULPs sleep timer? ...
by boarchuz
Thu Jan 14, 2021 1:29 pm
Forum: General Discussion
Topic: ESP32ULP wakeup question
Replies: 7
Views: 6628

Re: ESP32ULP wakeup question

It's not clear where ULP variable offsets are coming from (eg. debounce_max_count). Maybe I missed something. The xxx->ulp_xxx pattern is only used when compiling ULP assembly. You can't do it that way with legacy macros. See here for an alternative with macros (and ulp_var_t in HULP examples for an...
by boarchuz
Wed Jan 13, 2021 6:41 pm
Forum: General Discussion
Topic: ESP32ULP wakeup question
Replies: 7
Views: 6628

Re: ESP32-S2 module custom programming

It's not clear where ULP variable offsets are coming from (eg. debounce_max_count). Maybe I missed something. For RTCIOs 0-15, you would want RTC_GPIO_IN_NEXT_S to RTC_GPIO_IN_NEXT_S+15. For the upper two you want RTC_GPIO_IN_NEXT_S+16 to RTC_GPIO_IN_NEXT_S+16+1. RTC_CNTL_RDY_FOR_WAKEUP -> RTC_CNTL_...
by boarchuz
Wed Jan 13, 2021 6:33 pm
Forum: Hardware
Topic: sensor_vn used as GPIO39 input
Replies: 2
Views: 2510

Re: sensor_vn used as GPIO39 input

Keypads like this work by toggling column pins output low sequentially, reading the state of each row pin for each column. In case 2, GPIO 35 is used as a column pin yet it is not output capable, so the row pins are always pulled high. 34-39 should only be used as row pins here (with external pullup...
by boarchuz
Wed Jan 13, 2021 2:39 pm
Forum: General Discussion
Topic: ESP32ULP wakeup question
Replies: 7
Views: 6628

Re: RTC-gpio with esp32 Macro legacy not detecting

I_RD_REG(RTC_GPIO_IN_REG,RTC_GPIO_IN_NEXT_S,16), All of these need a look. I_RD_REG is defined as I_RD_REG(reg, low_bit, high_bit) (ie. last arg is *high* bit, not *num bits*). I'll also give https://github.com/boarchuz/HULP a plug. There might be some useful bits in there (it will also support the...
by boarchuz
Wed Jan 13, 2021 8:18 am
Forum: General Discussion
Topic: Adding new GPIO20 define for Arduino framework
Replies: 4
Views: 3247

Re: Adding new GPIO20 define for Arduino framework

Yeah there's a lot more to it. A lot of the Arduino stuff is precompiled so making changes there won't achieve much.

If you're really motivated and you only need simple IO, you might look at ESP-IDF to learn how to initialise and read/write using the registers directly.

I would pick a different pin!
by boarchuz
Wed Jan 13, 2021 6:08 am
Forum: General Discussion
Topic: Adding new GPIO20 define for Arduino framework
Replies: 4
Views: 3247

Re: Adding new GPIO20 define for Arduino framework

You might still run into problems if any drivers check the validity of the pin (eg. pinMode(20, OUTPUT) -> error?).

Something like this will make the compiler stop complaining but don't expect correct functionality:
#define GPIO_NUM_20 ((gpio_num_t)(20))

Using a different pin for now would be best.
by boarchuz
Wed Jan 13, 2021 6:02 am
Forum: ESP32 Arduino
Topic: PicoV3 - Arduino ?
Replies: 6
Views: 5446

Re: PicoV3 - Arduino ?

See section "3.3 Compatibility with ESP32­PICO­D4" of PICO-V3 datasheet: https://www.espressif.com/sites/default/files/documentation/esp32-pico-v3_datasheet_en.pdf If GPIOs 18 and 23 are defaults for any of the Arduino functionality (eg. I2C bus) then you might have issues with libraries that expect...
by boarchuz
Wed Jan 13, 2021 5:54 am
Forum: General Discussion
Topic: RTC Memory in Deep Sleep
Replies: 2
Views: 3267

Re: RTC Memory in Deep Sleep

Try:

Code: Select all

esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_ON);
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_FAST_MEM, ESP_PD_OPTION_ON);