Quality RTOS & Embedded Software

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


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

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

Latest News

FreeRTOS v10.2.0 is available for immediate download. MIT licensed, and including RISC-V and ARMv8-M (Cortex-M33) demos.

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

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

Cadence Tensilica Cortes

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