Questions tagged [stm32f4-discovery]
63 questions
12
votes
3 answers
STM32F4 How are Preemption Priorities and Sub-Priorities used?
I have started working with ARM-based microcontrollers.
I not understand subpriority and preeemptionpriority. For example:
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x00;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x01;
Why…

ziyad
- 121
- 1
- 1
- 3
5
votes
2 answers
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 debugging it gives HAL_DMA_ERROR_NO_XFER error during HAL_DMA_Abort function. I suspect it…

ScienceSamovar
- 1,206
- 3
- 20
- 39
5
votes
2 answers
DMA triggered by Timer using STM32F4-Discovery board
I am trying to trigger the DMA peripheral by the Timer using STM32F4-Discovery board, but it doesn't seem to work.
I want to get the value of a port (Port C) every 5 ms and save the value in memory at certain address. When the timer (TIM5) overflows…

DragonflyN
- 51
- 1
- 5
4
votes
3 answers
How to read from multiple channels of the ADC on an STM32F407?
I am working on a project wherein, I need to read the Analog outputs from 4 sources and convert them to a digital value using a single ADC module on the STM32F407 microcontroller. I want to sample the ADC values every 50ms and therefore have decided…

Shubham Rastogi
- 41
- 1
- 1
- 2
4
votes
2 answers
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/v2 manual:
PIN1 (VAPP) -> VDD
PIN7 …

StjepanV
- 255
- 2
- 4
- 14
3
votes
1 answer
how to enable FPU in cubemx
For STM32F407 Discovery board how do I enable its FPU from CubeMX?
The following instruction is used in handwritten code. How can I get it generated from CubeMX?
// Enable FPU
SCB->CPACR |= 0xf00000;

ajeebx
- 165
- 1
- 8
3
votes
2 answers
STM32F4 ADC: Dual interleaved + Independent
Some STM32F4 microcontrollers have 3 ADCs on board, they can be configured in various modes.
I wonder is it possible to configure ADC1 and ADC2 in "Dual interleaved" mode, but have ADC3 configured as independent channel?
When generating project in…

ScienceSamovar
- 1,206
- 3
- 20
- 39
3
votes
2 answers
Read big file from sd card with fatfs
I'm using the STM32F4DISCOVERY board and I am trying to read a file from a micro SD card, and treat the data. I'm using the following functions
int main(void)
{
int i = 0;
HAL_Init();
/* Configure the system clock */
…

Armand Chocron
- 51
- 1
- 5
3
votes
1 answer
Can´t erase data from flash memory (STM32)
I´m trying to save some data to flash memory on my STM32F407 board. Before I can save them, I need to erase a memory sector. I chose 16 Kbytes Sector1 starting with address 0x08004000 and chose Voltage range 2.1-2.7 V. I'm using HAL library.
Program…

Jardo421
- 71
- 1
- 8
2
votes
1 answer
STM32F429I Discovery board - unable to do printf() redirection using SWV/ITM
I am an STM32 newcomer. I recently got an STM32F429 Discovery dev board which I have been playing around with. Currently I'm trying to figure out how to use the debugging functions of this M4 Cortex, specifically the SWV ones.
I used STM32CubeMX…

Blargian
- 829
- 2
- 9
- 27
2
votes
2 answers
How to configure STM32F4s TIM1 and 8 for PWM
I have configured timer 4 for PWM with following code and connected LED to the configured pin. It is working.
TIM_TimeBaseInitTypeDef TIM_BaseStruct;
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM4, ENABLE); // Enable bus…

Terraviper-5
- 191
- 3
- 14
2
votes
2 answers
Powering MCU from both USB or Battery
I am developing a board that will need both USB and battery power options, non switched. I put this schematic together that I think is right, but I want to make sure I'm not going to blow the chip. I'm using an STM32F405 100 pin.
The nets in the…

TyrantUT
- 31
- 5
2
votes
4 answers
STM32 Audio class USB not recognized as audio device
I'm learning about USB classes using STM32F429ZI(on Discovery board). I already tried to implement Communications device class (CDC) and it worked well, now I tried to do some simple test with Audio Device Class.
I am using CubeMX to generate…

ScienceSamovar
- 1,206
- 3
- 20
- 39
1
vote
3 answers
How to generate NACK on STM32F407
Is there a way to send a NACK on I2C on STM32F407? There is no way to do that using the HAL, and the datasheet says nothing about it.

andreahmed
- 23
- 7
1
vote
0 answers
I2C get stuck on busy with DMA interrupt
I'm trying to interface with NXP device using I2C.
I'm initializing it that way
/* I2C3 init function */
static void MX_I2C3_Init(void)
{
hi2c3.Instance = I2C3;
hi2c3.Init.ClockSpeed = 100000;
hi2c3.Init.DutyCycle = I2C_DUTYCYCLE_2;
…

andreahmed
- 23
- 7