suxilong1 wrote on Wednesday, October 28, 2015:
Hi All
** i am new in learning FreeRTOS。
my project is running FreeRTOS in ESP8266(wifi SOC )
environment:VS2013+VisualGDB 5.0
at first i creat a new project。add two task in the main() ,and be aware of their different uxPriority
**
static const char *pcTextForTask1 = "Task 1 is running\r\n";
static const char *pcTextForTask2 = "Task 2 is running\r\n";
xTaskCreate(LEDBlinkTask, (signed char *)"Blink1", 256, (void *)pcTextForTask1, 1, NULL);
xTaskCreate(LEDBlinkTask, (signed char *)"Blink2", 256, (void *)pcTextForTask2, 2, NULL);
** and there is the LEDBlinkTask function:**
static void RAMFUNC LEDBlinkTask(void *pvParameters)
{
char *pchar;
PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO2_U, FUNC_GPIO2);
pchar = (char *)pvParameters;
for (int tick = 0;; tick++)
{
vTaskDelay(s_LEDPeriod / portTICK_RATE_MS);
gpio_output_conf(0, BIT2, BIT2, 0);
vTaskDelay(s_LEDPeriod / portTICK_RATE_MS);
gpio_output_conf(BIT2, 0, BIT2, 0);
printf(pchar);
}
}
**when s_LEDPeriod = 300 adn then running the project, i could seen that it prinft “Task 2 is running” and “Task 1 is running”
but when i decrease the s_LEDPeriod as lower than 10 , it was only printf “Task 2 is running”,there is no more “Task 1 is running”
does anybody give me a hand , tell me what is the matter uxPriority with vTaskdelay
BR!!!**