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


Tick interrupt

Posted by Robert Brock on May 21, 2009
How do I verify if my tick interrupt is running?

I have the User's Manual and it mentions the tick interrupt, but doesn't go into much detail. When I create a task, it seems to run just fine. But as soon as I call any blocking function (vTaskDelay), the app never seems to re-enter the Ready state.

I have configTICK_RATE_HZ is defined in FreeRTOSConfig.h. Is there anything else I can look at?

RE: Tick interrupt

Posted by Adam Turowski on May 21, 2009
There are couple of ways which can be used. The best is to enable the the breakpoint in the beginning of timer ISR. Another is to toggle a GPIO in the beggining of ISR and check it with scope/multimeter.

Almost equally you can use Tick Hook function

void vApplicationTickHook( void );

which is for example toggiling pin or doing something else, but it has to be very short piece of code. Please note that to enable this hook function you have to include
#define configUSE_TICK_HOOK 1

in your FreeRTOSConfig.h file. Otherwise code calling hook function will not be compiled and linker will complain.

Hope that helps,

RE: Tick interrupt

Posted by Dave on May 21, 2009
You can put a break point in the tick interrupt handler. If you tell me which port you are using I can tell you which function is the handler.

Actually, every tick interrupt calls vTaskIncrementTick(), so just put your break point in that function. It is defined in task.c.

RE: Tick interrupt

Posted by Angel Eyes on May 21, 2009

Hi Robert ,

I faced a similar problem while porting FreeRTOS for a Samsung ARM7 processor .

I think your interrupts are not handled properly in your init code . Trace the vTaskDelay function I think you will be able to figure out where the execution gets stuck in .

Take up any init.s file from the FreeRTOS code base and have a look at the section where the interrupts are handled , there will be 2 branches , one to the tickISR another to somewhere else I can not remember right now , Its been sometime so my memory is a bit rusty :) but I did something on similar lines to get my application running .

Which processor are you using by the way ?

RE: Tick interrupt

Posted by Dave on May 21, 2009
> Almost equally you can use Tick Hook function

Good point, didn't think of that :-)

[ 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