Questions tagged [stm32]

The STM32 is the third ARM family by STMicroelectronics. It follows their earlier STR9 family based on the ARM9E core, and STR7 family based on the ARM7TDMI core. The STM32 is based on the ARM Cortex-M family of cores.

More information and relevant links on the STM32 can be found on this Wikipedia article.

3383 questions
50
votes
2 answers

STM32 Understanding GPIO Settings

In STM32 Standard Peripheral library, we need to configure the GPIO. But there are 3 functions which I not sure how to configure them; GPIO_InitStructure.GPIO_Speed GPIO_InitStructure.GPIO_OType GPIO_InitStructure.GPIO_PuPd In the GPIO_Speed,…
Tim
  • 899
  • 2
  • 12
  • 18
47
votes
5 answers

CMSIS vs HAL vs Standard Peripherals Library

So I'm switching from PICs to ARM and I bought an STM32F4 discovery board. So far I understand that to program it you can either access all registers directly in memory (obvious way) and also there are 3 main libraries you can use to make your life…
John
  • 1,361
  • 2
  • 12
  • 23
34
votes
8 answers

How do I develop for STM32 discovery on Linux?

I have an STM32 discovery board and would like to be able to program it on Linux. What is the easiest way to do this?
Gordon Williams
  • 1,023
  • 4
  • 11
  • 17
33
votes
8 answers

Why do we need a bootloader separate from our application program in microcontrollers?

Why do we need a separate program in the same flash program memory of a microcontroller, specifically STM32F103, which is called a bootloader? What is special about it to keep it separate from the main application program? Generally speaking, does…
alt-rose
  • 1,441
  • 14
  • 29
33
votes
7 answers

How do I use the printf function on STM32?

I am trying to figure out how to use the printf function to print to the serial port. My current setup is STM32CubeMX generated code and SystemWorkbench32 with the STM32F407 discovery board. I see in stdio.h that the printf prototype is defined…
user505160
  • 1,010
  • 5
  • 16
  • 26
31
votes
2 answers

What is the difference between an injected and regular STM32 ADC channel?

The STM32F1's reference manual describes "regular" and "injected" ADC channels but is not clear on the difference. What is the difference between the two types and when might you use one or the other?
joeforker
  • 5,596
  • 10
  • 38
  • 59
26
votes
1 answer

What is the STM32 event EVENTOUT?

In the manual of my STM32, one of the GPIO Alternate Functions (namely AF15, see page 138) is called EVENTOUT. At no point is the event defined, or a use case given. What is the EVENTOUT alternate function of my STM32?
Randomblue
  • 10,953
  • 29
  • 105
  • 178
25
votes
3 answers

STM32F4 and HAL

So I've been experimenting a while with the STM32F407 (I'm new to ARM) and decided to write a simple app using the HAL libraries since it seems ST has discontinued the Standard Peripherals Libraries. So my question is, what is the point in HAL?…
John
  • 1,361
  • 2
  • 12
  • 23
24
votes
3 answers

UART signal is "rounded"

I am trying to debug a UART driver for the STM32F405. It does not work above a certain baud rate (about 50 kBd). I connected it to a logic analyzer with analog capability, and I saw that the signal is rounded; it takes time for the signal to rise.…
BillThePlatypus
  • 351
  • 2
  • 7
22
votes
10 answers

STM Microcontroller burns every time

I have some experience working with stm32 but I only ever used them on dev boards. I recently tried to solder stm32 and stm8 on a simple break-out board and program them with my st-linkv2 clone. On first power up, the mcu makes some little noises…
NXP
  • 391
  • 2
  • 10
22
votes
2 answers

Why does ST recommend 100 nF decoupling capacitors for a 72 MHz MCU? (And not 10 nF.)

I've been reading about decoupling capacitors, and I can't seem to understand why ST recommends 100 nF decoupling capacitors on a 72 MHz ARM microcontroller. Usually 100 nF decoupling capacitors are only effective up to about 20-40 MHz due to…
Mike
  • 1,169
  • 3
  • 15
  • 26
22
votes
2 answers

Stm32 Event and interrupts

I started studying interrupts on stm32 specifically the stm32f4 discovery board. i found this example in which you have to press the button to start the interrupt and push it again to stop it. In this line:EXTI_InitStructure.EXTI_Mode =…
ChiPlusPlus
  • 419
  • 1
  • 3
  • 12
21
votes
8 answers

STM32 & ST-LINK - Cannot connect to MCU after successful programming

I have built my own board with STM32F7-45VGT6. I have successfully programmed it with ST-LINK v2 (not the original one though) and now I cannot even connect with MCU. I use ST-Link Utility from ST and SWD interface. It can be the case that I use SWD…
zupazt3
  • 1,567
  • 4
  • 17
  • 27
19
votes
11 answers

Why should interrupts be short in a well configured system?

Why should interrupts be short? I'm currently using STM32 and it has a feature of prioritizing interrupts. Because of that, I don't see any difference between these two options: the main loop and interrupts one big interrupt with a very low…
oneat
  • 581
  • 2
  • 6
  • 11
19
votes
5 answers

Independent watchdog (IWDG) or Window watchdog (WWDG)?

I'm still searching to find an answer for this question: Since the STM32 MCUs already have a perfect watchdog (I mean the Window watchdog (WWDG)), why is there also a simple watchdog (Independent watchdog (IWDG)) ? I found this page that has…
Roh
  • 4,598
  • 6
  • 41
  • 86
1
2 3
99 100