Questions tagged [stm32]

The STM32 is a family of microcontrollers from ST Microelectronics, based on the Cortex M0, M0+, M3, M4, or M7 ARM core (depending on the product line).

The STM32 is a product line from ST Microelectronics using 32-bit Cortex-M microcontrollers and/or Cortex-A microprocessors. There are a variety of microcontrollers with different power consumption and performance characteristics. Some microcontrollers also offer DSP and floating point functionality.

In addition to the line of microcontrollers, ST also offers a number of different evaluation boards and development boards. These boards contain a microcontroller on a PCB with additional support electronics and various sample sensors. The STM32CubeIDE Integrated Development Environment supports software development for these products.

Two such product lines are the Discovery kits such as the STM32F0DISCOVERY and STM32F3DISCOVERY boards and the Nucleo product line of prototyping boards.

As of Q1/2023, the family consists of:

MPU

  • STM32MP1 - Cortex A7 & Cortex M4 big.LITTLE

Low Power

  • STM32L0 - Low-Power Cortex-M0+
  • STM32L1 - Low-Power Cortex-M3
  • STM32L4 / L4+ - Low-Power Cortex-M4
  • STM32L5 - Low-Power Cortex-M33
  • STM32U5 - Ultra Low-Power Cortex-M33

High Performance

  • STM32F2 - High-Performance Cortex-M3
  • STM32F4 - High-Performance Cortex-M4
  • STM32F7 - High-Performance Cortex-M7
  • STM32H5 - High-Performance Cortex-M33 (up to 1 GHz)
  • STM32H7 - High-Performance Cortex-M7 (up to 550 MHz)

Main Stream

  • STM32F0 - Mainstream Cortex-M0
  • STM32F1 - Mainstream Cortex-M3
  • STM32F3 - Mainstream Cortex-M4
  • STM32G0 - Mainstream Cortex-M0+ (upgrading STM32F0)
  • STM32G4 - Mainstream Cortex-M4 (upgrading STM32F3)

Wireless MCUs

  • STM32WB - M4/M0 with BLE, Zigbee
  • STM32WL - M4/M0 with LoRaWAN
5104 questions
9
votes
1 answer

Flash memory as mass storage device using STM32 USB Device Library

There is this flash memory IC on my board, which is connected to my STM32F04 ARM processor. USB port of the processor is available for the user. I want my flash memory to be detected as storage device when connected to PC via USB. As the first step…
Ehsan Norouzi
  • 91
  • 1
  • 1
  • 2
9
votes
3 answers

Using STM32 HAL Timer and Adjusting the Duty Cycle of a PWM signal

I used the STM32Cube initialization code generator to generate an initialized Timer function. To generate a fixed duty cycle PWM signal I added HAL_TIM_Base_Start(&htim1); //Starts the TIM Base generation and HAL_TIM_PWM_Start(&htim1,…
Nadim
  • 103
  • 1
  • 2
  • 6
9
votes
7 answers

STM32: Implementing UART in DMA mode

I am trying to implement UART in DMA mode to transmit a simple string every time a push button is pressed. So I have used CubeMX to generate the code and I have configured UART2 TX DMA in normal (not circular) mode and also no FIFO and no…
Nixmd
  • 775
  • 5
  • 11
  • 20
9
votes
2 answers

Executing code from RAM in STM32

