Search found 16 matches

by JP5654
Fri May 24, 2024 10:43 pm
Forum: ESP-IDF
Topic: Timer capture with gpio
Replies: 2
Views: 447

Re: Timer capture with gpio

I'm not sure how I can use the pulse counter to do this. The pulse counter just counts edges, I need to correlate an edge with a time stamp. I did end up figuring out how to use the mcpwm timer to achieve my goal. Here's how I did it: //We are using a mcpwm timer in order to be able to query the tim...
by JP5654
Fri May 24, 2024 4:42 am
Forum: ESP-IDF
Topic: Timer capture with gpio
Replies: 2
Views: 447

Timer capture with gpio

I would like to have a free running hardware timer that gets reset on the the edge of an input gpio. I would like to be able to read this counter at various times during execution to be able to know how much time has elapsed since the last edge. Is this possible with any of the esp32 peripherals? It...
by JP5654
Thu May 16, 2024 10:01 pm
Forum: ESP-IDF
Topic: Long critical sections causing missed interrupts
Replies: 1
Views: 401

Long critical sections causing missed interrupts

I finally figured out I was missing interrupts at times and traced it to a critical section in i2s_tdm_set_clock(). That function enters a critical section and calls i2s_hal_set_tx_clock() which calls i2s_hal_calc_mclk_precise_division() which takes 1.6ms! This is on an ESP32S3 running at 240mhz. Th...
by JP5654
Sun Apr 21, 2024 6:26 pm
Forum: ESP-IDF
Topic: ESP32 I2S Read Timeout Problem
Replies: 5
Views: 796

Re: ESP32 I2S Read Timeout Problem

Sorry if my previous response sounded snippy, it wasn't intended that way. I wanted to say that I do very much appreciate your response. The separate configurations is at least a workaround. I can make it work that way, but it's a waste of RAM because my dma and application buffers will need to be d...
by JP5654
Sun Apr 21, 2024 2:49 pm
Forum: ESP-IDF
Topic: ESP32 I2S Read Timeout Problem
Replies: 5
Views: 796

Re: ESP32 I2S Read Timeout Problem

Because the values I'm using are the "proper" values. The rx data will be wrong also if I set data_bit_width=I2S_DATA_BIT_WIDTH_32BIT. The RX should work just fine data_bit_width=I2S_DATA_BIT_WIDTH_16BIT, so my question is why is it not?
by JP5654
Sat Apr 20, 2024 10:08 pm
Forum: ESP-IDF
Topic: ESP32 I2S Read Timeout Problem
Replies: 5
Views: 796

ESP32 I2S Read Timeout Problem

I'm using an ESP32-D0WD-V3 with esp-idf v5.1.2. I'm trying to communicate with a codec that is i2s master that is sending 64 bclks per wclk. The data is 16bits stereo and the sample rate is 16000hz. With the following configuration I am able to transmit data correctly but the read always times out. ...
by JP5654
Fri Jan 19, 2024 5:46 pm
Forum: Report Bugs
Topic: ESP32-S3 Multiple I2s Instances exhausts interrupt resources
Replies: 6
Views: 53868

Re: ESP32-S3 Multiple I2s Instances exhausts interrupt resources

If you are setting up your own interrupt and want it to be a shared interrupt you can just pass ESP_INTR_FLAG_SHARED for flags to: esp_intr_alloc(int source, int flags, intr_handler_t handler, void *arg, intr_handle_t *ret_handle) If you are using a driver and want it to setup its interrupts as shar...
by JP5654
Thu Dec 07, 2023 11:38 pm
Forum: ESP-IDF
Topic: ESP32s3 Disable JTAG/Serial RTS Reset
Replies: 2
Views: 3567

ESP32s3 Disable JTAG/Serial RTS Reset

When a terminal disconnects from the ESP32s3 JTAG/Serial port the cpu gets reset. This must be because the terminal is clearing RTS. I'm sure there's a fuse I can burn to disable this but I would like to be able to retain the functionality but dynamically disable it from my application. I can't see ...
by JP5654
Tue Sep 05, 2023 4:37 pm
Forum: ESP-IDF
Topic: I2s DMA buffer size incorrect
Replies: 5
Views: 3363

Re: I2s DMA buffer size incorrect

Ah I'm sorry for not clarifying, you are correct, I didn't mention that I'm using ESP32-S3 with ESP-IDFv5.1.

Ya so I guess it's not clear with the ESP32-S3. Hopefully somebody from Espressif can comment on it. Thanks for your help!
by JP5654
Tue Sep 05, 2023 4:25 pm
Forum: ESP-IDF
Topic: I2s DMA buffer size incorrect
Replies: 5
Views: 3363

Re: I2s DMA buffer size incorrect

I guess the other thing I should mention, I'm not seeing any bits being dropped. I am getting my data correctly. So maybe this comment only applied for older versions of the i2s driver?