2020-11-18 06:14 AM
I refer to the attachment. I am using a push button to power on a STM32F303. As soon as the push button is pushed a P channel FET is activated supplying voltage to the STM32F303. As soon as the STM32 starts it activates a pin which takes over activation of the P channel FET.
This works very smoothly and fast. Now I implemented the same circuit with a STM32F407 and it takes relatively longer.. I have to push the button longer.
I am using Atollic TRUE studio with MX Cube
2020-11-18 08:16 AM
> As soon as the STM32 starts
In the startup routine, immediately after reset? Or in main()?
The latter is delayed by whatever is in the startup code, so look there.
Plus look into the datasheet for "temporization time".
JW
2020-11-18 02:38 PM
The STM32F4 starts (read: begins executing code from the reset handler) fast enough that you will be unable to notice the delay unless you're measuring on a scope. If your code is the same between the two, the startup time should be comparable.
2020-11-19 01:49 AM
Thanks for the answers. Code stands indeed in the startup routine "/* USER CODE BEGIN 2 */" . Your answers confirm I missed something. Thanks again..
2020-11-19 08:19 PM
That's not the startup routine. Look for the Reset handler. It may be in an assembler (*.s) file in your project.
You need to understand all code you are using, including that which is auto-generated by the told you are using. Clicking in CubeMX does not work well for anything different from "usual", and people usually don't need the application to work immediately after being switched on.
JW
2020-12-23 07:59 AM
Ok JW thank you I had some time to take a look at the reset handler and the linker script..