gptimer: support RC_FAST clock source

GPTimer on C6 supports RC_FAST as the clock source. The benefit of this
clock is that, the clock can sustain in light sleep.

Added a new API to return the real resolution of the timer handle.
This commit is contained in:
morris
2022-12-14 18:40:13 +08:00
parent a00bde9622
commit bc2a2d3cde
12 changed files with 64 additions and 29 deletions

View File

@@ -68,6 +68,9 @@ static inline void timer_ll_set_clock_source(timg_dev_t *hw, uint32_t timer_num,
case GPTIMER_CLK_SRC_PLL_F80M:
clk_id = 1;
break;
case GPTIMER_CLK_SRC_RC_FAST:
clk_id = 2;
break;
default:
HAL_ASSERT(false);
break;