Error at vTaskDelay

kartikkman
Posts: 15
Joined: Wed Jul 19, 2017 11:27 am

Error at vTaskDelay

Postby kartikkman » Sat Dec 30, 2017 7:15 am

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]
Attachments
esp32_reset_prob.png
esp32_reset_prob.png (137.87 KiB) Viewed 3170 times

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Error at vTaskDelay

Postby WiFive » Sat Dec 30, 2017 8:08 am

Try making task stack size bigger

Who is online

Users browsing this forum: No registered users and 133 guests