Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training


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 ]    [ Sitemap ]    [ ]

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists