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
6
votes
1answer
889 views

Receiver issues on STM32H7 interrupt-based SPI

I want to configure a simple interrupt-based SPI slave transmitter/receiver on a STM32H7 MCU. Even though I have quite a bit experience with the older series of STM32 ARM MCUs, it seems that a lot of ...
5
votes
6answers
3k views

16-bit or 24-bit converters?

I wanna build some DSP effects on, for example STM32F4 processor, with frequency 96 or 192 KHz. Are 16-bit converters (ADC and DAC) enough for that kind of operation? Can I hear a diffrence when ...
5
votes
5answers
7k views

Nonblocking I2C implementation on STM32

Most articles I am able to find which are essentially "I2C for dummies on XXX microcontroller" suggests blocking CPU while waiting for confirmation events. For example, (comments and description are ...
5
votes
4answers
7k views

Circuit design - please explain to me the usage of these capacitor and inductor

I am studying this circuit, but unable to understand why they put capacitor C30, C33, EC4, inductor L3 on their current place, and their value, i keep searching on google for decoupling capacitor, ...
5
votes
3answers
4k views

How to cut interrupt code to minimum?

I have some interrupt let's say from UART to make a real example: ...
5
votes
2answers
22k views

Using a GPIO pin as a power source

I have an STM32F2 (reference manual here) which is connected to a GPS receiver through 5 pins. One of these pins is a power supply pin for the GPS. All pins on the micro-controller are GPIO pins that ...
5
votes
2answers
400 views

Ways to observe clock signal of an STM32 MCU

Is there a nice way to be able to observe the clock signal in an oscilloscope to validate my settings for clock speed? After setting it to 168 MHz with PLL for an STM32F407VGT6 MCU let's say.
5
votes
2answers
2k views

STM32F103: Can a timer can interfere with uart?

I have a simple program, which receives data from UART interface and drives a WS2812b led strip. So, I'm using USART3 to receive data (in IRQ mode) and T3C2 (timer 3, channel 2) to drive LEDs. Here ...
5
votes
2answers
8k views

Possible to power STM32 Nucleo boards with USB battery pack?

I have a wireless-transmitter module connected to a Nucleo board. The sensor draws power (~200 mA) from the Nucleo board's 3.3V out pin. Case A (successful): When I connect/power the Nucleo board ...
5
votes
4answers
519 views

The memory regions I can write and cannot write to, ARM Cortex-M architecture

I hope my title is correct terminologicaly. I am working(learning) with STM32F4 discovery board, which has an STM32F407VGTx microcontroller on it. I really try to find the answers in the reference ...
5
votes
2answers
1k views

DP83848 + STM32 & Failed EMC (massive spikes of 25MHz crystal harmonics)

So we've failed EMC two times now because of spikes of 25 MHz harmonics from 175 MHz to 300 MHz, especially 175 MHz, 225 MHz and 275 MHz with peaks easily 30-40 dBuV above noise floor measured with ...
5
votes
2answers
629 views

STM32F0 - run user program from SPI flash memory

I'm building an application based on the STM32F030F4P6 microcontroller. During the development of the firmware, I realized that the flash memory of the microcontroller is too small. Can I run my ...
5
votes
1answer
19k views

How to get USART and USB-Serial working on the STM32F4Discovery Board?

I'm programming a STM32F407VG chip on the STM32F4Discovery board using CooCox CoIDE. I've stitched together a program based on some examples and tutorials I found online to get USART1 through pins ...
5
votes
2answers
931 views

How to debug STM32L433 Current leakage

I have a circuit board with STM32L433 that has around 320uA of baseline current draw in STOP 2 mode. Only LSE with a 32kHz crystal is active. The board has separate analog Vdda power which is ...
5
votes
2answers
3k views

“Backup SRAM” vs “backup registers”

Today I was looking at STM32F205 datasheet. this MCU has a feature. except 20 × 32 bit backup registers, it has 4 KB Backup SRAM. and due to datasheet: And look at this: Does "Backup SRAM" get erase ...
5
votes
2answers
12k views

What exactly does OTG_FS_SOF do? Is it vital or imperative to USB host mode?

When using the USB host mode, the STM32 has a pin named OTG_FS_SOF that ST gives very little useful information (in both Datasheet and USB tech documents) other than it has something to do with ...
5
votes
1answer
639 views

STM32F0 SPI--what am I missing?

I'm trying to send SPI data to a MAX7219 from an STM32F042 (the protocol is one-way without MISO). I must be missing something very obvious. With the code below, the only visible side effect is the ...
5
votes
2answers
2k 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 ...
5
votes
3answers
6k 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 ...
5
votes
1answer
1k views

I2C Slave ACK not driving down sufficiently

My I2C slave is not pulling down the bus all the way for the ACK. I have tried replacing 1.5k pullup with 10k pullup, but the ACK voltage remains the same (1.6V). System Voltage: 2.5V Master: ...
5
votes
1answer
5k 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 (...
5
votes
2answers
7k views

Is it possible to have 16 simultaneous PWM outputs on a 64-pin STM32F4 device?

From the STM32F405xx/STM32F407xx datasheet, I read that (at least) TIM2, TIM3, TIM4, and TIM5 have output compare units that can be configured to produce PWM signals on 4 channels each. If one ...
5
votes
2answers
4k views

What's the difference between a generated hex file and a binary file in embedded systems?

I have an STM32 project (let's call it blinky). This project is developed using Keil IDE. It blinks an LED every 1 second. When I build it, a HEX file is generated. Let's say I want to upgrade the ...
5
votes
2answers
400 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 ...
5
votes
3answers
1k views

STM32F4 - CMSIS & Board Specific Libraries

I recently purchased a STM32F4 board to learn the ARM architecture. I am fairly comfortable with embedded programming having worked with AVR series for about a year. I was going through this tutorial ...
5
votes
1answer
2k views

STM32F3 Discovery + GNU ARM plugin + OpenOCD - cannot load the binary onto the board

I'm using the GNU ARM plugin for Eclipse with Open OCD as a debugger. This is on Windows 10 x64. The problem I'm facing is the following error when trying to debug or run the sample program: Error ...
5
votes
3answers
4k views

Calculating time spent by a function in Microcontroller Applications

I would like to write a simple profiler for my STM32F100VE microcontroller. I have seen that I can include time.h and based on the c standard functions I can use it, but I was confused about ...
5
votes
1answer
109 views

Large delay between I2C messages on STM32F303 - trying to read as fast as possible

I've got a sensor that I'm reading via I2C. My end goal is to be able to maximize the rate at which I can take these readings. In order to read, I have to write an zero-byte I2C message to the slave ...
5
votes
1answer
507 views

How do I interrupt an ISR with a higher-priority ISR on an STM32F105?

I have two external interrupt sources coming into an STM32F105. I want one of them (call it "IRQHigh") to pre-empt the other ("IRQLow"). Currently, if IRQHigh is triggered during the IRQLow ISR, the ...
5
votes
3answers
527 views

How did this simple nmos level shifter break my STM32?

I'm trying to read some 12V square wave signals from an old car with an STM32. I built some level shifters like shown below to down-shift (and invert) the signal so I can hook it up to an GPIO. ...
5
votes
4answers
10k views

External power to STM32F4 Discovery board

I've recently finished programming the STM32F429ZI DISC1 board. I'm fairly new to this and now want to move away from connecting it to the PC via USB and power it up via a power supply. At present I ...
5
votes
3answers
7k views

What happens on STM32 when multiple (UART) Interrupts are triggered at the same time? is there an interrupt stack?

I'm implementing a uart daisy-chain communication scheme with a Cortex M4. When a node receives a byte over one UART, an interrupt is generated (RXNE) and the byte ...
5
votes
1answer
2k views

STM32F4 USB VCP, PC receive all 0x00

I'm a beginner in STM32F4 and I'm learning how to use the USB Virtual COM Port ("VCP") to transmit data from the microcontroller to a PC. The virtual port is detected as "STMicroelectronics Virtual ...
5
votes
2answers
2k views

Low-end DSP vs High-end MCU

I'm currently working on a Guitar DSP project, based on STM32F407VGT6 but as I progress I come to conclusion that I'm gonna need a bigger unit (with SDRAM). The question that is ringing in my head is ...
5
votes
3answers
10k views

Supercap charging circuit for RTC backup on STM32

I'm asking for a reliable/simple/cheap circuit for the VBAT section of a STM32 design, powered at VDD=3.3V, that will safeguard the built-in RTC (based on 32768 Hz Xtall) for like 10 days. Based on ...
5
votes
2answers
2k views

Why did the datasheet mention this interface?

I have a ST32F103RET6 MCU. I got the datasheet (and refrence manual). When I read the datasheet (and refrence manual), I found this section: Now I have several questions about it: Why does the ...
5
votes
3answers
4k views

STM32 DMA Transfer bridge between 2 uart ports

I am using a stm32f103 and I'm trying to simply transmit all data received on 1 uart to another uart and vice versa. When using 2 terminal programs it works great, everything I type gets transmitted ...
5
votes
3answers
4k views

STM32 appears to be irrevocably bricked

I have a custom board with an STM32F103VE MCU. I can connect to it fine using ST-Link Utility, and I even had code downloaded to it a few times (in ST-Link Utility as well as CooCox), but today I ...
5
votes
3answers
13k views

STM32 USB: detecting connection and disconnection

Using STM32F4 USB Mass Storage Controller example in Device Mode, how do you detect connections and disconnections with a host controller? I tried polling the VBUS pin state yet it could be high from ...
5
votes
1answer
4k views

What's the concept of these three options for configuring the memory of STM32?

I have read the STM32F10x Reference manual but a section about "Reading the Flash memory" is not clear to me, yet. I mean this part(page 59): I have several question: What's the Latency? in fact I ...

1 2 3
4
5
61