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
7
votes
1answer
4k views

Minimal ARM circuit is not working

I have developed an application by using STM32F4-Discovery development kit. Now code is mature and I need to build a custom circuit. I started building the bare circuit first: I soldered the chip ...
7
votes
4answers
1k views

What's causing this power spike in STM32 low power mode

I'm using an STM32L073RZ on a bare board with just the CPU and decoupling caps. I'm powering the board straight from an Otii Arc and measuring current consumption. I'm running MbedOS 5.11.2. When I ...
7
votes
2answers
2k views

STM32L MCU - SWD pin on board not matching processor pinout

I was doing my hardware hack project on an air quality monitoring device which uses STM32L476 processor. My only experiences with hardware hacking are IPcams or ...
7
votes
5answers
27k views

Set STM32 GPIO clock and data pins as fast as possible

I have an STM32 that toggles nine GPIO pins repeatedly (one clock pin and eight data pins to load an FPGA image using SelectMap). I am doing this using the standard library function ...
7
votes
2answers
11k views

Using CCM (Core Coupled Memory) in STM32F4xx

STM32F4xx microcontrollers have 128KB of SRAM + 64KB of CCM SRAM. CMM SRAM is hardwired to data bus so it is impossible to use it with DMA. What is the reason to add additional SRAM as CCM? Does it ...
7
votes
2answers
3k views

STM32 GPIO Speed

Why do we need to set speed for GPIO Output pins in STM32? Just for remind : For Input pins, The STM32F4 Reference Manual on page 278 says that: The data present on the I/O pin are sampled into ...
7
votes
3answers
2k views

How to program multiple STM32Fs on same PCB

I work in a management roll and only have a very limited electronics knowledge (enough to make simple arduino projects etc). We are working on a product at the moment which has 3 STM32F303s and 2 ...
7
votes
2answers
13k views

STM32F7 gets stuck in external interrupt callback function

i am working on a project to connect a camera to an STM32F7 Discovery board using the DCMI interface. The camera part works fine, but i have a strange problem with external interrupts from the ...
7
votes
1answer
3k views

STM32 interrupts and C++ don't go well together [duplicate]

I set up TIM3 to fire an interrupt in my project and it just wouldn't work. I tried everything I could and still couldn't find whats the problem. Then I created a clean project and copy/pasted only ...
7
votes
2answers
8k views

Define callbacks for interrupts

I am working with an STM32 and I am a bit confused about interrupts, specifically the Nested Vectored Interrupts (NVI). As I understand there is a NVI vector (called NVIC) where each interrupt has a ...
7
votes
1answer
4k views

LED blinks even when I don't press the button

I have written a program in Keil that blinks a LED via External GPIO Interrupt. Here is how I have configured it in STM32CubeMX: At first, I enabled and configured RCC as you can see and configured ...
7
votes
3answers
7k views

Error when compiling start-up file on STM32

I am attempting to provide custom interrupt handlers for my Cortex M3 (reference manual here). ST kindly provides a standard library, which has various startup files all called "startup_stm32f2xx.s". ...
7
votes
3answers
11k views

Which ARM MCU family is better for beginners? [closed]

Which ARM MCU family is better for beginners? I mean which family: Is straightforward and easier to learn Has more/better learning and development resources available Has bigger and better ...
7
votes
1answer
7k views

STM32 SRAM to DMA GPIO pins

I wish to transfer a large array of data to 8 output pins that are all on the same port. E.g. a 500 element 8bit array where each bit of each element represents the pin status. So 500 independent ...
7
votes
1answer
21k views

STM32F103 SPI Master example?

I want to use SPI master configuration and send some data just to capture it with Logic Analyzer. It seems that I cannot trigger on clock and capture anything. Using code from standard peripheral ...
7
votes
2answers
2k views

Unable to read file greater than 2K in FatFS

I am reading a file from the SPI Flash with FATFS file system, on STM32F103 platform running FreeRTOS. I can successfully read File of size less the 2048, but if read a file file of size greater than ...
6
votes
3answers
3k views

RX vs TX operation in Software UART

I am short of 1 UART in my MCU. I needed 4 but so far what I have found suitable is an MCU that has 3 UARTs in it, STM32F103. So the 4th one I will have to implement in SW. Each of my individual ...
6
votes
1answer
1k views

How to get rid of shift and logical operations

I am trying to upgrade an old firmware of a 32-bit MCU. The fw has many macros in it which uses various operations eg., logical shift etc. I want to replace these shift and logical operations. An ...
6
votes
2answers
5k views

STM32 RTC freeze when power is off

I am using an STM32F745VGT6 user board with Keil µVision 5. I want to use the internal RTC calendar with the internal clock (LSI). My question is: first power on clock start 02:00:00 then time is ...
6
votes
3answers
2k views

What is the significance of “microcontroller based on microprocessor”?

I am aware about the basic theoretical differences between the two. Like micro controllers have ROM RAM memory etc., but microprocessor has none. But I am still confused. Why is it said "A ...
6
votes
1answer
3k views

STM32F4 : Floating point instructions too slow

I'm working on an audio application on the Nucleo F411RE and I've noticed that my processing was too slow, making the application skip some samples. Looking at my disassembly I figured given the ...
6
votes
2answers
15k views

