timer_hal_capture_and_get_counter_value should be placed in the IRAM for speed optimization because the default ISR handler is placed in the IRAM. Closes https://github.com/espressif/esp-idf/issues/12021