By Mucozne
调试串口波特率:115200-uart2
基于MDKK70-EK_T7硬件平台
按键改变时钟配置,LED跟随闪烁
***********************************************************
MQX frequency change demo
***********************************************************
*********** DEFAULT CLOCK CONFIGURATION **********
CLOCK_SOURCE_CORE = 120000000 Hz
CLOCK_SOURCE_BUS = 60000000 Hz
CLOCK_SOURCE_FLEXBUS = 40000000 Hz
CLOCK_SOURCE_FLASH = 20000000 Hz
CLOCK_SOURCE_USB = 0 Hz
CLOCK_SOURCE_PLLFLL = 120000000 Hz
CLOCK_SOURCE_MCGIR = 0 Hz
CLOCK_SOURCE_OSCER = 50000000 Hz
CLOCK_SOURCE_ERCLK32K = 32768 Hz
CLOCK_SOURCE_MCGFF = 24414 Hz
Press button on the board to loop over frequency modes.
Button pressed. Moving to next clock configuration.
*************** BSP_CLOCK_CONFIGURATION_0 **************
CLOCK_SOURCE_CORE = 120000000 Hz
CLOCK_SOURCE_BUS = 60000000 Hz
CLOCK_SOURCE_FLEXBUS = 40000000 Hz
CLOCK_SOURCE_FLASH = 20000000 Hz
CLOCK_SOURCE_USB = 0 Hz
CLOCK_SOURCE_PLLFLL = 120000000 Hz
CLOCK_SOURCE_MCGIR = 0 Hz
CLOCK_SOURCE_OSCER = 50000000 Hz
CLOCK_SOURCE_ERCLK32K = 32768 Hz
CLOCK_SOURCE_MCGFF = 24414 Hz
Button pressed. Moving to next clock configuration.
*************** BSP_CLOCK_CONFIGURATION_1 **************
CLOCK_SOURCE_CORE = 12000000 Hz
CLOCK_SOURCE_BUS = 12000000 Hz
CLOCK_SOURCE_FLEXBUS = 12000000 Hz
CLOCK_SOURCE_FLASH = 12000000 Hz
CLOCK_SOURCE_USB = 0 Hz
CLOCK_SOURCE_PLLFLL = 120000000 Hz
CLOCK_SOURCE_MCGIR = 0 Hz
CLOCK_SOURCE_OSCER = 50000000 Hz
CLOCK_SOURCE_ERCLK32K = 32768 Hz
CLOCK_SOURCE_MCGFF = 24414 Hz
Button pressed. Moving to next clock configuration.
*************** BSP_CLOCK_CONFIGURATION_2 **************
CLOCK_SOURCE_CORE = 2000000 Hz
CLOCK_SOURCE_BUS = 2000000 Hz
CLOCK_SOURCE_FLEXBUS = 2000000 Hz
CLOCK_SOURCE_FLASH = 500000 Hz
CLOCK_SOURCE_USB = 0 Hz
CLOCK_SOURCE_PLLFLL = 2000000 Hz
CLOCK_SOURCE_MCGIR = 2000000 Hz
CLOCK_SOURCE_OSCER = 50000000 Hz
CLOCK_SOURCE_ERCLK32K = 0 Hz
CLOCK_SOURCE_MCGFF = 16384 Hz
基于MDKK70-EK_T7硬件平台
按键改变时钟配置,LED跟随闪烁
***********************************************************
MQX frequency change demo
***********************************************************
*********** DEFAULT CLOCK CONFIGURATION **********
CLOCK_SOURCE_CORE = 120000000 Hz
CLOCK_SOURCE_BUS = 60000000 Hz
CLOCK_SOURCE_FLEXBUS = 40000000 Hz
CLOCK_SOURCE_FLASH = 20000000 Hz
CLOCK_SOURCE_USB = 0 Hz
CLOCK_SOURCE_PLLFLL = 120000000 Hz
CLOCK_SOURCE_MCGIR = 0 Hz
CLOCK_SOURCE_OSCER = 50000000 Hz
CLOCK_SOURCE_ERCLK32K = 32768 Hz
CLOCK_SOURCE_MCGFF = 24414 Hz
Press button on the board to loop over frequency modes.
Button pressed. Moving to next clock configuration.
*************** BSP_CLOCK_CONFIGURATION_0 **************
CLOCK_SOURCE_CORE = 120000000 Hz
CLOCK_SOURCE_BUS = 60000000 Hz
CLOCK_SOURCE_FLEXBUS = 40000000 Hz
CLOCK_SOURCE_FLASH = 20000000 Hz
CLOCK_SOURCE_USB = 0 Hz
CLOCK_SOURCE_PLLFLL = 120000000 Hz
CLOCK_SOURCE_MCGIR = 0 Hz
CLOCK_SOURCE_OSCER = 50000000 Hz
CLOCK_SOURCE_ERCLK32K = 32768 Hz
CLOCK_SOURCE_MCGFF = 24414 Hz
Button pressed. Moving to next clock configuration.
*************** BSP_CLOCK_CONFIGURATION_1 **************
CLOCK_SOURCE_CORE = 12000000 Hz
CLOCK_SOURCE_BUS = 12000000 Hz
CLOCK_SOURCE_FLEXBUS = 12000000 Hz
CLOCK_SOURCE_FLASH = 12000000 Hz
CLOCK_SOURCE_USB = 0 Hz
CLOCK_SOURCE_PLLFLL = 120000000 Hz
CLOCK_SOURCE_MCGIR = 0 Hz
CLOCK_SOURCE_OSCER = 50000000 Hz
CLOCK_SOURCE_ERCLK32K = 32768 Hz
CLOCK_SOURCE_MCGFF = 24414 Hz
Button pressed. Moving to next clock configuration.
*************** BSP_CLOCK_CONFIGURATION_2 **************
CLOCK_SOURCE_CORE = 2000000 Hz
CLOCK_SOURCE_BUS = 2000000 Hz
CLOCK_SOURCE_FLEXBUS = 2000000 Hz
CLOCK_SOURCE_FLASH = 500000 Hz
CLOCK_SOURCE_USB = 0 Hz
CLOCK_SOURCE_PLLFLL = 2000000 Hz
CLOCK_SOURCE_MCGIR = 2000000 Hz
CLOCK_SOURCE_OSCER = 50000000 Hz
CLOCK_SOURCE_ERCLK32K = 0 Hz
CLOCK_SOURCE_MCGFF = 16384 Hz
![](https://i-blog.csdnimg.cn/blog_migrate/70f2896eebbb08b73ea0cceee0c0fde2.jpeg)
串口输出:
![](https://i-blog.csdnimg.cn/blog_migrate/7b116a16100c2c601a8fe8535d01e5ee.jpeg)