The following described the necessary steps to enable and initialize the GPTM.
TI recommends using the GPTimer driver in the SimpleLink™ CC13xx and CC26xx software development kit (SDK) when using the GPTM.
- To use a GPT module, enable the peripheral domain and the appropriate GPT module in the PRCM by writing to the PRCM:GPTCLKGR, the PRCM:GPTCLKGS, and the PRCM:GPTCLKGDS registers.
- Next, load the setting to the clock controller by writing to the PRCM:CLKLOADCTL register.
- Configure the IOC module to route the output from the GPT module to the IOs.
- The IOC module must then be configured to output the timer signal on the wanted I/O pin. For this, IOCFGn.PORT_ID must be written to the correct PORT_IDs (for more details, see Chapter 400).
The following sections show module initialization and configuration examples for each of the supported timer modes.