esp-hal icon indicating copy to clipboard operation
esp-hal copied to clipboard

Add support for other clock sources in timer driver

Open JurajSadel opened this issue 2 years ago • 1 comments

Currently, we are using only apb_clock in General-purpose timers implementation. The https://github.com/esp-rs/esp-hal/pull/77 added other options for the clock source.

JurajSadel avatar Aug 30 '22 13:08 JurajSadel

After discussion with @bjoernQ it seems it's not that straightforward.

In ESP-IDF the user can set the clock source but also manually choose the divider etc - it's a much lower level API. Do we want to have an additional low-level constructor that takes the clock source and divider? Then the user will want to use ticks for e.g start function - probably going to be a lot of effort. Also would be a general design decision since if we offer a low-level version here why don't we have it everywhere?

For now, let's turn this issue into a discussion of how we want to deal with this in the future. What is your opinion @bjoernQ, @jessebraham, @MabezDev?

JurajSadel avatar Aug 31 '22 08:08 JurajSadel

ABP has served us well and I'm not aware of any current issues with TIMG being driven from it, therefore I'm going to close this for now.

MabezDev avatar Feb 19 '24 15:02 MabezDev