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
0
votes
0answers
67 views

STM32 SDIO FATFS

I'm using SDIO (1-bit mode) with an STM32F429 Discovery board to read from and write to an SD card. The code below works, I've seen that it does, the problem is it seems to randomly choose when to ...
0
votes
1answer
68 views

FreeRTOS crashing when adding new queues

I am new to FreeRTOS At the beginning I created 3 queues and everything worked fine. Until I needed a new 4th and 5th queue. When ever I initialize the queues with ...
2
votes
3answers
244 views

ADC Calibration - Vdd calculation

In documents and lots of online sources there is a formula as follows, $$ Vdd = 3.3V * \frac{VREFINT_{CAL}}{VREFINT_{DATA}}$$ But I cannot get why CAL value is in the numerator and RAW data is in ...
3
votes
0answers
56 views

Hard fault on only one of two identical STM32F405 boards

So I've made two prototypes of a new custom board with a STM32F405RG microcontroller at heart and while one of them works totally fine, after a few seconds or more I'm getting a hard fault on the ...
2
votes
2answers
79 views

Crystal's datasheet give load capacitance is 20pF, do I need external load capacitors?

I use external crystal for HSE of STM32F0. I plan to use 8MHz Cylinder Crystals. Datasheet of this crystal below Datasheet give crystal load capacitance is 20pF My questions: 1/ Do I need to add 2 ...
1
vote
1answer
36 views

What is the difference between Periodic and Non-Periodic Tx/Rx FIFO in USB?

