Hi Will,

I'll be happy to throw my opinions in on the PLL or clock changes at the BSP level.

This also touches on some important issues with power management if you start thinking about an API around that (which is critical to anything IoT of course). Often, just before going into sleep modes you want to configure the clock(s) with a specific setup, and then when you wakeup move them back to a previous configuration. That's beyond the scope of the core clock setup at the BSP level, but you'll still probably want to have clock configuration as part of the overall HAL for both reasons.

I agree it's non trivial, though, since every microcontroller or SoC will have it's own clock configuration values and parameters. It may end up making more sense to provide a 'weak' clock setup function(s) that can be easily overridden, with a sensible defaults at the mcu level, and document the enum values for each MCU?

K.

Reply via email to