/* return The PER clock frequency value in hertz.  */
uint32_t CLOCK_GetPerClkFreq(void)
/* return The PER clock frequency value in hertz.  */
uint32_t CLOCK_GetPerClkFreq(void)
{
    uint32_t freq;
    if (CCM->CSCMR1 & CCM_CSCMR1_PERCLK_CLK_SEL_MASK)
    {
        freq = CLOCK_GetOscFreq();
    }
    else
    {
        freq = CLOCK_GetFreq(kCLOCK_IpgClk);
    }
    freq /= (((CCM->CSCMR1 & CCM_CSCMR1_PERCLK_PODF_MASK) >> CCM_CSCMR1_PERCLK_PODF_SHIFT) + 1U);
    return freq;
}