Search found 65 matches

by dg9ngf
Mon Dec 15, 2025 9:28 pm
Forum: ESP-IDF
Topic: Interrupt watchdog restart when writing to NVS
Replies: 5
Views: 2329

Re: Interrupt watchdog restart when writing to NVS


First thing to check would be that "nvsHandle" and "key" are actually still valid when this gets executed.


Can I keep the handle for longer (i.e. the entire runtime) or am I supposed to open and close the NVS for each access?

key is a constant literal string passed as a parameter, it cannot be ...
by dg9ngf
Mon Dec 15, 2025 8:31 pm
Forum: ESP-IDF
Topic: Interrupt watchdog restart when writing to NVS
Replies: 5
Views: 2329

Re: Interrupt watchdog restart when writing to NVS

During debugging, I found that I can set every single key exactly once, no matter from which context. Every second set for the same key crashes the device. Deleting the key first seems to help, I can now write data multiple times from everywhere. Is this normal?


bool nvsSetUInt32(const char* key ...
by dg9ngf
Mon Dec 15, 2025 7:25 pm
Forum: ESP-IDF
Topic: Interrupt watchdog restart when writing to NVS
Replies: 5
Views: 2329

Interrupt watchdog restart when writing to NVS

Hello,

I'm a first-time NVS user and have read the documentation about it and looked at the example code. I was able to write a few entries to NVS and the data can be read and it persists a power cycle. So I guess it works.

But at one point in the program, the device restarts when I want to write ...
by dg9ngf
Mon Dec 01, 2025 9:18 pm
Forum: Hardware
Topic: Measure ADC VREF
Replies: 0
Views: 3346

Measure ADC VREF

Hello,

I'm trying to use the ESP32 ADC again and the result was a bit off. I measured 0.73 V and the code result after calibration is 0.77 V. For the temperature sensor I'm using (MCP9700B) that makes around 4 °C more than actual. While the sensor's purpose is to detect overheating of the device, I ...
by dg9ngf
Thu Jun 19, 2025 5:06 pm
Forum: ESP-IDF
Topic: UART activity detection
Replies: 4
Views: 179

Re: UART activity detection

Quick update: it doesn't work yet.

If I call all the functions
- gpio_pad_select_gpio
- gpio_set_direction
- gpio_set_intr_type
- gpio_isr_register
- gpio_intr_enable
then the ESP32 won't receive anything anymore.

If I leave out the first two, receiving works again. Same if I do call all of the ...
by dg9ngf
Thu Jun 19, 2025 11:08 am
Forum: ESP-IDF
Topic: UART activity detection
Replies: 4
Views: 179

Re: UART activity detection

Would it help to do this for setup to disable any unnecessary delays before sending?


CLEAR_PERI_REG_MASK(UART_IDLE_CONF_REG(RS485RX_GPIO), UART_TX_IDLE_NUM_M);


I've looked at this collision detection feature before, then later discarded it as unusable in my case, and now looked at it again. It ...
by dg9ngf
Thu Jun 19, 2025 11:00 am
Forum: Documentation
Topic: ESP32 GPIO Configuration (gpio_pad_select_gpio)
Replies: 4
Views: 42683

Re: ESP32 GPIO Configuration (gpio_pad_select_gpio)

This helped: https://github.com/espressif/ESP8266_RTOS_SDK/pull/477

I needed to add this to get the function:

#include <rom/gpio.h>

And apparently this function is undocumented outside the source code. Isn't the online documentation generated from the code?
by dg9ngf
Wed Jun 11, 2025 9:11 pm
Forum: ESP-IDF
Topic: UART activity detection
Replies: 4
Views: 179

UART activity detection

Hello,

I want to avoid collisions on my RS-485 bus and not start sending anything if another transmission has already started. On an AVR MCU I can have the UART receive byte interrupt and also have an interrupt handler for level changes on that pin (i.e. going from high to low) as an immediate ...
by dg9ngf
Sat May 31, 2025 9:46 am
Forum: ESP-IDF
Topic: How to reduce UART RX Latency
Replies: 6
Views: 5791

Re: How to reduce UART RX Latency


If not, you can also use uart_set_rx_full_threshold() and/or uart_set_rx_timeout() .


Thank you, I did that. However, I cannot see a difference yet. For testing, I set it to trigger the interrupt after only 3 bytes while receiving messages of around 20 bytes. With this, I can immediately see all ...
by dg9ngf
Tue May 27, 2025 5:56 pm
Forum: ESP-IDF
Topic: How to reduce UART RX Latency
Replies: 6
Views: 5791

Re: How to reduce UART RX Latency

While this thread is very old, it still seems to be perfectly valid today. I'm doing the same, trying to solve the same problem. ChatGPT has pointed me to this function (yes, it's 2025 😉) but of course failed to provide working code or explain it well (maybe in 10 years). Unfortunately, the official ...

Go to advanced search