[Cryptech Tech] FMC Arbiter
Fredrik Thulin
fredrik at thulin.net
Mon Sep 7 13:25:18 UTC 2015
On Friday, September 04, 2015 09:14:49 PM you wrote:
> 0:18, 4 сентября 2015 г., Fredrik Thulin :
> On Thursday, August 27, 2015 12:17:05 AM Павел Шатов wrote:
> ...
>
> 4) 25 MHz HSE crystal on my board doesn't work, that's why I temporarily
> configured it to operate from 16 MHz HSI oscillator. Fredrik gave me a
> hint on how to fix this, but I haven't time to get to an RLC meter so far.
>
> It's a hardware bug I'm afraid. As shown in the datasheet at
>
> http://www.farnell.com/datasheets/1482310.pdf
>
> the 25 MHz crystal wants Vdd on top left pin, and GND on bottom right pin.
>
> 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.
Thanks for the explanation. I had not encountered these quartz oscillators
before. I'll let you decide whether the issue is with the PCB or with the type
of oscillator mounted on your dev-bridge board ;)
> With that, and 15 pF C0G caps (maybe 10 would be even better, considering
> the capacitance in the board and pins), my scope shows clean 25.00 MHz
> oscillation on top right pin of the crystal.
>
> On my board this pin is at mid-supply.
Yes, I believe that is because the mounted component is a quartz oscillator
and needs power to run.
> I'm still getting some HAL error from HAL_RCC_OscConfig() though. Will try
> and figure out what's wrong.
>
> Apparently, my UART and LED test programs didn't run off the HSE since there
> were no working crystal there. Missing return value checks in
> SystemClock_Config() made them continue executing using HSI.
>
>
> How the heck did UART test work then??
HAL_RCC_OscConfig() and HAL_RCC_ClockConfig() both returned HAL_ERROR since
the HSE was not running, and everything kept running from the HSI. Doh.
/Fredrik
More information about the Tech
mailing list