This should work! Use this at the beginning of your code. This was used from the example for the 48 MHz Master Clock. The only thing I changed so you have 8MHz is in this line: //CS_setExternalClockSourceFrequency(32000,8000000); /* Configuring pins for peripheral/crystal usage and LED for output */ MAP_GPIO_setAsPeripheralModuleFunctionOutputPin(GPIO_PORT_PJ, GPIO_PIN3 | GPIO_PIN4, GPIO_PRIMARY_MODULE_FUNCTION); MAP_GPIO_setAsOutputPin(GPIO_PORT_P1, GPIO_PIN0); /* Setting the external clock frequency. This API is optional, but will * come in handy if the user ever wants to use the getMCLK/getACLK/etc * functions */ CS_setExternalClockSourceFrequency(32000,8000000); /* Starting HFXT in non-bypass mode without a timeout. Before we start * we have to change VCORE to 1 to support the 8MHz frequency */ MAP_PCM_setCoreVoltageLevel(PCM_VCORE1); MAP_FlashCtl_setWaitState(FLASH_BANK0, 2); MAP_FlashCtl_setWaitState(FLASH_BANK1, 2); CS_startHFXT(false); /* Initializing MCLK to HFXT (effectively 8MHz) */ MAP_CS_initClockSignal(CS_MCLK, CS_HFXTCLK_SELECT, CS_CLOCK_DIVIDER_1);
↧