Tick interrupt

rnbrock wrote on Thursday, 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?

aturowski wrote on Thursday, 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,

davedoors wrote on Thursday, 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.

aeyes wrote on Thursday, 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 :slight_smile: but I did something on similar lines to get my application running .

Which processor are you using by the way ?

davedoors wrote on Thursday, May 21, 2009:

> Almost equally you can use Tick Hook function

Good point, didn’t think of that :slight_smile: