Quality RTOS & Embedded Software

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


Loading

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,
Adam

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

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

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

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.


Careers

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

Renesas

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