diff options
Diffstat (limited to 'source/application/hal/platforms/bare-metal/bsp/bsp-packs/mps3/device_mps3.c')
-rw-r--r-- | source/application/hal/platforms/bare-metal/bsp/bsp-packs/mps3/device_mps3.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/application/hal/platforms/bare-metal/bsp/bsp-packs/mps3/device_mps3.c b/source/application/hal/platforms/bare-metal/bsp/bsp-packs/mps3/device_mps3.c index 7040cf3..9a923c7 100644 --- a/source/application/hal/platforms/bare-metal/bsp/bsp-packs/mps3/device_mps3.c +++ b/source/application/hal/platforms/bare-metal/bsp/bsp-packs/mps3/device_mps3.c @@ -21,11 +21,16 @@ #include <inttypes.h> +extern uint32_t GetSystemCoreClock(void); + uint32_t GetMPS3CoreClock(void) { - const uint32_t default_clock = 32000000; + const uint32_t default_clock = GetSystemCoreClock(); static int warned_once = 0; if (0 != MPS3_SCC->CFG_ACLK) { + if (default_clock != MPS3_SCC->CFG_ACLK) { + warn("System clock is different to the MPS3 config set clock.\n"); + } return MPS3_SCC->CFG_ACLK; } |