I am trying to understand how the USB module works in the very low level on STM32F4 MCUs (ARM Cortex-M4 core). In the reference manual I read often the terms Periodic and Non-Periodic Rx/Tx FIFO (I am ...
0
votes
2answers
63 views

Programming STM32 Black Pill with ST-LINK/V2 dongle

So I recently bought the STM32F103C8T6 "black pill" dev board along with the ST-LINK/V2 dongle (more probably a Chinese clone). After much struggling I figured out that I need to hold down the dev ...
4
votes
3answers
281 views

What is actually sent/loaded to a microcontroller / STM32?

I see in all tutorials or sources, everybody creates a project in some IDEs and then loads code to the MCU again via those IDEs. What is sent to the MCU? Is it a sequence of binary numbers or some ...
0
votes
3answers
97 views

Sinusoidal wave output from a GPIO

I think the question is not particularly MCU/board specified but I will be trying it on STM32F4-DISC board. I was thinking of how to output a nice sinewave from a normal GPIO output pin, but I was ...
0
votes
0answers
54 views

stm32 HardFault in keil

a few hours ago , i created C++ project in keil i wrote my code and next i download in to my board. when i went debug it , code directly get to HardFault exception ...
0
votes
2answers
74 views

How to configure PWM on STM32F429I-Discovery Board

Currently I have some difficulties on the Discovery Board STM32F429I to control the on-board LEDs via PWM. According to the data sheet of the Discovery Board the LEDs are located on pin 13 and pin 14 (...
1
vote
1answer
66 views

UART receive detection

I am working with UART and I want to do something but could not achieve myself. I want to enter an interrupt when the data receive stops, i.e when I unplug the cable, do something only once and then ...
1
vote
1answer
29 views

Is Compare Pulse sooner than OC1REF in STM32 Advanced Timer output trigger

The options for trigger output signals seem not very well documented. According to the datasheet (P509, here) they include: Compare Pulse - The trigger output send a positive pulse when the CC1IF ...
0
votes
0answers
47 views

Gathering accelerometer data over I2C not updating every 1 ms

I am using an STM microchip to communicate with an IMU over I2C. I am requesting 3 axis of acceleration information from the IMU (x,y,z). I have the ODR Selection frequency set at 1.66 kHz. Currently ...
0
votes
2answers
42 views

STM32L0 IWDG > 32s

I need to implement a feature similar to that provided by the IWDG on the STM32L073RZ. The issue I'm facing is that the maximum timeout value of the IWDG is ~ 32 seconds - I need something that can ...
1
vote
2answers
125 views

Writing commands to a microcontroller with a STM32f chip from python

Manual to the micro controller: https://drive.google.com/file/d/0B8PmY6nhQadKSVc5OE04c3ZJaFU/view?usp=sharing , where page 18-19 introduces the serial communication protocol. The micro controller on ...
0
votes
1answer
61 views

STM32F4 input capture

How can get input capture values from STM32F4 for measuring the duty cycles of the four different signal? Here is one channel code: ...
0
votes
1answer
81 views

What's the difference between SAI and I2S?

I'm developing a USB audio device using an STM32F407G-DISC1 evaluation board. For the audio output I was intending to just use the I2S peripheral connected to a DAC. However the only sample code I ...
1
vote
0answers
56 views

STM32 ADC & HAL - EOC selection for polling continiously

I will ask my question via linking some other question asked by someone. S/he got his/her answer on how to solve, but I am more interested on WHY? Thanks in advance. Link to the question: STM32 ADC ...
1
vote
1answer
48 views

Logic high preventing sleep mode STM32?

I have a fairly simple question that I can't find the answer to in the datasheet or reference manual for an STM32L073RZ. Put simply: is there a mechanism within the processor that prevents entering ...
2
votes
1answer
40 views

STM32F411VE Custom bootloader USB de-Init issue causing Jump to app fail

I'm developing a custom a bootloader on STM32F411VE MCU which must download a .bin file from USB key and flash it into the application sectors of flash memory. Following the examples provided with ...
2
votes
3answers
222 views

Serial communication between STM32F4 and PC -USART-

The question I will ask now is not about how to solve something, I am currently able to make the connection as it will be mentioned below, but my problem is I really did not understand WHY ? Thanks in ...
1
vote
1answer
143 views

Put saved data in flash of STM32 at the end of all other sections

I want to emulate EEPROM over flash of STM32F103. Is there a way to use all free flash instead of the only page? How can I initialize starting point of my EEPROM emulation so that it would be after ...
3
votes
2answers
69 views

CAN bus TX failing in a strange way

I have been trying to pass CAN frames between two different CAN busses using two different CAN channels on a STM32F746 MCU. The system always fails and freezes up in TX when it is supposed to be ...
0
votes
1answer
35 views

Where does STM32CubeMX generate AF GPIO initialization?

i was wondering where does CubeMX (when you export it to an IDE such as Atollic) generate GPIO initialization for alternate functions such as Timer capture pins, UART pin ect. (we are talking about ...
0
votes
2answers
61 views

Custom bootloader passing control to application code in STM32

I am trying to understand that if for STM32F405 MCU a custom bootloader is used on the MCU then each of the two projects for the custom bootloader and the application code will have their own 'startup....
0
votes
1answer
41 views

STM32CubeMX not showing the resolution in ADC

I am trying to use ADC in stm32f103 micro-controller. I use STM32CubeMX to configure the ADC. Based on the videos I gave seen on YouTube, I must be able to configure the resolution of the ADC (8, 12 ...
0
votes
0answers
47 views

Error executing Application from BootLoader in STM32L475 (IoT Board)

The bootloader should jump to the Application after some verification. For now lets assume it straightaway jumps there. I am working on B-L475E-IOT01A2 device, which uses ARM M4 Cortex. I am using ...
0
votes
1answer
52 views

STM32F4 host powering USB device using VBUS

I am trying to design an STM32F411 USB host. I will be connecting it to a USB MIDI device. The USB MIDI device I am using is AKAI Professional MPK Mini MKII which only has 1 USB port both for power ...
1
vote
2answers
86 views

Which flash sector to write into?

I need to save working configuration of my embedded application to the flash memory. I am using STM32f746 uController. According to the datasheet. There is 8 sectors on the main block of the flash ...
0
votes
2answers
55 views

How to upgrade StdPeriph drivers for STM32F103 project [closed]

I have an old project which is built on using "StdPeriph drivers" for STM32F103 MCU and Keil environment. It uses various drivers for gpio, adc, can, dac, dma, i2c, spi, tim, uart etc. As these ...
1
vote
0answers
47 views

Battery Monitoring IC communication via SPI

I am trying to use Max14921(Battery monitoring system) to measure voltages of 16 cells of a battery pack. I have used stm32f103c8t6 as mcu. The problem is that I could never communicate with IC. I ...
0
votes
1answer
45 views

I2C in STM32F103 longer data

I am trying to use PCA9539 as an IOexpander for my project. I have a STM32F103 connected to PCA9539 via I2C. The problem I have is to write into PCA9539. Based on the datasheet I should to send (1) ...
0
votes
1answer
33 views

STM32F0, DRV8840 and GPIO Problems

Today I tested a DC driver with a STM32 MCU. The schematic is like this: I have a problem with the ENABLE Signal between the DRV8840 and the MCU. When the DC Motor is disconnected, I toggle the EN ...
0
votes
1answer
78 views

Does Hall flow sensor require an optocoupler when using STM32 MCU?

I'm using an STM32F103 to measure water flow through a pipe using Hall flow sensors. My power supply is 12V DC to 5V/3.3V DC. STM works with 3.3V and Hall sensors with 5V levels. I've configured the ...
27
votes
8answers
5k views

Why do we need a bootloader separate from our application program in microcontrollers?

Why do we need a separate program in the same flash program memory of a microcontroller, specifically STM32F103, which is called a bootloader? What is special about it to keep it separate from the ...
1
vote
2answers
112 views

STM32F4 Discovery board only works in DEBUG mode

I generated my project with STMCUBEMX with CAN, SPI, I2C peripherals and did some coding on top of it. Code basicly polls the CANBUS, stores data to some IC over i2c and sends the processed data to ...
1
vote
2answers
100 views

STM32 (SWD) printf not working

I'm new using STM32 microcontrollers, I have been trying to use the printf tracing in my code without success, anything is printed on the console. I can start a debug session, I can place breakpoints ...
2
votes
1answer
39 views

STM32F4 Discovery Board Control Register Value Problem

In Atollic TrueSTUDIO I open an empty project without any settings. ...
-1
votes
1answer
43 views

STM32F7_Discovery_Boards Digital Pin

Do any of the pins on CN9 or CN13 on the STM32F7 Discovery Board have a constant 3.3 or 5V output?
0
votes
3answers
59 views

STM32F7 NVIC INQUIRY

I'm trying to connect the NVIC interrupt to handle a keyboard, nonetheless I'm having troubles becuase two keys are connected to the line0, which use the EXTI0_IRQHandler, I saw in the stm official ...
0
votes
1answer
36 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
0
votes
1answer
79 views

ST-LINK Version 2 on Arch Linux not working

IMAGE LINK: https://ibb.co/yfFvwQP I am using Arch Linux as my main os. I have just started embedded dev and am setting up my env. I am having an error connecting to my St Link V2 debugger as shown ...
2
votes
2answers
66 views

Isolated CAN transceivers as a CAN bus extender

I am designing a system to 'hack' into a CAN bus. My first idea was to split the target CAN bus, terminating both ends into isolated CAN transceivers, and use a MCU to pass packets between the buses ...
-1
votes
2answers
130 views

STM32F4 series: what does the '->' operator? [closed]

Reading some C files related to programming an STM32F4 series Arm controller, I found the following instruction: ...
3
votes
2answers
84 views

How to solve Keil compiler 'Error: L6218E: Undefined symbol' on STM32

I am trying to run a simple tutorial (external interrupt example) on my NUCLEO-F746ZG board. I use STM32CubeMx software version 5.2.0 and Keil software version 5.28.0.0 as compiler. I get the ...
0
votes
0answers
64 views

stm32 audio generation

Currently I am working on a project with a stm32f302c8t6 mcu which I monitor an analog signal. I generate a tone using dac when the signal exceeds a certain treshold. My problem is that as soon as I ...
6
votes
1answer
124 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 ...
4
votes
1answer
551 views

STM32 crashes when FreeRTOS project is converted to C++

I am experimenting with STM32F303RE Nucleo board on SW4STM32 with FreeRTOS v10.1.1 and I was thinking of parsing NMEA sentences by adding the characters to a buffer using UART interrupt and then ...
0
votes
2answers
61 views

Problem with the reset circuit for a MCU

I need help by understanding the problem with an existing MCU circuit concerning the Reset PIN (STM32 Cortex M0+: STM32L071K8): It seems something in the circuit is wrong, since it works only when I ...