3 years, 8 months ago.
Power and Speed
Hello and thanks for the help. I have been reading the "UM1724 STM32 Nucleo 64 boards User Manual " to understand my STM32F091 and I have two questions:
1) POWER: I read that you can power the nucleo with VIN, E5V (which is different than +5V pin) and +3V3 (which I dont know if it is different or not from +3.3V pin) I discarded the 3V3 because apparently you can not reprogram the nucleo if powered by this. So from the other two options, what is the pros and cons of using one or the other?? Also the manual says that VIN has to be 7-12V but the pin layout in this page says 5V-9V, so which is it?? Please recommend me how to power up my nucleo without using the USB
2) SPEED The nucleo announces itself as 48MHz. However I read in the manual that maybe it is using "MCO from ST-link"?? in which the speed is 8MHz?? (No wonder it seems slow!) The SBs and Rs are just as default (from the box) so which is the timing option I am using??? Apparently since SB55is OFF SB16 and SB50 is ON and I dont see any R35 R37 there, this is the option....
Also I read that when not using mbed but system_stm32fxxx.c you can multiply the speed but first I dont know how and second this is not mbed related is it??
Anyway, my question is when using STM32F091 (fresh from the box) and using mbed, which speed and which crystal am I using?
Question relating to:
3 years, 8 months ago.
regarding the power
you can see from the schematic (Fig 25) that when using VIN, the E5V is generated by a 5V regulator (U3). If you are inputing less that 7V, the regulator may not be able to generate a proper 5V for USB communication.
If your power supply is 5V, you just input it on the E5V pin and bypass the 5V regulator. There is still a 3.3V regulator (U4) generating the supply for the MCU from the 5V (E5V or USV 5V, depending on JP5).
You can choose according to the power source you have available.
Regarding the oscillator
The STM32 has an internal PLL that can be configured by software. This allows to generate whatever frequency is needed from either the internal oscillator HSI (1%) or the external clock or crystal.
On these nucleo boards, the STLink device has a 8MHz crystal which is used to provide a precise 8MHz to the target MCU. MBED initialisation code detect if this clock is present and if it is, use it to generate the 48MHz which is the target frequency for this platform.
In case you want to try without mbed code base, I recommend to use the STM32CubeMx tool + STM32CubeF0 HAL. This allows graphical configuration of the pins and the clock tree and can generate the initialisation code automatically. Of course the generated initialisation code is not compatible with MBED, as mbed does its own initialisation for IOs, clocks and some peripherals.