Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


vTaskDelay not working with Microblaze

Posted by npatel on December 19, 2016


I am running into an issue when I introduce a vTaskDelay to a task everything stops working. If I remove the vTaskDelay from the task, the task executes without any issue. I verified my tick is working properly. I have looked on the forum and I can see a lot of people having similar issues, all contributed to the timer not firing. I checked that my vTickISR is firing and calling xTaskIncrementTick but with a vTaskDelay added to the task, the task is only called once and is never called again...

Has anyone else encountered this? What could be the reasoning.

Thanks in advance.

vTaskDelay not working with Microblaze

Posted by edwards3 on December 19, 2016

Maybe the ISR is executing but not calling the FreeRTOS tick handler? When the task stops use the debugger to look at a variable called xTickCount in tasks.c. Does it have a sensible value or is it only 0 or 1?

vTaskDelay not working with Microblaze

Posted by npatel on December 19, 2016

Yes I checked xTickCount and its incrementing up correctly. I also see that xTaskIncrementTick returns true once for the switch to occur, but then it gets stuck there and all interrupts etc all stop.

I am using a microblaze port so the switch just sets ulTaskSwitchRequested = 1. I also noticed that if I create a xTaskCreateStatic and comment out the ulTaskSwitchRequested from the isr function. The tasks begin to switch correctly... which is very wierd, why would that work?

I am using FreeRTOS9.0 for this.

my vPortTickISR is as follows:

~~~ void vPortTickISR( ) { if ( cleartimerint(0) == 0 ) { /* Increment the RTOS tick - this might cause a task to unblock. / if( xTaskIncrementTick() != pdFALSE ) { / Force vTaskSwitchContext() to be called as the interrupt exits. */ // ulTaskSwitchRequested = 1; } } } ~~~

[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers


STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner