/* Change Logs: Date Author Notes  RT-Thread the first version  */
int cpu_get_pll_clk(void)
/* Change Logs: Date Author Notes  RT-Thread the first version  */
int cpu_get_pll_clk(void)
{
    rt_uint32_t reg;
    int n, k, m, p;
    reg = CCU->pll_cpu_ctrl;
    if (!(reg & (0x01 << 31)))
        return 0;
    p = PLL_CPU_DIV_P(reg) + 1;
    n = PLL_CPU_FACTOR_N(reg) + 1;
    k = PLL_CPU_FACTOR_K(reg) + 1;
    m = PLL_CPU_FACTOR_M(reg) + 1;
    return (_24MHZ_ * n * k) / (m * p);
}