-1

I'am attempting to integrate freeRTOS to my application that run on AT32UC3A0512. I downloaded a freeRTOS project example for EVK1100 (it Supports the AT32UC3A) and try to include the kernel source files, so my application hierarchy looks like :

src
|ASF
|main.c
|freertos 
   |freertos-7.0.0
      |source

the main looks like

int main()
{
     char str[5];
     uint8_t num;

     enable_Timer();
     enable_Timer_Interrupt();
     sprintf (str, %03d, num);

     while(1)
     {
           // Wait the timer interrupt to happen 
     }
}

Now by just excluding the freertos folder from my project, the timer interrupt are fired and all works well,

However if i include the freertos folder (no inclusion nor call to freertos sources is done) the timer interrupt are not fired.

It seems crazy but i don't know how the behaviour of sprintf has changed this way and also i don't see the relation between sprintf and the interrupt controller

fedi
  • 368
  • 3
  • 7
  • 18

1 Answers1

1

The RTOS and your application might be using the same timer interrupt. Check RTOS port.c file to find which timer is it using for timer tick. CHeck your interrupt function and port.c interrupt function definition.

Mukesh
  • 11
  • 2
  • Thank you for the feedback, indeed it's the same timer called however, it's up to `prvSetupTimerInterrupt` to setup the freeRTOS timer and us i mentioned i didn't call any function from freeRTOS, so how could this make problems ? – fedi Jul 18 '16 at 10:44
  • If i place the while loop before calling `sprintf ` and breakpoint the timer ISR, the timer interrupts work – fedi Jul 18 '16 at 10:46