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
2answers
18k views

How to Use an External ST-Link/V2 with the STM32F4 Discovery Board

I have a STM32F4 Discovery board and a ST-Link/V2 programmer. I want to use my own ST-Link (not the embedded one) for programming and debugging the board. How should I connect the external ST-Link ...
34
votes
2answers
51k views

STM32 Understanding GPIO Settings

In STM32 Standard Peripheral library, we need to configure the GPIO. But there are 3 functions which I not sure how to configure them; GPIO_InitStructure.GPIO_Speed GPIO_InitStructure.GPIO_OType ...
14
votes
2answers
46k views

How to use external ST-Link to debug/program STM32F103 MCU?

I'm using STM32F103 MCU for my own project and want to use the ST-Link of STM32F411 Nucleo board for external debugging / programming purposes. I've set the CN2 jumpers OFF and my actual question is ...
5
votes
4answers
8k 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 ...
8
votes
7answers
60k views

STM32 & ST-LINK - Cannot connect to MCU after successful programming

I have built my own board with STM32F7-45VGT6. I have successfully programmed it with ST-LINK v2 (not the original one though) and now I cannot even connect with MCU. I use ST-Link Utility from ST ...
13
votes
3answers
9k views

Recommendation for default settings for unused pins on an STM32 (ARM Cortex M3) - pull up/pull down?

We are currently using various variants of the STM32 microcontroller family. I would like to know the following: 1) What are the recommended default settings for pins of the microcontrollers in ...
3
votes
2answers
18k views

Problems connecting ST-Link V2 and STM32F4 discovery board

I'm unable to connect to my STM32F4Discovery board using an ST-Link/v2. I've removed jumpers from CN3, connected the cables correctly but the utility tool won't detect anything... Using the ST-Link/...
2
votes
3answers
4k views

Implementing a low cost battery backup circuit for internal RTC in STM32F030R8

Extension of this question. Datasheet: http://www.st.com/resource/en/datasheet/stm32f030f4.pdf The micro-controller in question has an internal RTC module but no VBAT pin. As such, the only way RTC ...
2
votes
5answers
5k views

STM32 HAL_CAN_Transmit always returns TIMEOUT (HAL_CAN_STATE_TIMEOUT)

Setup I am using an STM32F103C8T6 (aka Blue Pill). With the STM32Cube I set CAN_RX to PB8 and CAN_TX9 to PB9 (these are defaults/nonchangeable). Circuit simulate this circuit – Schematic ...
4
votes
2answers
16k 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 ...
2
votes
4answers
18k views

How to use timers in STM32 board and HAL library in order to measure speed of motor?

I need to measure the speed of a rotating motor fitted to an encoder disc with 20 slots. The LM393 based sensor is kept at the right place, so that encoder disc rotates in between the sensing part. I ...
0
votes
2answers
417 views

SPWM vs 6-step PWM vs SVMPWM

While learning 3-Phase scalar control of ACIM using STM32F407 MCU I could not clearly understand the diffrence between the following terms: 1. SPWM 2. 6-step PWM 3. SVMPWM How do they differ from ...
28
votes
4answers
34k views

CMSIS vs HAL vs Standard Peripherals Library

So I'm switching from PICs to ARM and I bought an STM32F4 discovery board. So far I understand that to program it you can either access all registers directly in memory (obvious way) and also there ...
2
votes
5answers
6k views

I2C busy flag strange behaviour

I've been using STMCUBE combined with Keil for some time now. For most part I like the HAL library and the documentation for STM32f1xx drivers is quite good. I'm doing a project where I am using ...
18
votes
1answer
28k views

Stm32 Event and interrupts

I started studying interrupts on stm32 specifically the stm32f4 discovery board. i found this example in which you have to press the button to start the interrupt and push it again to stop it. In ...
5
votes
5answers
24k 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 ...
8
votes
1answer
957 views

What's mean these microcontroller pin input/output modes?

