Hello,
I am attempting to use a 78 MHz oscillator instead of the crystal that I have been using, but the debugger seems to stop functioning shortly after I set the clock source in the code.
Could I get a confirmation that I am going about this in the correct manner? The code and circuit changes I have made are as such:
#define EXT_OSC 1#define EXTERNAL_OSC_RATE 78000000void setInitialClock() { if(EXT_OSC) SysCtlClockSet(SYSCTL_USE_OSC | SYSCTL_OSC_MAIN); // External Source else SysCtlClockSet( SYSCTL_SYSDIV_5 | SYSCTL_USE_PLL | SYSCTL_XTAL_16MHZ | SYSCTL_OSC_MAIN ); // 40MHz - Ext}And I have changed all peripheral initializations to use the EXTERNAL_OSC_RATE instead of SysCtlClockGet(), as in:void initI2C() { SysCtlPeripheralEnable(SYSCTL_PERIPH_I2C0); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB); GPIOPinConfigure(GPIO_PB2_I2C0SCL); GPIOPinConfigure(GPIO_PB3_I2C0SDA); GPIOPinTypeI2C(GPIO_PORTB_BASE, GPIO_PIN_2 | GPIO_PIN_3); if(EXT_OSC) I2CMasterInitExpClk(I2C0_MASTER_BASE, EXTERNAL_OSC_RATE, false); else I2CMasterInitExpClk(I2C0_MASTER_BASE, SysCtlClockGet(), false);}
The oscillator circuit is as such (with X2, C28, and C29 removed):
Hi Justin,
I can't think why it would work at 40 MHz, but not 39 MHz, unless the timings are marginal. Have you used a scope to check the signal timing at the SRAM?
Sue