Questions tagged [stm32f4]

Anything related to the STM32F4 series of microcontrollers. STM32F4 is a series of high-performance MCUs with DSP (Digital Signal Processor) and FPU (Floating Point Unit) instructions.

Anything related to the STM32F4 series of microcontrollers. STM32F4 is a series of high-performance MCUs with DSP (Digital Signal Processor) and FPU (Floating Point Unit) instructions.

See STM32F4 series page on ST website.

360 questions
47
votes
5 answers

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 are 3 main libraries you can use to make your life…
John
  • 1,361
  • 2
  • 12
  • 23
33
votes
7 answers

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 in stdio.h that the printf prototype is defined…
user505160
  • 1,010
  • 5
  • 16
  • 26
25
votes
3 answers

STM32F4 and HAL

So I've been experimenting a while with the STM32F407 (I'm new to ARM) and decided to write a simple app using the HAL libraries since it seems ST has discontinued the Standard Peripherals Libraries. So my question is, what is the point in HAL?…
John
  • 1,361
  • 2
  • 12
  • 23
17
votes
3 answers

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.
John
  • 1,361
  • 2
  • 12
  • 23
14
votes
4 answers

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 set. I am using STM32f429I Discovery board,…
ScienceSamovar
  • 1,206
  • 3
  • 20
  • 39
13
votes
1 answer

STM32 "USB Device" vs. "USB OTG HS" - what is the difference?

I recently downloaded the stm32 app for MCU search and found out that for example STM32F429 has "NO" in "USB Device" peripheral, while it says "YES" in "USB OTG FS" and "USB OTG HS". Which is quite surprising since STM32F429 is fully functional as…
ScienceSamovar
  • 1,206
  • 3
  • 20
  • 39
9
votes
2 answers

STM32F4 Cube HAL UART. Is it a bug or am I missing something?

I am using interrupt based UART IO (no DMA). HAL_UART_Transmit_IT function sets EIE bit in CR3 register. According to STM32F407 datasheet (and real behaviour), this generates interrupt only in multi buffer mode (when DMAR bit is set). EIE enables…
rublag
  • 131
  • 1
  • 1
  • 7
9
votes
2 answers

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 to the board ?
maddouri
  • 211
  • 1
  • 2
  • 8
8
votes
7 answers

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: /* TIM3 init function */ void MX_TIM3_Init(void) { …
oboist B
  • 83
  • 1
  • 1
  • 7
8
votes
1 answer

STM32F4 boot concepts and vector table relocation

There are some things I don't understand on the boot process of the STM32F4 microcontroller. My understanding is as follows: The ARM Cortex-M4 boots expects the stack pointer initialization value and the interrupt vectors on 0x00000000 + SCB->VTOR,…
Multisync
  • 215
  • 1
  • 2
  • 7
7
votes
3 answers

Why isn't there any EEPROM in STM32F4 MCUs?

Why isn't there any EEPROM in the STM32F4 series MCUs? Mostly I have Microchip MCUs and they have EEPROM available in them, but I just found out that it is not available in the STM32F4 MCUs... And it looks like not in other families as 'F0, F1, F2…
scico111
  • 857
  • 16
  • 39
7
votes
6 answers

Noisy signals with 2-layer PCB - What's wrong with my design?

For my master's thesis in computer science, I need to read out a TCD1304AP linear CCD sensor. A STM32 microcontroller with the circuit laid out on a breadboard gets the job done, but in order to make my project more portable, I designed and ordered…
christianPro
  • 73
  • 1
  • 5
7
votes
9 answers

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 a wall adapter or high without any communication…
David
  • 165
  • 1
  • 1
  • 6
7
votes
1 answer

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 on the pcb via a standard 30 Watts soldering iron…
ceremcem
  • 1,386
  • 17
  • 35
6
votes
4 answers

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 100kHz and I have a window of between 3 and 225 ADC…
norlesh
  • 475
  • 5
  • 14
1
2 3
23 24