AM243x MCU+ SDK  11.00.00
GPTIMER Free Run

Introduction

This example demonstrates the timer's functionality in free run mode. In the Example interrupt is disabled. The application waits approximately 1 second and calculates the difference in ticks before and after the wait. This gives an approximate timer frequency. Application stops the timer after 5 such approximations.

The counter source Clock is set to MCU_HFOSC0 giving it a 25 MHz tick with counter Presacler disabled. Therefore the approximated frequency is close to 25000000.

Supported Combinations

Parameter Value
CPU + OS r5fss0-0 nortos
r5fss0-0 freertos
Toolchain ti-arm-clang
Boards am243x-evm, am243x-lp
Example folder examples/drivers/gp_timer/gp_timer_free_run

Steps to Run the Example

See Also

GPTIMER

Sample Output

Shown below is a sample output when the application is run,

GP Timer Free Run Test Started ...
Approximate Timer Frequency: 24992259
Approximate Timer Frequency: 24976866
Approximate Timer Frequency: 24981528
Approximate Timer Frequency: 24983136
Approximate Timer Frequency: 24985422
All tests have passed!!