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.

Filter by
Sorted by
Tagged with
4
votes
3answers
326 views

What is actually sent/loaded to a microcontroller / STM32?

I see in all tutorials or sources, everybody creates a project in some IDEs and then loads code to the MCU again via those IDEs. What is sent to the MCU? Is it a sequence of binary numbers or some ...
4
votes
2answers
363 views

How to read STM32F407xx Microcontroller Power Schematic?

I am working with an STM32F407xx microprocessor to analyze incoming signals generated by some hydrophones in a sonar system. At this point in time I am just reading through the datasheet and trying to ...
4
votes
3answers
7k views

STM32F4 - Floating point unit ( FPU )

I would like to know, what is the purpose of the special FPU unit, that is advertised with STM32F4 microcontrollers ? To quote this website : " The Cortex-M4 core features a Floating point ...
4
votes
2answers
6k views

I2C: Is DMA required?

I'm trying to port some example code from the ST standard library examples. Specifically, there is a file called stm32_eval_i2c_tsensor.c that read and write ...
4
votes
2answers
810 views

How to correctly configure deepsleep for STM32L0xx

I'm trying to configure my Nucleo Board with a STM32L073RZ in deepsleep mode to get the lowest power consumption. To do that I use the mbed librairies with the deepsleep() function (This function use ...
4
votes
5answers
9k views

SysTick accuracy in STM32

I have coded a simple timing check for my STM32F4 Discovery board. ...
4
votes
2answers
848 views

STM32 SPI not working as I expect it should based on online reading

I am using an STM32F103C8 to connect to a Hope RF95W transceiver IC for the purpose of learning. I am only trying to read the chip version register, then write a config register that has a 0x00 reset ...
4
votes
2answers
678 views

Lightweight (subset) of standard C library (ANSI C library)

I'm porting standard C library for bare metal "OS" (ARM Cortex-M4, ARM GCC). I want to have functions like strlen, sprintf, (and memory allocator, maybe), etc. I've ported PDCLib and Newlib. Newlib ...
4
votes
3answers
3k views

Trying to flash STM32f030f4 (ARM, Cortex M0) - what is proper wiring?

I've got STM32F030F4 chips from shop, made a small breadboard adapter for it and tried to connect to its built-in bootloader via USART1. I've failed and I'm somewhat bewildered about wiring. My ...
4
votes
2answers
1k views

How to design a buffer amplifier for STM32 ADC

So the purpose of this circuit is to buffer a 0-5V signal coming from a potentiometer sensor. The processor is 3.3V tolerate. the sampling switch resistance as 6K. the processor is a STM32F429 are ...
4
votes
1answer
18k views

STM32 VCP - Receive data from PC

I am using STM32 HAL VCP firmware generated by CubeMX on STM32F4 discovery board. The Virtual COM Port works, I can transmit from the microcontroller to the PC as many messages I want. But in the ...
4
votes
1answer
585 views

STM32 crashes when FreeRTOS project is converted to C++

I am experimenting with STM32F303RE Nucleo board on SW4STM32 with FreeRTOS v10.1.1 and I was thinking of parsing NMEA sentences by adding the characters to a buffer using UART interrupt and then ...
4
votes
2answers
1k views

STM32F4 Adjust linker script to save memory for EEPROM emulation

I need to reserve FLASH for my the virutal EEPROM emulation on an STM32F405VGT6: https://www.mouser.ch/datasheet/2/389/stm32f405rg-956214.pdf The pages I need are in Sector 2 and Sector 3 of the ...
4
votes
2answers
17k views

Reading internal temperature sensor STM32

I'm trying to read internal temperature sensor. Each time, the value from ADC conversion is 296 which results in negative temperature. Should I add something to the code below, enable some peripheral ...
4
votes
1answer
4k views

Can the USB module of STM32F103 be clocked by the HSI?

There is a board of STM32F103CBT6 without external high speed crystal. I want to use the USB module on this board. The input of the PLL is 4MHZ as I configured PLL source to internal RC oscillator (...
4
votes
2answers
649 views

ARM Cortex M3 firmware

First some background information. There is one product (a sensor) bought from a far eastern manufacturer, bless their white cotton socks, that uses the STM32F103V microcontroller. The firmware that ...
4
votes
4answers
1k views

Sensing current upto 2A w/ high resolution

I'm trying to sense a current that will flow in a motor (current shouldn't exceed 2Amps), and I'd like to have a high resolution on this measurement. I was hoping on using the ACS712, but it says the ...
4
votes
4answers
561 views

Interrupt control in STM32

I am trying to learn about STM32 programming. I started to read some references before start the programming. I am currently reading this ST presentation. It says: When an interrupt request ...
4
votes
2answers
375 views

Why aren't pins on microcontroller grouped together, close to each other?

Simple question, the curiosity is killing me. Why do microcontrollers (and other IC also, like RAMs) have pins not grouped together? Like in STM32, for example you have portA and it has 8 bits on ...
4
votes
3answers
1k views

How to properly use STM32 flash memory as an EEPROM?

