How can the capture function of STIMER be used to measure the frequency of an input signal on a GPIO? What is the maximum clock (input) frequency that can be measured with the STIMER?
Knowing the input clock frequency of the STIMER's 32-bit system timer, a relative count can be read each time there is a transition on a GPIO pin. Capturing these counts can provide both the frequency and duty cycle of the signal on the GPIO.
The maximum input clock for the STIMER is F_HFRC/16 MHz = 3 MHz (STCFG_CLKSEL = HFRC_DIV16), as specified in Table 790 of Section 17.19 System Timer in the Apollo2 datasheet.