I bought an stm32f103ret6. When I saw the reference manual, I saw that it has several I/O modes. For input: floating, pull-up, pull-down For output: analog, open-drain, push-pull I have already ...
2
votes
2answers
2k views

STM32 custom board

I want to make a custom board from STM32F4. Suppose I follow schematics with the minimum required components, like crystal, reset switch, voltage regulator, JTAG connection, etc. and assemble them on ...
4
votes
2answers
367 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 ...
3
votes
2answers
2k views

Understanding the the setup of a Timer on an STM32F10x

I'm trying to understand how to correctly setup the timer on an STM32F10x. The board is running with an external crystal of 16 MHz, and I'm using the PLL: ...
2
votes
2answers
687 views

Timer1 remap cause debug crash on STM32F103

I build a Keil project for my STM32F103 MCU with STM32CubeMx. My goal is use the TIM1 channel 2 for control a Buzzer. I want to generate a PWM at 4KHz through TIM1 channel 2. I configured, with ...
1
vote
1answer
272 views

STM32F4 USART Receiver Pin Configuring

I am trying to configure STM32F4 USART peripheral. I thought that USART Receiver pin(RX) must be programmed as Alternate function to USART works correctly and then the data is present on the I/O pin ...
1
vote
1answer
529 views

ILI9341 with STM32 SPI troubles

I am trying to interface with an SPI ILI9341 screen using an STM32 microcontroller. I know there are a whole lot of things that can go wrong with these interfaces, and I've spent an awful lot of time ...
4
votes
1answer
2k views

USB termination on STM32F437xx

I'm about to layout the USB connection on our boards and wondering whether the termination resistors and pull-up on D+ are necessary when using the STM32F437xx. The datasheet tells: ...
3
votes
1answer
6k views

Driving a LED with an open drain digital output

I need to drive an LED from an STM32F217ZG. So I was thinking about a classic circuit with a BJT. But then I saw that GPIO outputs of the microcontroller are configurable as open drain. Would this ...
2
votes
1answer
397 views

I2C bus occupied

I have a problem with an I2C communication and want you to ask whether there is a better solution than mine. I am programming an STM32F103 at the moment. There is one sensor (MPU6050) which is ...
1
vote
1answer
1k views

Using STM32 to transfer a file via bluetooth

So far I have been doing projects with Arduino, RPi, ATtiny etc. But now I have project in mind where these things doesnt seem to suit. I need your help. OK, now on the project: I have a file on my ...
1
vote
0answers
182 views

STM32F4 OC Clock Jitter

I am using STM32CubeMX to configure an STM32F4 to output a clock signal using Timer 3, Channel 4 on PC9. I have read in the datasheet PLL section that jitter shouldn't be more than 15ps RMS but I am ...
0
votes
1answer
1k views

STM32: Manchester coding bit banging implementation problem

I want to use Manchester Coding for my DALI Master-slave project. I am using two boards for this project, one is STM32E407 and the other is STM32F3Discovery. As an initial step, I want to test for ...
0
votes
1answer
192 views

Looking for STM32F4 Vdd 5V

I have to replace Renasas M30853 MCU with STM32F407 MCU in a circuit. The earlier MCU uses power supply Vdd = +5V as well as all the analog and digital circuit that is connected with it. How can I use ...
0
votes
5answers
354 views

Output impedance of STM32H743 MCU?

How do I find the output impedance of the STM32H743 (and potentially other similar devices)? I've looked through the datasheet (DS12110 Rev 5) and the reference manual (RM0433 Rev 5) however haven't ...
0
votes
0answers
79 views

FSMC on STM32F407VGT6

I would like to know the maximum size of an external SRAM supported on STM32F407VGT6 via FMSC. Is it related to addresses? According to the datasheet and the picture .. Is That mean that I can ...
0
votes
1answer
35 views

What pins on a nRF51822 do I connect to a STM32 programmer?

