STM32F412G-DISCO: Turn on LD6 (PWR) LED when microcontroller is powered on
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-14 6:36 PM - last edited on ‎2024-10-15 9:05 AM by Andrew Neil
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.
Solved! Go to Solution.
- Labels:
-
STM32F4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-15 8:30 AM
@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:
https://www.st.com/resource/en/schematic_pack/mb1209-f412zgt6-d04_schematic.pdf#page=4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-14 7:10 PM
Hi,
Isn't that done with JP3...
Kind regards
Pedro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-14 9:25 PM - edited ‎2024-10-14 9:26 PM
Thank you for your answer.
Sorry for being st*pid. What does JP3 mean?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-14 10:18 PM
Look on STM32F412G-DISCO for JP3...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-14 10:25 PM
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.
TimerCallback tutorial! | UART and DMA Idle tutorial!
If you find my solution useful, please click the Accept as Solution so others see the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-15 8:09 AM
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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-15 8:30 AM
@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:
https://www.st.com/resource/en/schematic_pack/mb1209-f412zgt6-d04_schematic.pdf#page=4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-15 8:12 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-15 11:33 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-16 12:57 AM
@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:
