2013-09-24 02:24 PM
I want to run my Discovery board with an external HSE soldered into X2 on the board. I ran the clock configuration tool and generated a new system_stm32f0xx.c which seems to be correct. It seems to still be using the 8 MHz PLL and I can't tell if it's not trying to use the HSE or is it failing when it starts up. I stuffed X2 (25 MHz), R23, R22, C14, C13 as shown on STM32Discovery schematic. I am using the Demo app that blinks the one LED and you can change the rate of blinking with the USER button. Ideally there is an explanation somewhere that says ''If you want to use the HSE on the Discovery board do this ...'' but I haven't found that. I'd appreciate any ideas of what to look at next.
Thanks.Mike2013-09-24 03:20 PM
Make sure there aren't any Solder Bridges (SB) still connecting the HSE_IN with the 8 MHz output from the ST-LINK's F103.
Check if HSERDY in RCC_CR goes high after the HSE is enabled, if it does not, then the crystal is not working. Review also the RCC registers to understand what clock is actually being used, and confirm the PLL settings.2013-09-25 08:55 AM
Thanks a million clive1.
Okay, I'm a little closer. Removing the Solder Bridges removes the 8 MHz clock I was seeing on the PF0-OSC_IN so that makes sense. Now just seeing a bit of noise on that line, I know the amplitude is going to be pretty small but should be sinusoidal.When I single step through SetSysClock() when it gets to: RCC->CR |= ((uint32_t)RCC_CR_HSEON);I do not see the HSEON bit go high which is puzzling. I'd think that bit would go high even with no crystal connected. I believe that multiple clocks can be on, the SW bits in RCC_CFGR select which is used as the System Clock.Anyway, will go back and check wiring of crystal again although the tech that did it I trust much more than my code.Mike2013-09-25 01:22 PM
2013-09-25 06:09 PM
On a stock STM32F0-Discovery, RCC_CR_HSEON goes on, as does RCC_CR_HSERDY, not sure I can explain why HSEON can't be enabled on your board.