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
5
votes
1 answer

STM32: Use USART with character match ISR and DMA buffer

I'm using a STM32L432 device with FreeRTOS and STM32CubeMX. I try to implement a M2M-Communication via USART based on an ASCII protocol. The protocol sequences can differ in length but have a maximum length and a defined end character ('\r' /…
PascalS
  • 975
  • 1
  • 16
  • 40
5
votes
4 answers

Calibrating STM32 ADC (VREFINT)

I'm trying to read VDDA on an STM32F042 microcontroller. I'm getting unexpected results with VDD at 3.29V. I must be missing something fundamental. output: VREFINT=1917; VREFINT_CAL=1524; VDDA=2623 mV VREFINT=1885; VREFINT_CAL=1524; VDDA=2668…
iter
  • 4,171
  • 8
  • 35
  • 59
5
votes
1 answer

Is there anybody using Keil MDK on Linux through wine?

I've been having trouble using keil MDK on ubuntu 18.04. After doing a couple of trial I am able to use uVision IDE of keil on my ubuntu os. Everything working fine but while trying to program my mcu it shows "No ST-Link Found". But as I insisted to…
Naasif
  • 495
  • 2
  • 6
  • 13
5
votes
3 answers

Arm: How does objcopy know which sections from an elf to include in a binary or ihex?

I'm working on a project which involves parsing an arm elf file and extracting the sections from it. There are obviously plenty of sections in an elf file which do not get loaded into flash, but I'm wondering how exactly objcopy knows which…
chris12892
  • 1,634
  • 2
  • 18
  • 36
5
votes
2 answers

STM32 SPI Slow Compute

I'm using a STM32F4 and its SPI to talk to a 74HC595 like in this tutorial. Difference is for starters I'm using the non-DMA version for simplicity. I used STMCubeMX to configure SPI and GPIO Issue is: I'm not getting the latch PIN, that I set to…
Julian
  • 915
  • 8
  • 24
5
votes
3 answers

DMA transfer taking more time than CPU transfer

Our task is intended to demonstrate the benefit of using DMA to copy a large amount of data versus relying on the processor to directly handle the copying. The processor is an STM32F407 on the ST discovery board. In order to measure the copying…
Joe P
  • 79
  • 4
5
votes
2 answers

Gdb can't connect to OpenOCD on stm32

Trying to debug my sample blink_led code on STM32L476 Nucleo-64 board but gdb can't connect to OpenOCD (connection drops almost instantly with error). I've read plenty of posts here and there but none of them helped. Tried adding commands to OpenOCD…
M. Sh
  • 123
  • 2
  • 7
5
votes
3 answers

How to decrease SPI overhead time for STM32L4 HAL library

I am using a STM32L476RG board and HAL SPI functions: HAL_SPI_Transmit(&hspi2, &ReadAddr, 1, HAL_MAX_DELAY); HAL_SPI_Receive(&hspi2, pBuffer, 4, HAL_MAX_DELAY); I need to receive data from accelerometer's buffer with maximum speed and I have a…
awyzlin
  • 73
  • 1
  • 5
5
votes
3 answers

Intentional receive complete UART DMA interrupt after specified timeout

I have configured a UART to receive in DMA mode where the size of the buffer is around 64 bytes. So, basically, the HAL_UART_RxCpltCallback() DMA receive complete interrupt will only fire when 64 chars are received. Is there a way in STM32 through…
Akay
  • 1,092
  • 12
  • 32
5
votes
2 answers

ARM PC value after Reset

I am new to MCU and trying to figure out how arm (Cortex M3-M4) based MCU boots. Because booting is specific to any SOC, I took an example hardware board of STM for case study. Board: STMicroelectronics – STM32L476 32-bit. In this board when…
user2774767
  • 63
  • 1
  • 6
5
votes
4 answers

Setting up SWV printf on a Nucleo STM32 board

I am developping a Firmware on various STM32L4 Nucleo boards with Atollic Truestudio IDE (basically Eclipse). Until now I was using printf through UART, thanks to the Virtual COM port. I want to migrate to printf using STM32 ITM. More precisely I…
Guillaume Petitjean
  • 2,408
  • 1
  • 21
  • 47
5
votes
1 answer

STM32 Position Independent binaries

I'm compiling my FreeRTOS application for Cortex-M4 (STM32F4) with following CFLAGS: -fpic -msingle-pic-base -mpic-data-is-text-relative -mpic-register=r10 and with -fpic flag set for linker. Vector table is properly copied to RAM with changed…
VIPPER
  • 326
  • 4
  • 24
5
votes
4 answers

Really Minimal STM32 Application: linker failure

I'm building a tiny microcontroller with only the bare essentials for self-educational purposes. This way, I can refresh my knowledge about topics like the linkerscript, the startup code, ... EDIT: I got quite a lot of comments pointing out that…
K.Mulier
  • 8,069
  • 15
  • 79
  • 141
5
votes
2 answers

Disable IRQ on STM32

Is there any way to disable all irq from Cortex M3 MCU except one ? My issue is that I have a system running several kinds of irq with various priority levels and I want to disable all irq except one in a particular state. I know I can disable all…
LOSnel
  • 161
  • 1
  • 1
  • 8
5
votes
3 answers

How to use OpenOCD to talk to two STM32 boards at once?

Let's say I've got two STM32's, and I'm using this programmer here. I want to connect to both of them and debug/reflash/itterate independently. So, the setup I have is as follows: HW PC |-> USB1 -> ST-LINK-Programmer1 -> STM32_Board1 |-> USB2…
testname123
  • 1,061
  • 3
  • 20
  • 43