Hi,
I am getting assertion failed error as below:
/components/freertos/queue.c:1445 (xQueueGenericReceive)- assert failed!
I am using ESP-32 in AP-STA mode.
When I start my module, it gets connected to the AP by reading the data stored in nvs. After connection, data is sent to UART in queue (2 queues are used to receive UART data). Out of 2 queue, 1 queue is received by the http client which sends data to http server and the other queue is received by tcp_server to send data to tcp client. When a station tries to connect to AP after few data exchange over UART, it gets rebooted and throw the above error and then allows the station to connect with the AP.
There are three tasks running in esp with stack size of 4096 each.
Please suggest as how to handle this error. Where is it coming from??
Thanks
R.
(xQueueGenericReceive)- assert failed!
Re: (xQueueGenericReceive)- assert failed!
Assert checks to see if the scheduler is suspended.
Do any of your tasks suspend the scheduler by calling vTaskSuspendAll()?
Code: Select all
configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
Re: (xQueueGenericReceive)- assert failed!
The only places where the scheduler currently gets suspended are in FreeRTOS timers/event groups and SPI Flash. Since NVS uses SPI Flash, I suspect this may be the source of the problem.
Could you provide the following:
- Log output with backtrace
- Description of what each task was doing, and their priorities
Thanks!
Could you provide the following:
- Log output with backtrace
- Description of what each task was doing, and their priorities
Thanks!
Re: (xQueueGenericReceive)- assert failed!
Hi,
I have sorted this problem.
But facing a different problem in HTTP client. When I send data quickly, it starts giving this error.
E (425791) TRANS_TCP: Error create socket
E (425801) HTTP_CLIENT: Connection failed, sock < 0
E (425801) http_client: HTTP POST request failed: ESP_ERR_HTTP_CONNECT
Below is the code snippet from where the error is coming.
err = esp_http_client_perform(client);
if (err == ESP_OK)
{
ESP_LOGI(HTAG, "HTTP POST Status = %d, content_length = %d",
esp_http_client_get_status_code(client),
esp_http_client_get_content_length(client));
}
else
{
ESP_LOGE(HTAG, "HTTP POST request failed: %s", esp_err_to_name(err));
}
esp_http_client_close(client);
esp_http_client_cleanup(client)
Please suggest how to handle this error.
Thanks
R.
I have sorted this problem.
But facing a different problem in HTTP client. When I send data quickly, it starts giving this error.
E (425791) TRANS_TCP: Error create socket
E (425801) HTTP_CLIENT: Connection failed, sock < 0
E (425801) http_client: HTTP POST request failed: ESP_ERR_HTTP_CONNECT
Below is the code snippet from where the error is coming.
err = esp_http_client_perform(client);
if (err == ESP_OK)
{
ESP_LOGI(HTAG, "HTTP POST Status = %d, content_length = %d",
esp_http_client_get_status_code(client),
esp_http_client_get_content_length(client));
}
else
{
ESP_LOGE(HTAG, "HTTP POST request failed: %s", esp_err_to_name(err));
}
esp_http_client_close(client);
esp_http_client_cleanup(client)
Please suggest how to handle this error.
Thanks
R.
-
- Posts: 9727
- Joined: Thu Nov 26, 2015 4:08 am
Re: (xQueueGenericReceive)- assert failed!
Great to hear that you sorted out the problem. Can you indicate what the issue / solution turned out to be, so future readers can also perhaps solve this? Also, I'd suggest opening a new topic for your new issue, as people familiar with the webserver possibly aren't interested in a FreeRTOS issue.
Re: (xQueueGenericReceive)- assert failed!
Hi,
That was event related issue for AP+STA mode. Giving 2ms delay solved my problem.
Thanks
R.
That was event related issue for AP+STA mode. Giving 2ms delay solved my problem.
Thanks
R.
Who is online
Users browsing this forum: Baidu [Spider], MicroController and 136 guests