cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F412G-DISCO: Turn on LD6 (PWR) LED when microcontroller is powered on

pass3master
Senior

We want to turn on the LED when the microcontroller is powered on. Before the program is executed.

Is it possible to achieve this with just the program, without changing the HW?

Specifically, we want to program LD6(PWR) of STM32F412G-DISCO.

1 ACCEPTED SOLUTION

Accepted Solutions
Andrew Neil
Evangelist III

@pass3master wrote:

Specifically, we want to program LD6(PWR) of STM32F412G-DISCO.


But that LED is not programmable: it is hard-wired to the 5V supply - there is no connection to the STM32:

AndrewNeil_0-1729006153219.png

https://www.st.com/resource/en/schematic_pack/mb1209-f412zgt6-d04_schematic.pdf#page=4

View solution in original post

9 REPLIES 9
PGump.1
Senior III

Hi,

Isn't that done with JP3...

Kind regards
Pedro

AI = Artificial Intelligence, NI = No Intelligence, RI = Real Intelligence.

Thank you for your answer.
Sorry for being st*pid. What does JP3 mean?

Look on STM32F412G-DISCO for JP3...

AI = Artificial Intelligence, NI = No Intelligence, RI = Real Intelligence.
Karl Yamashita
Lead III

Is there a specific reason you want to turn on the LED before the STM32 is initialized and running?

A better approach is to blink the LED to indicate the FW is running and didn't hard fault.

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.

You can connect one transistor with its input biased to turn it on, connect the base curcuit to one gpio. At boot time gpio is in input mode. When the program runs, you can turn off the transistor. Hope this helps.  You can fine tune this idea with mosfet, optocoupler etc...

If you feel a post has answered your question, please click "Accept as Solution".
Andrew Neil
Evangelist III

@pass3master wrote:

Specifically, we want to program LD6(PWR) of STM32F412G-DISCO.


But that LED is not programmable: it is hard-wired to the 5V supply - there is no connection to the STM32:

AndrewNeil_0-1729006153219.png

https://www.st.com/resource/en/schematic_pack/mb1209-f412zgt6-d04_schematic.pdf#page=4

Sco
ST Employee

In the default design, LD6 is not programmable. 

if you want to program LD6, the way is :

Step1: To remove R9.

Step2: To connect a GPIO(you can use resource from Arduino connector) to LD6 directly.

Step3: Program the GPIO you use.

Note that, brightness of LD depends on GPIO output capability.

 

Thank you for your response.
I see that the LED was coming directly from the 5V supply.
Now that I understand, I will close it.


@Sco wrote:

Step2: To connect a GPIO (you can use resource from Arduino connector) to LD6 directly


Don't connect directly - connect via a suitable resistor!

eg 510 ohms is used for the other green LED:

AndrewNeil_0-1729065367832.png