I want to be able to program a nRF51822 with this programmer but I'm not sure what pins on the actual chip I should use, and all the guides seemed to be using a different chip
13
votes
3answers
7k views

Minimal code required to startup a STM32F4?

Which is the most efficient way/minimal code required to startup a STM32F4? The startup files that come from ST seem to have a lot of unnecessary code.
24
votes
8answers
30k views

How do I develop for STM32 discovery on Linux? [closed]

I have an STM32 discovery board and would like to be able to program it on Linux. What is the easiest way to do this?
16
votes
2answers
17k views

STM32F2: Makefile, linker script and start-up file combination without commercial IDE

I have been working with an STM32F2 (specifically, the STM32F217IGH6 on a development board) for about two months. By far my biggest problem had to do with the "setup", which includes makefile, linker ...
10
votes
1answer
20k views

How to start with STM32F103C8T6 board?

I have been using an 8-bit AVR MCUs to build line-follower robots with students for a few years now. Now I would like to step up to an ARM Cortex-M3 because I'd like to add some more CPU-intensive ...
16
votes
4answers
46k views

How do I use the printf function on STM32?

I am trying to figure out how to use the printf function to print to the serial port. My current setup is STM32CubeMX generated code and SystemWorkbench32 with the STM32F407 discovery board. I see ...
7
votes
2answers
8k views

Move embedded programming from Keil to Linux

I'm currently using Keil to develop for an STM32 discovery board. My project is close to finished, and I'd like to move to a Linux based building environment. I've been using the preconfigured ...
17
votes
2answers
4k views

Why does ST recommend 100 nF decoupling capacitors for a 72 MHz MCU? (And not 10 nF.)

I've been reading about decoupling capacitors, and I can't seem to understand why ST recommends 100 nF decoupling capacitors on a 72 MHz ARM microcontroller. Usually 100 nF decoupling ...
7
votes
4answers
1k views

Creating programmable look up table on STM32

I am trying to define a look up table that is not a constant on an STM32F103. Basically I want to have a page of flash that acts like a constant lookup table in normal operation, but every once in a ...
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 ...
2
votes
1answer
9k views

TLP280-4 Optocoupler on 12/24V inputs

There is a STM32 device which has to detect several signals from other devices. The voltage of these signals can be 12V or 24V. Also these signals can be positive (i.e. 12/24V) or negative (connected ...
8
votes
4answers
13k views

ST-LINK is serial communication possible?

I am using STM32F4 discovery board and Atollic TrueStudio for ARM Lite 3 I would like to pass some debugging data to PC using printf and I can't find a way to do it through STLink. Is it even ...
7
votes
7answers
54k views

Getting PWM to work on STM32F4 using ST's HAL libraries

I'm trying to switch to the ST HAL libraries and can't seem to get the PWM to work. Compiles fine, just doesn't start. In my main() I call the Timer initialization function: ...
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 ...
4
votes
1answer
13k views

Why use STM32 HSE?

Why do we use an external oscillator for STM32??? Why not just use the microchip oscillator? I am using STM32F2xx it clocks at 120Mhz But, an external oscillator of 12Mhz is latch into the microchip,...
3
votes
3answers
13k views

High resolution system timer in STM32

I have some software running on an STM32F103 (I'd also like to be able to use the F4) where I'd like to be able to 'timestamp' events (such as interrupts on external pins) to the nearest microsecond (...
1
vote
1answer
3k views

STM32 prototype unable to connect to PC using ST-Link/V2 SWD

Circuit Diagram Background & What I have tried. I have wired wrapped this setup myself using a fresh STM32F411RC MCU from digikey (on a proto-advantage LQFP-64 to DIP-64 breakout board). I've ...
9
votes
4answers
46k views

STM32 ADC conversion using HAL

I am trying to learn how to use "new" HAL library from stm32. When I try to do simple ADC conversion it works just one time, but then it stops converting. I suppose End of conversion flag does not get ...