实际使用中,需要对6621CX做倍频操作,现在以配置64MHZ为例 1)初始化 int main(void) { // Clock For 6621C pmu_xtal32m_x2_startup(); cpm_set_clock(CPM_CPU_CLK, 64000000); cpm_set_clock_div(CPM_CPU_CLK, 1); cpm_set_clock_div(CPM_SF0_CLK, 1); cpm_set_clock_div(CPM_SF1_CLK, 1); …… } 2)睡眠唤醒再配置一次 static void peripheral_restore(void) { // Clock For 6621C pmu_xtal32m_x2_startup(); cpm_set_clock(CPM_CPU_CLK, 64000000); cpm_set_clock_div(CPM_CPU_CLK, 1); cpm_set_clock_div(CPM_SF0_CLK, 1); cpm_set_clock_div(CPM_SF1_CLK, 1); // Init UART uart_open(HS_UART0, DEBUG_UART_BAUDRATE, UART_FLOW_CTRL_DISABLED, NULL); } |