<br /><br />0:18, 4 ÓÅÎÔÑÂÒÑ 2015 Ç., Fredrik Thulin :<br /><blockquote>On Thursday, August 27, 2015 12:17:05 AM ðÁ×ÅÌ ûÁÔÏ× wrote:<br />...<br /><br /><blockquote>š4) 25 MHz HSE crystal on my board doesn't work, that's why I temporarily<br />šconfigured it to operate from 16 MHz HSI oscillator. Fredrik gave me a<br />šhint on how to fix this, but I haven't time to get to an RLC meter so far.<br /></blockquote><br />It's a hardware bug I'm afraid. As shown in the datasheet at <br /><br />ššhttp://www.farnell.com/datasheets/1482310.pdf<br /><br />the 25 MHz crystal wants Vdd on top left pin, and GND on bottom right pin.<br /></blockquote><br />Wait, wait, wait, what "crystal" are you talking about? The word crystal is a bit ambiguous, there are two types of quartz "crystals". The first one is quartz resonator. It is passive, so it doesn't need power, but small pF loading capacitors are required to complete resonant circuit. The processor has a special buffer, that drives the resonantor to obtain clock signal. This requires two processor pins. The second type is quartz oscillator. It contains complete resonant circuit inside, so it is active and requires power along with typical 0.01 or 0.1 uF decoupling cap. Oscillators directly output TTL/CMOS clock signal, so only one processor pin is used and resonator buffer must be bypassed.  Many resonators and oscillators are offered in the same package. Your schematics shows, that you intended to use quartz resonator, while the datasheet is about quartz oscillator.<br /><br /><br /><blockquote><br />With that, and 15 pF C0G caps (maybe 10 would be even better, considering the <br />capacitance in the board and pins), my scope shows clean 25.00 MHz oscillation <br />on top right pin of the crystal.<br /></blockquote><br />On my board this pin is at mid-supply.<br /><br /><blockquote><br />I'm still getting some HAL error from HAL_RCC_OscConfig() though. Will try and <br />figure out what's wrong.<br /><br />Apparently, my UART and LED test programs didn't run off the HSE since there <br />were no working crystal there. Missing return value checks in <br />SystemClock_Config() made them continue executing using HSI.<br /><br /></blockquote><br />How the heck did UART test work then??<br /><br /><blockquote>/Fredrik<br /><br />_______________________________________________<br />Tech mailing list<br />Tech@cryptech.is<br />https://lists.cryptech.is/listinfo/tech<br /><br /></blockquote><br /><br />ïÔÐÒÁ×ÌÅÎÏ ÉÚ ÍÏÂÉÌØÎÏÊ ñÎÄÅËÓ.ðÏÞÔÙ: http://m.ya.ru/ymail