Search found 61 matches
- Mon Sep 02, 2024 12:49 am
- Forum: ESP-IDF
- Topic: SOLVED: Overriding Compiler Options in a Component
- Replies: 2
- Views: 2506
WORKAROUND: Overriding Compiler Options in a Component
I have finally found a solution to this problem. I have been able to add extra compiler flags with (for example): target_compile_options(${COMPONENT_LIB} PRIVATE -Wunused-function -Werror) However, it didn't work for some errors (such as unused function) because the ESP-IDF build system had already ...
- Thu Feb 22, 2024 11:01 pm
- Forum: ESP-IDF
- Topic: SOLVED: MCPWM - cap_edge in interrupt callback is sometimes WRONG
- Replies: 3
- Views: 925
Re: MCPWM - cap_edge in interrupt callback is sometimes WRONG
Hi. Thanks for the reply. Yes, I think you are correct. I'm guessing that there is some small noise in the signal which causes the edge capture input to trigger several times when it is close to the threshold, e.g. instead of just Low -> High, it goes Low -> High -> Low -> High. Each of these captur...
- Tue Feb 20, 2024 3:15 am
- Forum: ESP-IDF
- Topic: SOLVED: MCPWM - cap_edge in interrupt callback is sometimes WRONG
- Replies: 3
- Views: 925
SOLVED: MCPWM - cap_edge in interrupt callback is sometimes WRONG
Hi, I've set up my ESP32 (WROVER board) to capture the rising and falling edges from a signal which is varying between 2 KHz and 4 KHz. I want to capture edge times and also whether the edge was rising or falling. I have the code working, but the edge value ( event_data->cap_edge ) in the interrupt ...
- Sun Jan 07, 2024 7:12 pm
- Forum: ESP-IDF
- Topic: WORKAROUND: ADC in continuous mode MISSING SAMPLES - 255 Sample LIMIT
- Replies: 7
- Views: 13282
Re: ADC in continuous mode MISSING SAMPLES - 255 Sample LIMIT
@davidribeiro Interesting result... I suspect SYSCON.saradc_ctrl2.meas_num_limit isn't implemented, which is why it is reserved (i.e. the ADC will always reset after N samples due to hardware limitations). FIX / WORKAROUND: I have found a hacky work-around which is working well for us so far: * Modi...
- Wed Dec 06, 2023 11:34 pm
- Forum: ESP-IDF
- Topic: WORKAROUND: ADC in continuous mode MISSING SAMPLES - 255 Sample LIMIT
- Replies: 7
- Views: 13282
Re: ADC in continuous mode MISSING SAMPLES - 255 Sample LIMIT
Any update to this? Has anyone had success by setting "SYSCON.saradc_ctrl2.meas_num_limit = 0" as @ESP_Sprite suggested?
This did not work for me - the ADC "conversion done" callback doesn't occur if the bit is set to 0.
This did not work for me - the ADC "conversion done" callback doesn't occur if the bit is set to 0.
- Fri Dec 01, 2023 2:58 am
- Forum: ESP-IDF
- Topic: WORKAROUND: ADC in continuous mode MISSING SAMPLES - 255 Sample LIMIT
- Replies: 7
- Views: 13282
Re: ADC in continuous mode MISSING SAMPLES - 255 Sample LIMIT
I have tried setting this bit to 0 (by modifying the code in adc_ll.h ), but then the ADC didn't work at all (at least, when using the ADC API, I did not receive the "on_conv_done" callback). It may be worth experimenting some more. However, the TRM does say that the 0 value for this bit is reserved...
- Thu Nov 30, 2023 12:09 am
- Forum: ESP-IDF
- Topic: WORKAROUND: ADC in continuous mode MISSING SAMPLES - 255 Sample LIMIT
- Replies: 7
- Views: 13282
Re: ADC in continuous mode MISSING SAMPLES - 255 Sample LIMIT
UPDATE: I found this in esp32\include\hal\adc_ll.h : #define ADC_LL_DEFAULT_CONV_LIMIT_EN 1 #define ADC_LL_DEFAULT_CONV_LIMIT_NUM 10 These settings are used to set bits in register APB_SARADC_CTRL2_REG: APB_SARADC_MAX_MEAS_NUM (8 bit) APB_SARADC_MEAS_NUM_LIMIT (1 bit). According to comments in the ...
- Mon Nov 27, 2023 2:28 am
- Forum: ESP-IDF
- Topic: WORKAROUND: ADC in continuous mode MISSING SAMPLES - 255 Sample LIMIT
- Replies: 7
- Views: 13282
WORKAROUND: ADC in continuous mode MISSING SAMPLES - 255 Sample LIMIT
Hi, I've set up the ADC in continuous (DMA) mode to store samples to a 1024 byte buffer with 256 byte frame size. The sample rate is 40 kHz and the resolution is 12 bits. I'm feeding a 2.2v, 1 kHz sine wave to the input (input looks good on the scope). I've set up the code with a task which is woken...
- Wed Nov 15, 2023 7:42 pm
- Forum: ESP-IDF
- Topic: Max sample rate with ADC in DMA mode
- Replies: 0
- Views: 1564
Max sample rate with ADC in DMA mode
Hi, I am using the ADC in continuous (DMA) mode to read a signal. Ideally we would like to sample at over 1 MS/s. Using ESP-IDF 4.4.4, with ESP32-WROVER-B module. I have followed the steps here to set up the ADC controller in DMA mode: https://docs.espressif.com/projects/esp-idf/en/v4.3/esp32c3/api-...
- Thu Nov 02, 2023 11:45 pm
- Forum: ESP-IDF
- Topic: xQueueSendToBackFromISR causes Interrupt watchdog timeout
- Replies: 3
- Views: 1213
Re: xQueueSendToBackFromISR causes Interrupt watchdog timeout
Hmm, the stack trace etc above seems to indicate there is a problem on the UART Transmit side. When I push messages to a queue, they eventually trigger another task to send a reply on the UART. I expected the receive interrupt handler to complete once the message was pushed to a queue, so I was hopi...