/*FUNCTION********************************************************************** * * Function Name : CLOCK_SYS_GetFlashClockFreq * Description : Gets the flash clock frequency. * This function gets the flash clock frequency. * *END**************************************************************************/ uint32_t CLOCK_SYS_GetFlashClockFreq(void) { return CLOCK_HAL_GetOutClk(MCG) / (CLOCK_HAL_GetOutDiv4(SIM) + 1); }
/*FUNCTION********************************************************************** * * Function Name : CLOCK_SYS_GetFlashClockFreq * Description : Gets the flash clock frequency. * This function gets the flash clock frequency. * *END**************************************************************************/ uint32_t CLOCK_SYS_GetFlashClockFreq(void) { return CLOCK_SYS_GetSystemClockFreq() / (CLOCK_HAL_GetOutDiv4(SIM) + 1); }
/*FUNCTION********************************************************************** * * Function Name : CLOCK_SYS_GetBusClockFreq * Description : Gets the bus clock frequency. * This function gets the bus clock frequency. * *END**************************************************************************/ uint32_t CLOCK_SYS_GetBusClockFreq(void) { return CLOCK_HAL_GetOutClk(MCG) / ((CLOCK_HAL_GetOutDiv1(SIM) + 1) *(CLOCK_HAL_GetOutDiv4(SIM) + 1)); }