Search found 7 matches

by akdogan
Mon Apr 17, 2017 7:52 pm
Forum: General Discussion
Topic: Determining the current APB_CLK frequency
Replies: 5
Views: 10931

Re: Determining the current APB_CLK frequency

Thank you. It worked. Though, I couldn't find RTC_APB_FREQ_REG definition in the SDK files, found it somewhere in a git repo which defines it as RTC_CNTL_STORE5_REG. So, uint32_t apb_freq = ((READ_PERI_REG(RTC_CNTL_STORE5_REG)) & UINT16_MAX) << 12; yielded the answer. It turns out that the APB is ti...
by akdogan
Mon Apr 17, 2017 12:54 pm
Forum: General Discussion
Topic: Determining the current APB_CLK frequency
Replies: 5
Views: 10931

Determining the current APB_CLK frequency

Hi, Timers are clocked by APB_CLK, and the technical reference manual says that APB_CLK is derived by the CPU_CLK source, and gives a table about the relation. What is the proper way of determining the APB_CLK frequency on the fly? It looks like, though I am not sure, the APB_CLK is ticking with 40 ...
by akdogan
Sun Apr 16, 2017 9:31 pm
Forum: General Discussion
Topic: Configuring GPIO using registers in the stub code
Replies: 3
Views: 8402

Re: Configuring GPIO using registers in the stub code

Your reply was quite helpful. Thank you. After studying the gpio.c, I solved the problem. I also found out that I have to deinit gpio after wakeup from deep sleep. Thus, for the record, the following lines shows the corresponding simplified lines in the esp_wake_deep_sleep stub to read () from a spe...
by akdogan
Sun Apr 16, 2017 8:11 pm
Forum: General Discussion
Topic: Configuring GPIO using registers in the stub code
Replies: 3
Views: 8402

Re: Configuring GPIO using registers in the stub code

I'm using GPIO-15, but I can change this choice to another one if needed. Yes you are right gpio_set_direction and gpio_set_pull_mode are not rom functions, and I found the corresponding code in "driver/gpio.c". Thank you. I'll try it. What about "gpio_pad_select_gpio"? I dig a little, and decided t...
by akdogan
Sun Apr 16, 2017 8:01 pm
Forum: General Discussion
Topic: DEEPSLEEP_RESET
Replies: 22
Views: 32644

Re: DEEPSLEEP_RESET

I honestly am not sure. But, resetting the RTC bias voltage solved the problem, thus I "assumed" a hardware bug, maybe I should have chosen my word more carefully. But, what I am sure is that, after inserting those two lines, spurious watchdog resets disappeared, which used to happen after second wa...
by akdogan
Sun Apr 16, 2017 2:17 pm
Forum: General Discussion
Topic: Configuring GPIO using registers in the stub code
Replies: 3
Views: 8402

Configuring GPIO using registers in the stub code

I need to have access to the GPIO as soon as esp32 wakes up from deep sleep. I cannot wait until the start of the user code, which is way too slow due to slow flash wakeup (several hundred miliseconds?). What would be the correct register programming for the corresponding ROM functions: gpio_pad_sel...
by akdogan
Sun Apr 16, 2017 2:12 pm
Forum: General Discussion
Topic: DEEPSLEEP_RESET
Replies: 22
Views: 32644

Re: DEEPSLEEP_RESET

I spent way too much time on the same issue, and finnally solved it. I think it is a bug in revision-0 chips. I solved it by putting two direct register set commands right after esp_default_wake_deep_sleep() in my stub code . esp_default_wake_deep_sleep(); REG_SET_FIELD(RTC_CNTL_REG, RTC_CNTL_DBIAS_...