cancel
Showing results for 
Search instead for 
Did you mean: 

oscillator sellection

morykeys
Associate II
Posted on September 05, 2013 at 16:24

hello 

i designed an eval board base on stm32f107RC myself and i want to program it by using dfu bootloadert then i should download the bootloader file(IAP) from this site so i did this .

now do i have to put a 25MHZ crystal for my mcu? can i put a 16MHZ ?

please answer this is important to me

regards

#stm-32f107rc-osc
6 REPLIES 6
Posted on September 05, 2013 at 17:25

please answer this is important to me

If it's important you'd probably want to read the manual, and understand it. I'm not interested in doing, or being responsible, for your due diligence work.

''The USART peripheral operates with the internal 8 MHz oscillator (HSI), however the CAN and USB OTG FS can only function if an external 8 MHz, 14.7456 MHz or 25 MHz clock (HSE) is present.''

The clock you choose will also depend on other frequencies you need within the system. The PLL of the F1xx series is not particularly accommodating, and the dividers are all integer.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
morykeys
Associate II
Posted on September 05, 2013 at 18:53

 no man i know what you said

i designed a board based on stm32f107RCT6 and i want to program my mcu using usb bootloader i downloaded the IAP file  

http://www.st.com/web/en/catalog/tools/PF257887

i say that is this possible to use a 8MHZ or 14.745MHZ or i have to use25MHZ oscillator ?

there is no connection between this topic and the manual.

have you ever used usb iap for programing mcu's by bootloader ? that's what i'm talking about.

Posted on September 05, 2013 at 19:04

The limitations on the crystal are for the System Loader, ie the one in ROM started when BOOT0=High

If you expect that to work you MUST use one of the specified values, as the ROM compares the crystal to the LSI or HSI in order to benchmark it and select appropriate PLL/clock settings. The use of 25 MHz is of specific importance if you use Ethernet, which I can't determine from your question.

Why do you want to use a 16 MHz crystal? Wouldn't 8 MHz be a better choice?

For your own application, and your own code you can choose to use whatever crystal you want, and program it as required. The primary driver for USB use is that you must be able to generate a 48 MHz source. ie 72 MHz / 1.5 or 48 MHz / 1.0

Do you want to be able to program BLANK devices using USB/DFuSe? Or via Serial or JTAG/SWD?

Yes, I've programmed STM32F107 parts via USB using DFuSe

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
morykeys
Associate II
Posted on September 05, 2013 at 19:50

oh i'm glad you got what i meant.

i want to program my device which is stm32f107RCT6 and i want to program it by dfu bootloader so i downloaded an IAP file which is built by st not me and i didn't know what oscillator to be used till now i've found out it is 25MHZ .

so my question is i must use 25MJZ or can i use 8MHZ or14.745?

when you were programming your device (stm32f107RCT6) by dfu bootloader what oscillator you used ?

and you built the IAP file or downloaded it from st.com? i think you downloaded it.

i mean can i change the osc speed from 25 to 16 from target option in keil  and saying again that this is st's program .

Posted on September 05, 2013 at 20:43

I have an

http://www.st.com/web/en/catalog/tools/PF247091

board, it has a 25 MHz crystal.

The system loader is designed to work with the three crystal values documented, and expressed to you. The ROM is NOT designed to work with 16 MHz, you'll have to use one of the other choices provided to you.

I am not using this IAP code, but it is provided with source, and you can modify system_stm32f10x.c to use ANY legal crystal and PLL combination setting you want. You OWN the code, you can MODIFY the code. For USB to work you must provide it with an accurate 48 MHz clock, this will likely constrain your universe of choices.

Changing the clock in Keil is NOT adequate, you will need to change the define for HSE_VALUE, and change the PLL programming, and clocking options, in system_stm32f10x.c
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
morykeys
Associate II
Posted on September 05, 2013 at 21:24

thanks man 

I prefer to use a 25Mhz