Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to configure STM32 timer for LED flashing

jab99407

Member
Hi.. I want to blink an led using a timer interrupt.

I open Device Configuration Tool
Next, I go to PD12 pin and select TIM4_CH1 option.
Now I go TIM4 timer mode and configuration

Clock Source: Internal Clock

What timer configuration are required to flash LED for 1 seconds or What timer configuration are required to generate 1ms timer interrupt ?
 

Attachments

  • STM32 Timer.jpg
    STM32 Timer.jpg
    184.8 KB · Views: 11

Pommie

Well-Known Member
Most Helpful Member
Why are you using a 32 bit processor to flash an LED? You seem to have the starting objective, flash an LED, on a Formula 1 microprocessor.

I suggest you start somewhere simpler.

Mike.
 

jab99407

Member
Why are you using a 32 bit processor to flash an LED? You seem to have the starting objective, flash an LED, on a Formula 1 microprocessor.

I suggest you start somewhere simpler.

Mike.
I don't think there is anything simpler than LED. I wrote LED blinking code using software delay. Now just want to generate timer interrupt for 1ms I would toggle LED when I would count 1000 interrupt for 1 seconds. That's why I want to configure to generate 1ms. I don't understand which option should be select for 1ms in timer mode
 

Pommie

Well-Known Member
Most Helpful Member
Starting on such a powerful processor is not necessary unless your intention is to learn that particular processor, however learning a simpler one first would be advised. If your intention is to learn to program then I suggest starting with something like an Arduino Nano.

Mike.
 

jab99407

Member
Starting on such a powerful processor is not necessary unless your intention is to learn that particular processor, however learning a simpler one first would be advised. If your intention is to learn to program then I suggest starting with something like an Arduino Nano.

Mike.
I have knowledge of PIC microcontroller and I want to learn ARM processor.
 

Latest threads

EE World Online Articles

Loading
Top