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
5
votes
2answers
2k 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
4answers
16k views

Debugging an ARM (STM32) Microcontroller using Qt Creator

I have been working with STM32 series ARM microcontrollers on IAR Embedded Workbench for a while. For some reasons, now I need to move my works to Qt-Creator (both on Windows and Linux). In IAR EWARM, ...
5
votes
2answers
10k 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
914 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
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
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
3k 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
415 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
374 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
1answer
8k views

STM32 Sleep Mode: Interrupt gets executed but the CPU stays in WFI

I'm fairly new to the ARM architecture and I'm working with a board that contains STM32F0 microcontroller and an RF modem, which sends an interrupt every time it receives a message. I'm trying to ...
5
votes
4answers
9k 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
6k 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
3answers
9k 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
1k 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
1answer
15k views

STM32F103 low power mode (stop)

I've got a project where I'm trying to get the power consumption down as low as possible (on an STM32F103RCT6). I looked at ST's document on getting the STM32F2 power consumption down as low as ...
5
votes
1answer
5k views

HSI and MSI - Applications of two Internal RC OSC in Microcontroller

In a ST microcontroller I'm using there are two OSC's that can be routed to exactly the same hardware and I'm wondering when you would use each one. Link to part documentation STM32L496ZG Excerpt ...
5
votes
3answers
3k 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
12k 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
3k 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 ...
5
votes
1answer
10k views

Problems with UART on STMF4 Discovery Board

I have some problems with UART comunication. My platform is STM32f4 Discovery Board with STM32f407VG. First my system setup: ...
5
votes
1answer
2k views

Firmware design for OBD2 - available PIDs request to ECU

According to many documentations, we can request a vehicle ECU to respond with the PIDs it supports. Link.My question is in the end. I have designed an OBD2 scanner using STM32 and CAN. And it works ...
5
votes
1answer
612 views

STM32: the purpose of Even/Odd frame field for isochronous USB transfers

Implementation of USB isochronous transfers in (at least some) STM32 microcontrollers has a very weird feature. It's called EONUM (Even/Odd frame) field. Basically, the value of the field determines ...
5
votes
2answers
2k views

STM32: avoiding DMA & CPU collisions

Section 13.4 of the STM32 Reference Manual (for my STM32F303RE board) states: The DMA controller performs direct memory transfer by sharing the system bus with the Cortex-M4 ® F core. The DMA ...
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
1answer
2k views

STM32 USART loopback

Is it possible to connect the Rx and Tx pins of the same USART or on two different USARTs on an STM32 discovery board to make a loopback and test the USART?
5
votes
3answers
4k views

Cheap wifi for embedded projects [closed]

I am looking to combine a cheap wifi baseband/mac chipset with a STM32 F1 or F2 MCU to run the IP stack. I have to use the cheap USB wifi dongles or use SDIO/SPI interface and port the drivers. I ...
5
votes
1answer
402 views

Unit testing with Eclipse System Workbench (STM32)

Although this is a pure software question, other Stack fora are not suitable since the application problem is only occuring for microprocessor usage. I installed Eclipe System Workbench for ...
5
votes
5answers
56k views

STM32 USART Rx Interrupts

I'm trying to setup UART communication with the STM32F0 Discovery Board but I am having difficulty adapting the Rx side of things to my needs. The STM32 will be receiving a message (4-6 bytes with no ...
5
votes
1answer
979 views

STM32F4 How to stop triple interleaved mode?

I am using triple interleaved mode with DMA in STM32F429 and have problem stopping it. It should be stopped by HAL_ADCEx_MultiModeStop_DMA(&hadc1), but while ...
5
votes
0answers
178 views

Is JTAG faster than SWD for debugging on an STM32F with STLINK-V3SET programmer?

There is a new STLINK-V3SET programmer that someone dropped off on my desk today. It supports USB 2.0. My thinking is that if SWD is the bandwidth limiter in the signal chain then a new programmer isn'...
4
votes
5answers
1k views

Heap allocation on a microcontroller

I'm working on STM32F303VC. How does the heap allocation work? When I declare the arrays outside main() it allocates them on the heap - SRAM - 0x2000000 and forth in this MCU. But what determines the ...
4
votes
4answers
1k views

How to calculate 4 MHz crystal trace width on PCB?

I have no idea about how to draw crystal trace on pcb. I have stm32f0 chip and 4 MHz external crystal and 15 pF capacitor. Can you help me that how to get suitable trace for crystal trace? Should I ...
4
votes
5answers
2k views

How is time of supplied real time clock module maintained without battery?

I am thinking about purchasing this RTC ( real time clock ) module. Since this particular item comes supplied without a battery, I wonder how the time is being kept running in the chip since it's ...
4
votes
4answers
2k views

I want to learn a real microcontroller with STM32F4. Which library should I use (HAL, SPL, or CMSIS)? [duplicate]

From what I know, ST will stop to develop Standard Peripheral Libraries (SPL) for the next generations of STM32. And HAL is not ideal for people who want to understand well about STM32 and ...
4
votes
4answers
5k views

VBAT circuit explanation

I found this circuit in STM32F401VET6 schematic: As you can see, VBAT line has a lot of 100 nF capacitors. Is it there to mimic a battery? If yes, won't it be better to put a reverse leakage current ...
4
votes
3answers
761 views

How to test for USB dropouts on STM32F?

I've got a devices that is really strange, it drops USB periodically. By periodically I mean on a weekly (or biweekly) basis. By dropping out I mean windows loses the handle to the driver. Dropouts a ...
4
votes
5answers
6k 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 ...