/* return The SEMC clock frequency value in hertz.  */
uint32_t CLOCK_GetSemcFreq(void)
/* return The SEMC clock frequency value in hertz.  */
uint32_t CLOCK_GetSemcFreq(void)
{
    uint32_t freq;
    if (CCM->CBCDR & CCM_CBCDR_SEMC_CLK_SEL_MASK)
    {
        if (CCM->CBCDR & CCM_CBCDR_SEMC_ALT_CLK_SEL_MASK)
        {
            freq = CLOCK_GetUsb1PfdFreq(kCLOCK_Pfd1);
        }
        else
        {
            freq = CLOCK_GetSysPfdFreq(kCLOCK_Pfd2);
        }
    }
    else
    {
        freq = CLOCK_GetPeriphClkFreq();
    }
    freq /= (((CCM->CBCDR & CCM_CBCDR_SEMC_PODF_MASK) >> CCM_CBCDR_SEMC_PODF_SHIFT) + 1U);
    return freq;
}