I recently have started programming on a STM32F4 nucleo board. I just have figured out that programming into the flash is only possible for a limited amount of times (though it's not a few, but it is an evaluation board and it will be programmed…
Nixmd
  • 775
  • 5
  • 11
  • 20
9
votes
1 answer

STM32 wake up from standby by RTC

I am programming STM32L051R8 and have next problem. I'm trying use standby mode in most part of time, and sometimes wake up by RTC, it is an auto wake-up. If I work without sleep - all works perfectly, I got an RTC interrupt every time, but when I…
luden
  • 113
  • 1
  • 1
  • 4
9
votes
5 answers

Windows 10 - clean out USB enumeration/driver cruft

Summary I'm developing firmware and a PC test application for a custom USB device, using the STM32F072 Discovery board. The device includes Microsoft Windows Compatible IDs (WCIDs) to enable automatic installation of the WinUSB driver on the PC. The…
cp.engr
  • 2,291
  • 4
  • 28
  • 42
9
votes
3 answers

STM32 how to get last reset status

I'm working with STM32F427 and I'd like to get cause of last reset. There is RCC clock control & status register RCC_CSR with many reset flags, but I'm not able to get any meaningful value. By reading the value of that register, I get only 0x03,…
LKL
  • 93
  • 1
  • 1
  • 3
9
votes
5 answers

Jump to Bootloader in STM32 through application i.e using Boot 0 and Boot 1 Pins in Boot mode from User flash

I have a requirement for firmware upgrade. I am planning to use USB DFU class. But command for firmware upgrade will come from PC application in my case . so i need to switch to bootloader which is there in System Memory. As initially i am running…
Jasdeep Singh Arora
  • 543
  • 2
  • 11
  • 31
9
votes
2 answers

RAM, Heap, and Stack memory for an STM32 board

I am working on a project that requires at least 500 kB of memory to be used. I have an SDK with this code defining the stack and the heap and it works fine. Stack_Size EQU 0x00004000 AREA STACK, NOINIT, READWRITE,…
Dude
  • 261
  • 2
  • 5
  • 14
9
votes
3 answers

Overrun errors with two USART interrupts

Using two USARTs running at 115200 baud on a STM32F2, one to communicate with a radio module and one for serial from a PC. The clock speed is 120MHz. When receiving data from both USARTs simultaneously overrun errors can occur on one USART or the…
Jonathan Moreton
  • 91
  • 1
  • 1
  • 4
9
votes
1 answer

Ubuntu: What gcc to use when crosscompiling for the STM32 (Cortex-M3)?

I'm trying to get started with the STM32 (Cortex-M3) and my plan is get this working from Ubuntu (9.04 / AMD64). To start with I got the Olimex stm32-h103 header board and the Olimex ARM-USB-OCD jtag, and on to of that I will probably use OpenOCD,…
Johan
  • 20,067
  • 28
  • 92
  • 110
8
votes
2 answers

What are the various ways to disable and re-enable interrupts in STM32 microcontrollers in order to implement atomic access guards?

The standard technique to enforce atomic access to volatile variables shared with ISRs, via "atomic access guards" or "interrupt guards", in particular when running a bare metal, single-threaded cooperative multi-tasking application with no…
Gabriel Staples
  • 36,492
  • 15
  • 194
  • 265
8
votes
3 answers

STM32F4 Timers - Calculation of Period and Prescale, to generate 1 ms delay

I am using STM32F407VGT6 with CubeMX. So I was beginning with general-purpose timers and I am stuck with prescale and period values. Basically I want to generate a timer interrupt every n(where n=1,2,3..) ms and perform some tasks. There is lot of…
Ehsan Habib
  • 135
  • 1
  • 5
  • 12
8
votes
1 answer

Are all RAM-sections used in this linkerscript of a STM32H743 microcontroller (Cortex-M7)?

I know that the RAM-memory in the latest STM32 microcontrollers contains several sections with remarkable speed differences. That's why I'm trying to wrap my head around the linkerscripts for these devices (note: arm-none-eabi-gcc toolchain).…
K.Mulier
  • 8,069
  • 15
  • 79
  • 141
8
votes
5 answers

STM32 HAL USART receive by interrupt

I have some trouble to receive data over the USART. What I actually want to achieve ist, that I can receive a command over USART with no specific length (only a maximum possible length). So I use the interrupt routine to check each character…
HansPeterLoft
  • 489
  • 1
  • 9
  • 28