When trying to configure pico-sdk to use a 32MHz crystal as the clock source for XOSC I found that xosc_init() in xosc.c hardcodes the XOSC CTRL register to XOSC_CTRL_FREQ_RANGE_VALUE_1_15MHZ. This cannot be overridden without modifying the SDK code.
It would be incredibly helpful if the frequency range in xosc_init() could be made configurable via a preprocessor definition, similar to other clock configurations in the SDK.
For example, introducing a define like:
#ifndef PICO_XOSC_FREQ_RANGE
#define PICO_XOSC_FREQ_RANGE XOSC_CTRL_FREQ_RANGE_VALUE_1_15MHZ
#endif
so developers can override this behavior in their board.h files.
When trying to configure pico-sdk to use a 32MHz crystal as the clock source for XOSC I found that
xosc_init()in xosc.c hardcodes the XOSC CTRL register to XOSC_CTRL_FREQ_RANGE_VALUE_1_15MHZ. This cannot be overridden without modifying the SDK code.It would be incredibly helpful if the frequency range in
xosc_init()could be made configurable via a preprocessor definition, similar to other clock configurations in the SDK.For example, introducing a define like:
so developers can override this behavior in their board.h files.