FreeRTOS run time stats

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Has anyone implemented the run time stats in FreeRTOS for AVR32 ?

Is there a high resolution counter in the AVR32 that is free to use when running FreeRTOS ?

If someone already implemented this I wouldn't mind some pointers or code examples.

Thanks /// Carl

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The function that needs to be implemented are

portCONFIGURE_TIMER_FOR_RUN_TIME_STATS()
The run time statistics time base needs to have a higher resolution than the tick interrupt - otherwise the statistics may be too inaccurate to be truly useful. It is recommended to make the time base between 10 and 100 times faster than the tick interrupt. The faster the time base the more accurate the statistics will be - but also the sooner the timer value will overflow.

portGET_RUN_TIME_COUNTER_VALUE()
This macro should just return the current 'time', as configured by portCONFIGURE_TIMER_FOR_RUN_TIME_STATS().