cancel
Showing results for 
Search instead for 
Did you mean: 

Running STM32F4 from an Oscilator

isaac
Associate II
Posted on May 29, 2015 at 07:17

System Clock Configuration tool is doing a great job to generate init code for STM32F405RG however it does not support external clock oscillator which is fed into OSC_IN (pin 5) only. (meaning Osc not Crystal).

I suspect that the  RCC_CR_HSEBYP bit setting does not support such hardware.

Is there a code example for the required modifications into the tool generated system_stm32f4xx.c file ?

#stm32f4-clock
6 REPLIES 6
Posted on May 29, 2015 at 07:51

> Is there a code example for the required modifications into the tool generated system_stm32f4xx.c file ?

Maybe there is, but what prevents you from writing your own clock startup code? As you've remarked, the difference is only in setting one bit.

JW

isaac
Associate II
Posted on May 29, 2015 at 08:02

Reassured this was tried. It still might be a hardware issue but I'm trying to ensure it's not a firmware one before running to the hardware guys ...

Posted on May 29, 2015 at 08:14

Hardware issue can be excluded by a single touch with a scope probe, 5 seconds of work plus half an hour to locate the oscilloscope if it does not sit on your desk... ;)

Which STM32 model exactly? Please post the content of relevant RCC registers. You try to run a simple blinkey to check, do you.

JW

Posted on May 29, 2015 at 08:19

Oh, and 5 more seconds to check CLK_OUT is floating, using a continuity tester (ohmeter, ''beeper''...)  ;)

JW
Mark Edwards
Associate II
Posted on May 29, 2015 at 19:56

Don’t forget the half hour of tracking down the scope probe clips before giving up and using bit’s of wire.

Even if it does live on your desk.

Posted on May 29, 2015 at 20:06

:)

It's the power cord in our lab. If you find the scope, it never has a power cord. It appears to be a consumable disappearing at an alarming rate, regardless of how much we buy for spare.

JW