Search found 14 matches

by AndreaS73
Tue Nov 12, 2024 5:27 pm
Forum: General Discussion
Topic: vTaskDelay below 10 ms
Replies: 3
Views: 912

vTaskDelay below 10 ms

In my ESP32-S3 code I noticed that in my main loop I have to add `vTaskDelay(1)` otherwise I get a wdt reset. I guess this is because if I don't suspend for a while my thread, the others cannot run. Since `CONFIG_FREERTOS_HZ` is defined as 100, a delay of just 1 tick is 10 ms, too much! Is there a w...
by AndreaS73
Tue Nov 12, 2024 3:24 pm
Forum: ESP-IDF
Topic: Getting random USB_UART_CHIP_RESET
Replies: 2
Views: 567

Re: Getting random USB_UART_CHIP_RESET

Found the problem.
It was the cable, a faulty cable.
by AndreaS73
Mon Nov 11, 2024 11:32 am
Forum: ESP-IDF
Topic: Getting random USB_UART_CHIP_RESET
Replies: 2
Views: 567

Getting random USB_UART_CHIP_RESET

I made several prototypes of my custom board that is powered by external power supply and uses the USB connection (USB_D+, USB_D-) for programming and UART only. I'm sure I'm doing something wrong in my firmware (quite large) because since few days I'm getting random resets with the cause `USB_UART_...
by AndreaS73
Tue Sep 24, 2024 8:55 am
Forum: Hardware
Topic: Programming ESP32-S3 in custom board
Replies: 1
Views: 1342

Programming ESP32-S3 in custom board

I'm developing a custom board for ESP32-S3. I mounted a quick and dirty prototype and it seems to work, but I have some confusion about the settings in Visual Studio Code and the actual behavior of the board. The hardware is pretty straight-forward: pull-up on chip-enable all the bootstraping pins a...
by AndreaS73
Mon Sep 09, 2024 3:03 pm
Forum: General Discussion
Topic: How many register a Modbus TCP master can read from ESP32
Replies: 1
Views: 1097

How many register a Modbus TCP master can read from ESP32

Using the official TCP Modbus https://docs.espressif.com/projects/esp-modbus/en/latest/esp32/overview_messaging_and_mapping.html as Modbus slave, I wonder how many input registers the master can read with a single operation from ESP32. Is it like the standard? So 256 bytes, and counting for headers/...
by AndreaS73
Mon Aug 26, 2024 12:50 pm
Forum: ESP-IDF
Topic: Checking Wifi NVS data
Replies: 3
Views: 6644

Re: Checking Wifi NVS data

One could also check for WIFI_INIT_CONFIG_MAGIC - that seems to be its purpose Where did you find the magic member for struct wifi_config_t? I cannot find it in the latest stable (5.3): typedef union { wifi_ap_config_t ap; /**< configuration of AP */ wifi_sta_config_t sta; /**< configuration of STA...
by AndreaS73
Wed Jul 31, 2024 4:04 pm
Forum: ESP-IDF
Topic: mbc_slave_get_param_info does not catch different addresses
Replies: 1
Views: 737

Re: mbc_slave_get_param_info does not catch different addresses

After digging it out, it seems the problem is: mb_event_group_t event = mbc_slave_check_event(MB_WRITE_MASK); that does not filter out the readings. For example, my client reads every 1000 ms and sometimes writes a holding register. But `event` has the following value 0x83, hence both reading and wr...
by AndreaS73
Wed Jul 31, 2024 3:37 pm
Forum: ESP-IDF
Topic: mbc_slave_get_param_info does not catch different addresses
Replies: 1
Views: 737

mbc_slave_get_param_info does not catch different addresses

ESP32-S3, here my code derived from the slave example: #include "modbus.h" #include <mbcontroller.h> #include "../resources/modbus_params.h" #include "../utils/settings.h" #include <esp_err.h> #include <esp_log.h> #include <esp_system.h> #include <esp_wifi.h> #include <esp_event.h> #include <esp_log...
by AndreaS73
Wed Jul 31, 2024 7:11 am
Forum: ESP-IDF
Topic: WiFi always fails and then connects
Replies: 3
Views: 1198

Re: WiFi always fails and then connects

My solution: Upon receiving a WiFi disconnect event, start a timer to trigger a (new) connection attempt after a little while. Yeah, I'm doing the same, but it's an ugly workaround! I'd like to understand why it fails and how to fix it. I have other ESP32 boards, programmed using the Arduino framew...
by AndreaS73
Tue Jul 30, 2024 6:32 am
Forum: ESP-IDF
Topic: WiFi always fails and then connects
Replies: 3
Views: 1198

WiFi always fails and then connects

I wrote this code (derived from the examples) for ESP32-S3: #include "task_wifi.h" #include <esp_log.h> #include <esp_system.h> #include <sdkconfig.h> #include <lwip/netdb.h> #include <string.h> #define WIFI_SSID "<ssid>" #define WIFI_PASSWORD "<password>" #define WIFI_DELAY_RETRY 10 #define EXAMPLE...