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
1
vote
1 answer

STM32L011 cannot set USART in rx mode

I am using STM32L011K4T6. I want to receive a command from USART2 and do a specific action from that command. Data that is not that command should be ignored. My problem is that I don't receive any data on the USART. The RxCallback funtion is never…
andrei filip
  • 23
  • 1
  • 8
1
vote
0 answers

Put unchanging code in separate memory section, to reduce OTA update size

I am writing C code for the STM32L010RB microcontroller, which has 128 KB of flash memory where the program will reside. I want to implement over-the-air updates of this program code, and I've done this once before with an other Cortex M0+ based…
1
vote
0 answers

How to reserve a Flash memory sector on STM32/platformio/arduino

I am using STM32F401CE with Platformio and the Arduino framework. I would like to reserve a block of 16K Flash memory as a EEPROM replacement for occasional settings written by my app. How can I cleanly reserve a 16K flash block such that the linker…
zapta
  • 59
  • 3
1
vote
0 answers

Barometer (BMP180) pressure measurement problem

I have a barometer (BMP180) and am interfacing it with aSTM32. I have to read the altitude which should have a precision of a foot. While interfacing the barometer, I get a consistent real value of temperature but the pressure comes in the range of…
Sajil
  • 87
  • 8
1
vote
2 answers

Using statically allocated derived class objects to initialize an array of base class pointers

I have some classes designed to hold a pointer to some variables, and some other properties which are related to variables. Actually, I'm trying to design a CANopen stack for STM32 and I'm planning to use these classes to represent the object…
Tagli
  • 2,412
  • 2
  • 11
  • 14
1
vote
1 answer

STM32 timer clock frequency doesn't change and stay at 1.6MHz

It's been days which I'm reading the reference manual and changing the code to configure the STM32F401RE timers clock. It seems that SYSCLK is set at 84MHZ, PCLK1 is 42MHZ, and PCLK2 is 84MHZ. but every time I want to use TIM2, the clock is set at…
Mehdi
  • 62
  • 6
1
vote
1 answer

Crossworks String Conversion

We are using Crossworks IDE to run freeRTOS in C++. Here, we are sending data via serial com using "HAL_UART_Transmit" built in STM32_HAL function. We want to send Sensor data via serial com to external device. here is an exmaple format: float…
Siva
  • 13
  • 3
1
vote
1 answer

Unrecognizable characters received over UART

I have compiled code to transmit data from an STM32 board to the Arduino Uno and print it on the serial terminal. I have previously written code, similar to this and it worked as expected. However, when I try transmitting a string from the STM32…
S23
  • 119
  • 12
1
vote
1 answer

STM32F401RE PWM Mode doesn't work in Protues

I'm trying to generate PWM wave but it seems that proteus has a problem with it. I've tried to do so using CMSIS and CubeMX and neither of them works. tested timers: TIM 1, 2, 4, 5 with all their channels Timer configuration in CubeMX Proteus…
Mehdi
  • 62
  • 6
1
vote
1 answer

Read data from USB Virtual COM in STM32 Nucleo-F767ZI [Ubuntu]

I have written a program to stream data through USB port CN13, using this video. I am not able to see the data on the USB Virtual COM Port. When I connect the ST-LINK and Virtual COM port, there is only one USB Device, ST-LINK, getting recognized…
Sourabh Misal
  • 23
  • 1
  • 7
1
vote
1 answer

STM32F767 Nucleo board printf to console

For the last couple of days I have been trying to get printf to work to print a debug message to a STM32CubeIDE console. However, without any luck. I have gone through numerous forum threads and discussions and none of them appear to have fully…
Lukas Petrikas
  • 65
  • 2
  • 11
1
vote
1 answer

Multiple write to external eeprom corrupts previous data

I am interfacing AT24C02 external eeprom using stm32f401 nucleo. I am facing few issues. Lets consider some address /* 24c02 Device Address */ #define EEPROM_ADDRESS (uint8_t)0xA0 /*Demo addr*/ #define DEMO_BYTE_ADDR …
Ehsan Habib
  • 135
  • 1
  • 5
  • 12
1
vote
0 answers

Variable not storing the data it is assigned on a STM32 using c++

I am working on my first project using an STM32F103 microcontroller. I am trying to read the temperature and to print it out every second. The code seems to do its job sometimes but on a few occasions the function returns 0 when it clearly should…
1
vote
1 answer

STM32 timer 2x slower

I am using an STM32F042C4 and I want to set up timer for delay in µs. But when I set everything, I get a 2x larger. I am looking for any prescaler I could miss, but I have not found anything. setting is: //enable peripheral clock for…
1
vote
1 answer

Context Switching

I m trying to follow a tutorial implementinng task schedular in stm32f407 discovery board. There are four functions which will be executed one at time for 1ms each and then switch to next function. Tutorial defined the whole flow like, we will save…
Abhinav Singh
  • 302
  • 3
  • 15