Search found 11 matches
- Wed Apr 17, 2024 8:38 pm
- Forum: ESP-IDF
- Topic: Understanding ADC Continuous Mode Configuration
- Replies: 0
- Views: 761
Understanding ADC Continuous Mode Configuration
It said in the document of ADC Continuous Mode ( https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/peripherals/adc_continuous.html ), to use ADC Continuous Mode, we need to set the ADC channels, sampling frequency, conversion frame size and max buffer size. But the question...
- Sun Apr 14, 2024 3:29 am
- Forum: ESP-IDF
- Topic: FreeRTOS xSemaphoreTake assert failed
- Replies: 2
- Views: 1298
Re: FreeRTOS xSemaphoreTake assert failed
It's likely a buffer overflow or some other memory corruption somewhere, but between the magic values that you use (3? 2000? 2048?) I have a hard time squirreling out what's happening exactly. 3 means there're 3 ADC channels running, 2048 is the max buffer size of ADC, in bytes (BTW my ADC conversi...
- Sat Apr 13, 2024 9:32 pm
- Forum: ESP-IDF
- Topic: FreeRTOS xSemaphoreTake assert failed
- Replies: 2
- Views: 1298
FreeRTOS xSemaphoreTake assert failed
I'm using ESP32-S3 to calculate RMS of sine wave signal input from ADC. I use ADC 1 continuous mode, trigger adc_continuous_read by GPTimer and FreeRTOS task, then pass ADC conversion result to another task by queue, store all conversion results, finally calculate root-mean-square after getting enou...
- Fri Apr 12, 2024 3:31 pm
- Forum: ESP-IDF
- Topic: FreeRTOS Task causes TWDT triggered
- Replies: 14
- Views: 3822
Re: FreeRTOS Task causes TWDT triggered
Hi I would not do parameter passing via global variables not protected by mutex ( spinlock ) In ESP-IDF there are proper mechanisms to pass data between tasks ( queue .... ), gpio_task received data, sent it to the queue, oled_task took it from the queue and sent it to the screen Yeah, I know passi...
- Fri Apr 12, 2024 6:21 am
- Forum: ESP-IDF
- Topic: FreeRTOS Task causes TWDT triggered
- Replies: 14
- Views: 3822
Re: FreeRTOS Task causes TWDT triggered
Hm, no clue. Any other tasks doing anything with lvgl? Wondering if you may have some sort of concurrency issue. No, only oled_task operates with LVGL. The only reason I can image is, while oled_task updating LVGL label, gpio_task become ready, and since gpio_task has a higher priority (10), FreeRT...
- Fri Apr 12, 2024 5:44 am
- Forum: ESP-IDF
- Topic: FreeRTOS Task causes TWDT triggered
- Replies: 14
- Views: 3822
Re: FreeRTOS Task causes TWDT triggered
var is defined in as a global variable, passed into gpio_init, gpio_task, oled_init and oled_task as a pointer.ESP_Sprite wrote: ↑Fri Apr 12, 2024 2:27 amWhere and how is 'var' defined? You sure it doesn't go out of scope?
Code: Select all
uint32_t realVariable;
void app_main() {
gpio_init(&realVariable);
oled_init(&realVariable);
}
- Thu Apr 11, 2024 8:05 pm
- Forum: ESP-IDF
- Topic: FreeRTOS Task causes TWDT triggered
- Replies: 14
- Views: 3822
Re: FreeRTOS Task causes TWDT triggered
Hi If your queue is empty xQueueueReceive(queue, &message, 0) will return control immediately without delay, you will get a loop without waiting, put xQueueueReceive(queue, &message, portMAX_DELAY) Thanks for your reply! Now gpio_task won't trigger TWDT anymore. But another problem came out. I have...
- Thu Apr 11, 2024 12:58 am
- Forum: ESP-IDF
- Topic: FreeRTOS Task causes TWDT triggered
- Replies: 14
- Views: 3822
Re: FreeRTOS Task causes TWDT triggered
My point is that the vTaskDelay doesn't do anything with a wait time of less than 10mS, so having it there or not having it there does not make a difference, as you found. This is expected behaviour. If your question is why your task triggers the TWDT in general, I'd suggest you post its full code....
- Wed Apr 10, 2024 10:35 pm
- Forum: ESP-IDF
- Topic: FreeRTOS Task causes TWDT triggered
- Replies: 14
- Views: 3822
Re: FreeRTOS Task causes TWDT triggered
Your tick frequency (by default) is 100Hz, so 0.5mS is less than a tick. That gets rounded down to 0, making the vTaskDelay not do anything. Suggest you either use an esp_timer callback, or something like a hardware timer to do the thing you want. Thanks for the reply. Actually, what I'm doing in t...
- Sun Apr 07, 2024 4:45 pm
- Forum: ESP-IDF
- Topic: FreeRTOS Task causes TWDT triggered
- Replies: 14
- Views: 3822
FreeRTOS Task causes TWDT triggered
I'm new to ESP-IDF and FreeRTOS. I'm using ESP32-S3 and ESP-IDF v5.2.1. I have a FreeRTOS task which runs at a high frequency (for example, 2000Hz). I added vTaskDelay(0.5 / portTICK_PERIOD_MS) at the end of the task, but then the task caused Task Watchdog Timer triggered, and all code after xTaskCr...