Page 1 of 1

Error at vTaskDelay

Posted: Sat Dec 30, 2017 7:15 am
by kartikkman
Hi ,
I was trying to implement a simple porgram on ESP_32 to learn about task & Logs , I tried to run program but it is making esp-32 constantly reset . Could you help me out ??

Code: Select all

#include"driver/gpio.h"
#include"stdlib.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include <stdio.h>
#include "esp_log.h"
#include"driver/uart.h"
#include"esp_err.h"
#include "esp_system.h"

#define MAIN_TAG "MAIN"
#define TX_PIN 14
#define RX_PIN 15
#define LENGTH_100 100
#define BUF_SIZE (1024)

void idle_task(void *pvParameter)
{

    while(1)
    {
        ESP_LOGI(MAIN_TAG,"THis is a idle task");
        vTaskDelay(1000/portTICK_RATE_MS);
    }
    
}

void app_main()
{


//xTaskCreate(&uart_task,"UART TASK",1024,NULL,4,NULL);
xTaskCreate(&idle_task,"IDLE TASK",1024,NULL,4,NULL);
ESP_LOGI(MAIN_TAG,"Program on UART");

}

Here is the output of the program

[img]
esp32_reset_prob.png
[/img]

Re: Error at vTaskDelay

Posted: Sat Dec 30, 2017 8:08 am
by WiFive
Try making task stack size bigger