Search found 29 matches

by wuyuanyi
Wed Nov 27, 2024 7:51 am
Forum: ESP-IDF 中文讨论版
Topic: ESP32C3 WIFI 问题
Replies: 4
Views: 7223

Re: ESP32C3 WIFI 问题

最后自己找到的问题之所在,倒腾了好久,发现wifi发射的Power值超出了要求的设定值,获取到默认值是100,而要求设定tx_power是在84以内。 最后通过esp_wifi_set_max_tx_power函数设定20,即5dBm的功率为发送频率,wifi就正常连接和通信,不知道这个是不是bug? 在 https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32/api-reference/network/esp_wifi.html#_CPPv425esp_wifi_set_max_tx_power6int8_t 中对esp...
by wuyuanyi
Tue Sep 03, 2024 7:55 am
Forum: ESP-IDF
Topic: Is it possible to enable Pulse Counter (PCNT) and gpio interrupt on the same pin?
Replies: 3
Views: 1792

Re: Is it possible to enable Pulse Counter (PCNT) and gpio interrupt on the same pin?

Welp, I could confirm that the correct combination to make PCNT and gpio interrupt work simultaneously is: PCNT setup -> gpio config -> gpio interrupt handler
by wuyuanyi
Tue Sep 03, 2024 5:13 am
Forum: ESP-IDF
Topic: Is it possible to enable Pulse Counter (PCNT) and gpio interrupt on the same pin?
Replies: 3
Views: 1792

Re: Is it possible to enable Pulse Counter (PCNT) and gpio interrupt on the same pin?

I have tried gpio_config > gpio_add_handler > pcnt setup as well as gpio_config > pcnt setup > gpio_add_handler. In either case,only pcnt works. the interrupt handler won't be called. Without pcnt the interrupt worked
by wuyuanyi
Mon Sep 02, 2024 4:57 pm
Forum: ESP-IDF
Topic: Is it possible to enable Pulse Counter (PCNT) and gpio interrupt on the same pin?
Replies: 3
Views: 1792

Is it possible to enable Pulse Counter (PCNT) and gpio interrupt on the same pin?

Hi, I am implementing a pulse counter for an encoder. I would also like to capture the edge in ISR and perform some action. However, when both PCNT and interrupt using `gpio_isr_handler_add`, the interrupt handler no longer gets called. I assume this was because the signal was routed to PCNT periphe...
by wuyuanyi
Mon May 06, 2024 1:27 am
Forum: General Discussion
Topic: Possibility to automatically detect Octal/Quad PSRAM?
Replies: 0
Views: 671

Possibility to automatically detect Octal/Quad PSRAM?

Hello all, I designed a prodcut with ESP32S3NxR2 and the firmware was set to using quad PSRAM lines. However, due to stock issue a recent batch was assembled with ESP32S3NxR8. While I was told the R8 version is compatible with R2 in quad mode, it turned out to be not true and I was getting E (323) q...
by wuyuanyi
Wed Dec 06, 2023 7:46 am
Forum: ESP-IDF
Topic: What is the purpose of using httpd_queue_work?
Replies: 4
Views: 9385

Re: What is the purpose of using httpd_queue_work?

I succeed implementing the asynchronous response using the following code Note the commented code, where I assumed that httpd_queue_work is used to delegate the http communication to the http server thread. However, without using httpd_queue_work it works just fine. This makes me wonder more when h...
by wuyuanyi
Sat Jan 07, 2023 2:49 pm
Forum: ESP-IDF
Topic: What is the purpose of using httpd_queue_work?
Replies: 4
Views: 9385

Re: What is the purpose of using httpd_queue_work?

I succeed implementing the asynchronous response using the following code Note the commented code, where I assumed that httpd_queue_work is used to delegate the http communication to the http server thread. However, without using httpd_queue_work it works just fine. This makes me wonder more when ht...
by wuyuanyi
Sat Jan 07, 2023 12:44 pm
Forum: ESP-IDF
Topic: What is the purpose of using httpd_queue_work?
Replies: 4
Views: 9385

What is the purpose of using httpd_queue_work?

Hi, I am looking at the http server component and found this function: httpd_queue_work. After tracing the source code, I found that It merely ask the http server thread to invoke the work callback immediately. The callback is not called in a standalone thread. I wonder what is the purpose of using ...
by wuyuanyi
Tue Dec 06, 2022 8:20 am
Forum: General Discussion
Topic: esp_event: event finalization callback function
Replies: 4
Views: 2784

Re: esp_event: event finalization callback function

I think this approach with the "magic" size value would result in less readable code of the application. You could probably add a function-like macro to "hide" this detail, and make the calling code look nicer, but then it's not going to be any different to introducing a new API. Also, would it be ...
by wuyuanyi
Tue Dec 06, 2022 6:31 am
Forum: General Discussion
Topic: esp_event: event finalization callback function
Replies: 4
Views: 2784

Re: esp_event: event finalization callback function

Hi wuyuanyi, What you describe should be possible. We could introduce something like esp_event_post_moved which would take ownership of the pointer and would accept the deletion callback argument instead of event_data_size. Internally the deletion callback (finalizer) could be stored in an esp_even...