MCPcopy Create free account
hub / github.com/DISTORTEC/distortos / switchSystemClock

Function switchSystemClock

source/chip/STM32/STM32F7/STM32F7-RCC.cpp:228–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228void switchSystemClock(const SystemClockSource source)
229{
230 const auto sourceValue = static_cast<uint32_t>(source);
231 RCC->CFGR = (RCC->CFGR & ~RCC_CFGR_SW) | sourceValue << RCC_CFGR_SW_Pos;
232 while ((RCC->CFGR & RCC_CFGR_SWS) != sourceValue << RCC_CFGR_SWS_Pos);
233}
234
235} // namespace chip
236

Callers 1

chipLowLevelInitializerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected