I'm interested in playing with USB on the STM32L152 discovery board. From my reading I see you require a more accurate clock than the internal HSI oscillator. I've added a 20pf 20ppm 8Mhz crystal X3, and the R30 C21 and C22 parts (values taken from ST's BOM).
I've changed in mcuconf.h
Code: Select all
#define STM32_HSI_ENABLED TRUEbut when I boot it, it gets stuck waiting for the clock to ready:
Code: Select all
while ((RCC->CR & RCC_CR_HSERDY) == 0);I can also see on my scope that X3 is not producing any output. Is there something else in software that I may have missed, or should I suspect the hardware? I've checked all my soldering, as well as swapped the xtal for another (I got a bag on ebay, so could have had a bad one).
Dave