Dear all
I am designing a project that uses an arduino for STM32F103CB. It started as a pure bluepill project until it ran out of flash
and has to update to a STM32F103CBT6 chip for more flash.
I ordered a mini maple board and as got very clumsy to reroute all the design for the new board, I've finally ended
transplanting the minimaple's CBT6 to the bluepill. Then changed the Platformio setup, recompiled all and downloaded the firmware
to the CBT6 bluepill.
It worked like a charm, no problems at all. As the prototype ran flawlessly I've decided to order some assembled boards, but when I've uploaded
the firmware to the new boards I've noticed that the firmware ran awfully slow, in fact I've checked that the 8MHz crystal is not running
(the 32.768 khz crystal was running however)
from this behaviour I can only understan that there is some setup to do to the chip that I'm not doing nor the arduino core is doing either.
Do you know what is the default clock, flash waitstates and general chip setup to do to the chip to make it work like a bluepill/minimaple?
best regards
Nachus
STM32F103CB default clocks and setup
Re: STM32F103CB default clocks and setup
the datasheet would have all of that.
in general, the default clock is the internal rc oscillator.
in general, the default clock is the internal rc oscillator.
Re: STM32F103CB default clocks and setup
Yes I see. Another problem that I'm encountering is that the Iwatchdog function doesn't want to run
in my code I have the following
in the prototype it worked like a charm
in the custom board the code stucks in the for() and the watchdog never elapses
I tried to change the watchdog option bytes with no luck (using the STM32CUBEProgrammer)
On the other hand, the boards I've ordered used original ST parts while the minimaple from where I took the chip used a CKS part
What can be the problem here?
Nachus
in my code I have the following
Code: Select all
IWatchdog.clearReset();
IWatchdog.begin(IWDG_TIMEOUT_MIN); // start the watchdog
for(;;); // loop here waiting for the hardware reset
in the custom board the code stucks in the for() and the watchdog never elapses
I tried to change the watchdog option bytes with no luck (using the STM32CUBEProgrammer)
On the other hand, the boards I've ordered used original ST parts while the minimaple from where I took the chip used a CKS part
What can be the problem here?
Nachus
Re: [SOLVED]STM32F103CB default clocks and setup
Well, finally solvet that issue.
The problem was that I were using a complementary output type reset controller (max809 series) tied to the reset line
where it should go a open drain controller. The reset controller sustained a very low impedance high level on the nRST pin
effectively shunting the IWDG reset pulse
Because the F103 reset system pulses the nRST pin from a variety of sources instead of sending the reset pulse internally thru gates.
Thanks all
Nachus
The problem was that I were using a complementary output type reset controller (max809 series) tied to the reset line
where it should go a open drain controller. The reset controller sustained a very low impedance high level on the nRST pin
effectively shunting the IWDG reset pulse
Because the F103 reset system pulses the nRST pin from a variety of sources instead of sending the reset pulse internally thru gates.
Thanks all
Nachus