/******************************************************************************* * Function: Flash_Init * * Description: Set the flash clock * * Returns: never return * * Notes: * *******************************************************************************/ void Flash_Init() { /* Body */ if (BSP_BUS_CLOCK > PRDIV8_LIMIT_FREQ) { MCF_CFM_CFMCLKD = MCF_CFM_CFMCLKD_PRDIV8 | MCF_CFM_CFMCLKD_DIV((BSP_BUS_CLOCK+PRDIV8_PRSC*FLASH_FREQ-1) / (PRDIV8_PRSC * FLASH_FREQ) -1); } else { MCF_CFM_CFMCLKD = MCF_CFM_CFMCLKD_DIV((BSP_BUS_CLOCK+FLASH_FREQ-1) / FLASH_FREQ -1); } /* EndIf */ } /* EndBody */
/******************************************************************************* * Function: Flash_Init * * Description: Set the flash clock * * Returns: never return * * Notes: * *******************************************************************************/ void Flash_Init() { if ((BSP_SYSTEM_CLOCK/2) > PRDIV8_LIMIT_FREQ) { MCF_CFM_CFMCLKD = MCF_CFM_CFMCLKD_PRDIV8 | MCF_CFM_CFMCLKD_DIV(((BSP_SYSTEM_CLOCK/2)+PRDIV8_PRSC*FLASH_FREQ-1) / (PRDIV8_PRSC * FLASH_FREQ) -1); } else { MCF_CFM_CFMCLKD = MCF_CFM_CFMCLKD_DIV(((BSP_SYSTEM_CLOCK/2)+FLASH_FREQ-1) / FLASH_FREQ -1); } }