STM32 DMA: continuous peripheral to memory (array) transfer

I am trying to use a DMA in circular mode to transfer data from an ADC to an array that will hold the data. I need to concurrently use the incoming data (in this case, I am using AT commands to send ...
6
votes
4answers
425 views

Is there a down side to setting the sampling time of a SAR ADC as long as possible?

In configuring the sampling time for the internal ADC of a micro-controller (STM32F446RE) to sample the output of a current sensor connected to a PWM controlled motor, the sampling is triggered at ...
6
votes
1answer
1k views

Inaccurate timer interrupt STM32

I wrote a simple program to toggle an LED on and off using the TIM1 interrupt on an STM32F0 discovery board. CLK Freq = 48MHz Prescalar = 48000 Auto Reload Register = 1000 Using the following ...
6
votes
1answer
3k views

Main Stack Pointer(MSP) vs Process Stack Pointer(PSP)

I was reading the STM32 Programming manual and somewhere on "page 18 " i see these two kind of stack pointers. I always think that there is only ONE stack and therefore only ONE stack pointer to that ...
6
votes
4answers
18k 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, ...
6
votes
1answer
527 views

EEPROM: Same driver for similar chips, different behaviours

I have two very similar eeproms (M24C01-x and M24C64-x), both driven by the same standard library provided for my STM32F2. For the M24C64-x, all is fine. However, the M24C01-x is interpreting the ...
6
votes
1answer
2k views

Why does usb have start of frame packets?

I'm developing some high-speed USB firmware for the STM32F746VG, and on page 1411 (under section 37.16.3, step 2), it tells me that I should enable start of frame interrupts. I know that usb hosts ...
6
votes
1answer
19k views

STM32 Interrupt Priority (preemption) Problems

I have another problem (High resolution system timer in STM32) which I have tracked down (mostly) to this issue, and have created a test case here for the simplest STM32 processor I could find (on the ...
6
votes
1answer
9k 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 ...
6
votes
1answer
205 views

STM32F303: Clock sporadically dies away

The clock of my STM32F303CC (links to datasheet; for reference manual see here) sporadically dies away, resulting in highly decreased code execution speed (see picture below). I already replaced the ...
6
votes
2answers
23k views

STM32 - Problem debugging using openocd and st-link

I am trying to follow this guide "Installing a toolchain for Cortex-M3/STM32 on GNU/Linux" (available: https://www.olimex.com/Products/ARM/ST/STM32-H103/) with the STM32-H103 development board from ...
6
votes
1answer
16k 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 ...
6
votes
1answer
19k views

ARM STM32 simulator like proteous and some good book to start with?

I want to get my hand dirty with ARM programming. I have 8051/PIC16F/PIC18F programing experience. I searched about ARM and find STM32 series cheap. But before buying i want to get handy with it via ...
6
votes
1answer
9k views

USB interface with STM32

I'm experimenting with native USB in STM32. I've not found any "step by step", or a little more well structured tutorial, how to implement CDC or mass storage for example. I've found some examples, ...
6
votes
4answers
2k views

Best practice for implemeting bare metal or lightweight OS flash file system?

I am looking at flash devices that are available for rewriteable data storage, and it's clear that they need either some sort of translation layer for an overlying file system (such as FAT) or a ...
6
votes
1answer
3k views

STM32 Semihosting - SIGTRAP received when printf called

Have followed this guide here (http://www.wolinlabs.com/blog/stm32f4.semihosting.html) to get semihosting on the STM32F103 working. Basically my goal is to get printf working over JTAG (ST-Link/v2). ...
6
votes
2answers
3k views

Overwrote STM32F4 ST-Link pins

I overwrote by mistake ST-Link programming pins PA13 and PA14. Now I cannot reprogram my chip. How could I fix the problem? Datasheet
6
votes
1answer
1k views

why trace_printf(“%f”,x); triggers a HARD FAULT on a stm32 MCU?

I'm using a stm32 F413ZH microncontroller with HAL libraries (mainly written to be used with c but can also be used with c++) in eclipse, actually I managed to completely configure eclipse including ...
6
votes
1answer
3k views

How to put “printf” on console Debug QEMU on Eclipse STM32F4

I create a blinky project to test a qemu simulator, but my printf`s not showing in the debug console. I create a project like official tutorial GNU MCU Eclipse. ...
6
votes
1answer
1k views

What is relation between ARM libraries

What is relation between CMSIS libs released by ARM.com, libraries provided by manufacture and GCC ARM libraries ? What is the exact purpose of each? Which of them Should I use?
6
votes
2answers
481 views

Detecting DMA overflow in arbitrary waveform generation

I'm generating a complex series of pulses on an STM32F103, essentially as described in the ST app note AN4776 General-purpose timer cookbook, section 5.3. As a quick summary, that means I'm using the ...
6
votes
1answer
4k views

USB CDC-ACM Class Driver on STM32F4 [closed]

Simply my project is to connect a Huawi USB modem to my STM32F407 Discovery board, and start using AT commands to send text SMS. so here is what I've and what I want :) I've OTG USB capability on my ...

1 2
3
4 5
61