Questions tagged [stm32f4]

STM32 F4 controllers are entry-level ARM Cortex-M4 MCUs from ST Microelectronics.

The STM32F4xx series is an ARM Cortex-M4 based 32-bit microcontroller. Its datasheet can be found here.

533 questions
28
votes
4 answers

What are weak functions and what are their uses? I am using a stm32f429 micro controller

Wikipedia says: A weak symbol denotes a specially annotated symbol during linking of Executable and Linkable Format (ELF) object files. By default, without any annotation, a symbol in an object file is strong. During linking, a strong symbol…
Munir Ahmad
  • 391
  • 1
  • 3
  • 5
9
votes
4 answers

"No ST-LINK detected" error message, when trying to connect with ST-LINK Utility

I have a NUCLEO-F401RE board (with STM32F401RE) and it has been working fine for the most part. Here recently, I followed a tutorial in the book "Mastering STM32" where it says to install OpenOCD. I had been following along before this as well,…
Kbonde
  • 91
  • 1
  • 1
  • 4
9
votes
2 answers

How to write/read to FLASH on STM32F4, Cortex M4

I want to write a variable, for example an integer with the number 5 to the FLASH and then after the power goes away and the device is turned on again read it. I already know that in order to write something I first need to erase the page and then…
Alex M.
  • 351
  • 2
  • 5
  • 12
8
votes
3 answers

STM32F4 Timers - Calculation of Period and Prescale, to generate 1 ms delay

I am using STM32F407VGT6 with CubeMX. So I was beginning with general-purpose timers and I am stuck with prescale and period values. Basically I want to generate a timer interrupt every n(where n=1,2,3..) ms and perform some tasks. There is lot of…
Ehsan Habib
  • 135
  • 1
  • 5
  • 12
7
votes
4 answers

How to change the UART baud rate after running on STM32 board?

I'm using STM32F746ZG and use five UARTs. All UARTs are working fine. Can someone tell me the procedure to change the baud rate on the USART once it has already been initialized? I'm using USART6 and initialized with 9600 baud rate. After booting,…
Hans
  • 398
  • 2
  • 4
  • 14
6
votes
1 answer

How to write to STM32 Flash

I want to write to flash Sector 11 of STM32F407VGT from my user code to store some data. I have used the stm32f4xx_hal_flash.c library. I first erase the sector using this code: void Flash_Init(void) { FLASH_EraseInitTypeDef…
b7031719
  • 120
  • 1
  • 2
  • 8
6
votes
2 answers

Running Linux 4.9 on Cortex-M4 STM32F4 (29I-DISC1)

I spend a few days trying to understand but I'm stuck. I get no more than a "Starting kernel..." message after entering 'bootm 8100000' on my STM32F429I-DISC1 board. Before I update uboot from 2011 to 2016 It was a "Starting Kernel..." + UNHANDED…
svalsesia
  • 303
  • 2
  • 13
5
votes
2 answers

Interfacing TFT screen with STM32F446 using display bus interface

I'm trying to understand how to interface a TFT screen module with an STM32F4 chip on a custom PCB. Here is the module and its basic info. To write commands and data to the screen, the ILI9481 driver on the screen module uses the Display Bus…
5
votes
2 answers

DMA to Flash for STM32

I am using an stm32f40x microcontroller (UC), and I have to use its internal flash to store some data. The write operation, as you know, is very slow and occupies the UC for very long time. So I thought to DMA and here is the question: Is it…
gior91
  • 1,745
  • 1
  • 16
  • 19
5
votes
3 answers

Intentional receive complete UART DMA interrupt after specified timeout

I have configured a UART to receive in DMA mode where the size of the buffer is around 64 bytes. So, basically, the HAL_UART_RxCpltCallback() DMA receive complete interrupt will only fire when 64 chars are received. Is there a way in STM32 through…
Akay
  • 1,092
  • 12
  • 32
5
votes
1 answer

STM32 Position Independent binaries

I'm compiling my FreeRTOS application for Cortex-M4 (STM32F4) with following CFLAGS: -fpic -msingle-pic-base -mpic-data-is-text-relative -mpic-register=r10 and with -fpic flag set for linker. Vector table is properly copied to RAM with changed…
VIPPER
  • 326
  • 4
  • 24
5
votes
1 answer

How do I use the STM32CUBEF4 HAL library to read out the sensor data with i2c?

I want to use the latest HAL library instead of Standard Peripheral Library. And i want to readout the BMA250E G-sensor's chip_id, but it doesn't work. Value of aRxBuffer always keep at 0x00. But it should be 0xf9! What's wrong in my…
elecbuggy
  • 63
  • 1
  • 1
  • 5
4
votes
2 answers

STM32F4 UART half word addressing

Trying to roll my own code for STM32F4 UART. A peculiarity of this chip is that if you use byte addressing as the GNAT compiler does when setting a single bit, the corresponding bit in the other byte of the half word is set. The data sheet says use…
4
votes
1 answer

Implementing a single press, long press and a double press function in HAL for STM32

I'm trying to implement a single press, double press and long press function to perform different functions. So far I've understood the logic for a single press and long press but I cant figure out how to detect a double press. As for the code, I've…
Joshua John
  • 55
  • 1
  • 7
4
votes
3 answers

How reliable is DMA to GPIO on STM32 MCUs?

ST has some application notes that talk about emulating a parallel bus using DMA to GPIO. I appreciate that, but it doesn't answer important questions. I am looking through the reference manual, and I can't seem to find clarify the things that I am…
Sven
  • 1,364
  • 2
  • 17
  • 19
1
2 3
35 36