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

What are "nosys", "nano", "rdimon" terms when using ARM GCC?

I am learning to write ARM code using the GCC toolchain. I've run into a few GCC options that I cannot find documentation for. Could someone please help explain what they do? -specs=nosys.specs -specs=nano.specs -specs=rdimon.specs -lnosys How do…
puritii
  • 1,069
  • 1
  • 7
  • 18
32
votes
5 answers

malloc behaviour on an embedded system

I'm currently working on an embedded project (STM32F103RB, CooCox CoIDE v.1.7.6 with arm-none-eabi-gcc 4.8 2013q4) and I'm trying to understand how malloc() behaves on plain C when the RAM is full. My STM32 has 20kB = 0x5000Bytes of RAM, 0x200 are…
Boern
  • 7,233
  • 5
  • 55
  • 86
29
votes
5 answers

Is it OK to #include .c source file for maintainability of embedded C code?

I am not an expert C programmer and I know that including .c source file from another is considered bad practice, but I have a situation where I think it could help maintainability. I have a big structure with a lot of elements and I use #define to…
ncenerar
  • 1,517
  • 12
  • 25
28
votes
5 answers

SIGTRAP despite no set breakpoints; hidden hardware breakpoint?

I am debugging this piece of software for an STM32 embedded system. In one of the functions my programs keeps hitting some sort of breakpoint: SIGTRAP, Trace/breakpoint trap However, in GDB, when I do info breakpoints I get No breakpoints or…
Randomblue
  • 112,777
  • 145
  • 353
  • 547
28
votes
4 answers

Why would ch341-uart is disconnected from ttyUSB?

Here's the deal, I want to flash my stm32 board with my USB serial port. And my stm32 board comes with an extended board which carries CH340. When I connected the board to my computer, I can see the device with the command lsusb, and the output is…
LunarEclipse
  • 661
  • 1
  • 4
  • 14
25
votes
4 answers

What is the role of .s files in a C project?

I am working with an ARM Cortex M3 chip (STM32F2) and ST provides a "standard peripheral library". It has some useful .c and .h files. It also has .s files. What is the purpose of these .s files in the context of a C project? How do I get my…
Randomblue
  • 112,777
  • 145
  • 353
  • 547
24
votes
3 answers

Which variable types/sizes are atomic on STM32 microcontrollers?

Here are the data types on STM32 microcontrollers: http://www.keil.com/support/man/docs/armcc/armcc_chr1359125009502.htm. These microcontrollers use 32-bit ARM core processors. Which data types have automatic atomic read and atomic write access? I'm…
Gabriel Staples
  • 36,492
  • 15
  • 194
  • 265
23
votes
2 answers

how to use llvm+clang to compile for stm32

Has someone infos how to build a llvm+clang toolchain using binutils and newlib and how to use it? host: Linux, AMD64 target: cortex-m3, stm32 c-lib: newlib assembler: gnu as
wermut
23
votes
6 answers

Does HAL_GetTick() return ticks or milliseconds? (and how to measure in microseconds)

I'm new to using HAL functions. The description of the function HAL_GetTick() says that it "provides a tick value in millisecond". I don't understand if this function returns ticks or milliseconds. Of course to convert from ticks to milliseconds I…
Alaa M.
  • 4,961
  • 10
  • 54
  • 95
23
votes
8 answers

STM32 WWDG interrupt firing when not configured

I have an application that I am porting from the Keil IDE to build with the GNU toolchain due to license issues. I have successfully be able to set up, build, flash and run the application on the device. The application on the GNU side is for some…
gettingSmarter
  • 661
  • 1
  • 5
  • 15
20
votes
6 answers

STM32F4 UART HAL Driver

I'm trying to figure out how to use this new HAL driver. I want to receive data using the HAL_UART_Receive_IT() which sets up the device to run an interrupt function when data is received. Problem is that you have to specify the length of data to…
HammerFet
  • 841
  • 3
  • 10
  • 16
19
votes
6 answers

STM32F0, ST-link v2, OpenOCD 0.9.0: open failed

I'm using Launchpad's gcc-arm-none-eabi 4.9-2015q2 to compile for an STM32F0, and now I'd like to debug using arm-none-eabi-gdb from that collection. My ST-Link v2 is part of a Nucleo F411RE board, with external hardware (the STM32F0 target)…
Christoph
  • 1,040
  • 3
  • 14
  • 29
18
votes
3 answers

STM32 GDB/OpenOCD Commands and Initialization for Flash and Ram Debugging

I am looking for assistance with the proper GDB / OpenOCD initializion and running commands (external tools) to use within Eclipse for flash and RAM debugging, as well as the proper modifications or additions that need to be incorporated in a…
user690605
  • 181
  • 1
  • 1
  • 4
18
votes
7 answers

How to use Backup SRAM as EEPROM in STM32F4

There are two ways of emulating EEPROM on the STM32F4: On-chip 4 Kbytes backup SRAM On-chip Flash, with specific software algorithm The second option is described here: AN3969. But google, unfortunately, hasn't been able to provide information…
Jolle
  • 1,336
  • 5
  • 24
  • 36
17
votes
4 answers

no stdint.h file on Debian

I'm trying to use Chibios. The example code they provide seems to need stdint.h file. The Makefile gives the following error: /usr/lib/gcc/arm-none-eabi/4.8/include/stdint.h:9:26: fatal error: stdint.h: No such file or directory # include_next…
ceremcem
  • 3,900
  • 4
  • 28
  • 66
1
2 3
99 100