I have to save certain parameters to the flash memory and these values should be non-volatile. But my program will change these parameters and I want the changes updated to the flash. I understand to ...
4
votes
3answers
522 views

How to debug current consumption with STM32 Nucleo board?

I'm trying to configure an STM32L011-Nucleo developement board to consume about 600 uA of current or so. It uses an STM32L011K4. The datasheet states that this should be possible if I drive the MCU ...
4
votes
1answer
4k views

STM32 HAL UART Transmit DMA problem

After setting up my project for a custom STM32F7 board which includes a FT2232H UART<->USB converter I got multiple problems when sending (and receiving data). The code I use is mostly generated by ...
4
votes
4answers
8k views

OpenOCD child process termination: Wrong device detected

Setup I have an STM32F103C8T6 minimal eval board (see STM32F103C8T6). And I'm using an ST link like the picture below. I installed System Workbench for Eclipse. I created my own project (C++, Empty ...
4
votes
2answers
466 views

Switching HV DC relay on crashes microcontroller

So I´ve designed a PCB for a Pre-/Discharge Circuit for a 400V DC system which is controlled by a STM32 microcontroller. When powered the program waits for 1s and then starts by switching the (...
4
votes
2answers
438 views

Jitter of UART TX pin

I'm developing a small robot using the STM32L152C Discovery board. I'm currently trying to configure the board using the STM32CubeMX. I've never worked at this very-low level (my experience is much ...
4
votes
2answers
4k views

Vref_cal on STM32F3xx ADC

Is there a function to read the Vrefint_cal in Cubes HAL libraries? I'm using the F3xx. I'd like to measure the supply voltage of the micro. The formula given in the reference manual is: \$ \Large ...
4
votes
1answer
549 views

STM32 chip specs do not match the datasheet?

I've recently purchased a couple of STM32L152R8T6 chips from a local electronics shop. According to the page 11 of the datasheet, this chip is supposed to have 10K of SRAM and 64K of FLASH. However, ...
4
votes
2answers
1k views

What is the usage of this resistor?

I'm thinking about this part of this board : As you can see, there is a resistor in the red rectangle (R26). my question is what is the usage of this resistor? Well being a resistor for D14(CANRX) ...
4
votes
1answer
36k views

Full duplex slave SPI, DMA and interrupts on STM32F103

I am looking for a bit of help with SPI and DMA on an STM32F103C8 board. I have it working as an SPI slave using interrupts and am have trouble getting DMA to work. I'm aiming to get full duplex 16 ...
4
votes
1answer
18k views

STM32 GPIO Configuration

I am trying to figure out some online resource to figure out how to configure the GPIO Registers on an STM32F4 Cortex M4 board. I only have examples for the Cortex M4 ...
4
votes
2answers
2k views

How to _disable_ USB on STM32F1xx?

I have a battery-powered device using an STM32F107. The device works and I am currently working on minimizing its power consumption. One of the bigger current draws is the USB subsystem itself, using ...
4
votes
2answers
15k views

setting the frequency of a PWM on a STM32

I'm trying to write a function that takes a desired frequency of PWM and sets the timer based on this value: ...
4
votes
1answer
1k views

Look up tables, Flash or SRAM?

A STM32F4 platform is used, which has 192kBytes SRAM, which is sufficient for me. I am trying to build a look up table. The LUT will be used in calculation several times. And I want to put it in SRAM ...
4
votes
2answers
9k views

STM32F4 Discovery + Mac OS X + GCC + OpenOCD + Eclipse

I'm interested in buying an STM32F4 Discovery from ST Microelectronics. I'm using Mac OS X, 10.8 and would like to use a toolchain including GCC OpenOCD for debugging Eclipse IDE / IntelliJ IDEA ...
4
votes
1answer
146 views

Why does STM32 use a two-stage initialization process? What is the primary purpose of each stage?

I'm learning to use STM32 microcontrollers using CubeMX to generate a project. I've noticed that CubeMX generates two basic stages of initialization for nearly every peripheral: (A) Within the ...
4
votes
2answers
254 views

STM32 Min. clock speed whilst sleeping

I am looking at using the STMF103RB ( ST product page ) for a use case involving being asleep for 1 second and UARTing 500 ADC samples and then going back to sleep. I have a 50mAh battery and need it ...
4
votes
2answers
2k views

Interfacing a STM32 MCU with an external ADC (and reading the data via SPI)

I want to use a STM32 microcontroller to read data from a multi-channel ADC. The microcontroller that I intend to use will most likely be something from the F7 series (such as STM32F746ZGT), whereas ...
4
votes
1answer
6k views

STM32F74x Flash page size and sectors

I am writing data to the internal flash of a STM32F746 and I'm wondering what the difference between pages and sectors is? And what is the purpose of using sectors instead ? Notice that I'm very new ...
4
votes
1answer
3k views

VBAT pin and external crystals in STM32F030R8T6

STM32F030 Datasheet here. On page 14, it's mentioned that: "System clock selection is performed on startup, however the internal RC 8 MHz oscillator is selected as default CPU clock on reset. An ...