Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [stm32cubemx]

Anything related to the STM32CubeMX. It is a program to ease developers' life by reducing development efforts, time and cost. STM32Cube covers the STM32 portfolio.

3
votes
2answers
132 views

Multiple(five) alarm time setting in stm32f0 mcu

I am working on my hobbyist project and need to develop the alarm timings. And RTC and Timer are new for me and I am confused in RTC Alarm time setting. I need to make alarm with RTC for five ...
0
votes
1answer
54 views

strange RFM95 SPI behaviour with STM32L4 [closed]

I am using CubeMX and HAL to program an STM32L4. I am trying to communicate with RFM96 module using SPI, but I am getting nonsensical results. According to the RFM96 datasheet, in order to read a ...
0
votes
1answer
32 views

stm32 uart issue serial monitor vs logic analyzer

I am writing data serial monitor via hal_uart_transmit and it works fine, but when I monitor same serial bit pattern in logic analyzer I see extra two bits have the logic high state, why is that? for ...
-2
votes
1answer
87 views

Why do people say STM32Cubemx is full of bugs? [closed]

I have worked with stm32cubemx for 2 years now, and I have found on forums people have mentioned that stm32cubemx is full of bugs? Why is that?
0
votes
1answer
73 views

How to write data to end of line of existing file (STM32CubeMX FATFS SDIO issue)?

I have successfully coded write data into a CSV file is an SD card using STM32 CubeMS FATFS SDIO interface 1-bit mode. But I can't find the file append function in HAL FATFS driver to write data to ...
0
votes
0answers
23 views

ADC gets stuck after doing a HAL_Delay

In the while loop I have this: HAL_ADC_PollForConversion(&hadc1, 1000); adcValue = HAL_ADC_GetValue(&hadc1); The ADC works okay until I execute this line,...
0
votes
1answer
86 views

How to measure duty-cycle with Input Capture from STM32F103C8T6?

I'm trying to measure the duty-cycle of the 0-5V electrical PWM signal I have generated from the any source. How can I do this? Anyone can help me? IDE: Keil Microcontroller: STM32F103C8T6
4
votes
1answer
91 views

Why does STM32 use a two-stage initialization process? What is the primary purpose of each stage?

I'm learning to use STM32 microcontrollers using CubeMX to generate a project. I've noticed that CubeMX generates two basic stages of initialization for nearly every peripheral: (A) Within the ...
0
votes
1answer
38 views

STM32F030(K6) Systick not triggering (BOOT0 problem)

I'm trying to write a simple program for a STM32F030K6T6 microcontroller. The problem I am facing is the more common "Systick is not working" problem. The code is generated using Cube32MX (Firmware 1....
0
votes
0answers
118 views

Question on PWM input mode [STM32]

I'm trying to set Timer 2 (32 Bits) from Nucleo L432KC to measure input signals up to 1 kHz (for example). There are two modes which allow me to do that, i.e, Input Capture Mode, and PWM input mode. I ...
2
votes
0answers
35 views

STM32F429 PWM GLITCH

I have set up Timer 1 Channel 1 for pwm mode 1. I used the STM32CUBE to generate code for MDK-ARM. Parameters as below- ...
1
vote
1answer
192 views

General questions on Timers [STM32 & CubeMx]

I'm learning by myself how to handle timers in CubeMx. I've got some simple questions. First question: In the clock tree, I see APB1/APB2 peripheral and timer clocks bus frequencies. I thought that ...
0
votes
1answer
250 views

Measuring speed with Input Capture Mode [STM32 & CubeMx]

I have the L432KC Nucleo. I'm trying to measure low speeds with a 1 PPR (pulse per revolution) sensor. For low PPRs, using the Period Measurement Method is suggested. If I get the period of the signal,...
0
votes
2answers
91 views

Questions about DMX512 protocol/STM

I want to make a DMX512 transmitter with a STM32F103 using HAL, CubeMX. I found some documentation like here about the protocol: Lighting-Control-using-DMX512-protocol-on-STM32. Sadly it does not ...
0
votes
0answers
143 views

STM32 issues getting the ADC to work

I am having some trouble while trying to get the ADC on a custom PCB with a STM32F042 to work. I am using CubeMX to generate all drivers/HAL/... and SW4STM32 to write and debug my code. I am setting ...
1
vote
0answers
161 views

driving WS2812B using DMA and timers

I am trying to port the octoWS2811 for STM32F103c8T6. This guy hubmartin has already done the heavy lifting and created a library using STM32 HAL. But the problem is that i am unable to get it to ...
0
votes
1answer
233 views

STM32 Flash erase sector 0

I have an updatable project with stm32f407. Code produced by cubeMx. Updater code check new update from internet and if is avaliable write main program on 0x08020000(sector 5) and this updater code ...
0
votes
0answers
88 views

PWM generation using Timer in STM32L476

I am a beginner when it comes to working with the STM32. I tried to verify the PWM pulse width and the frequency of a signal on a 70MHz DSO, which is fed by the PWM pin of STM32L4. The Clock input to ...
0
votes
1answer
921 views

STM32F4: How to get data from multiple channels sampled from a single ADC?

So I have searched everywhere for a solution to this problem but I can find anything. I have three channels connected to ADC1 of my STM32F446ZE-nucleo and I want to ...
0
votes
0answers
870 views

LWIP Raw UDP API on STM32F2/F7 generated by CubeMX not sending on startup, requires an arbitrary amount of resets to work

I'm working on a project using the LWIP raw API with the stm32f2 and cannot get it to work. The basic concept of the project is to have the stm32f2 acting as the actuator and gets instructions from ...
0
votes
0answers
323 views

How to configure LCD TFT on STM32F469i-Disco with CubeMX?

I'm hopelessly trying to configure LCD TFT on the STM32F469I-Disco eval board. So far my best result is the following: What I've done so far: I used CubeMX to configure the board - I answered "yes" ...
1
vote
1answer
112 views

How to update MCU application

I'm currently developing with Keil µvision5 and STM32CubeMX on a Nucléo Board L053R8 (LQP64). Now I would like to transfer my program to my prototype board which has a STM32F051K6T8 (LQP32). Do I ...
0
votes
0answers
162 views

STM32 PWM generates excessive pulses

I use STM32F103C8T6 to drive WS2812 RGB LED strip. So I try to setup TIM1 to generate PWM using DMA. Everything works fine except the fact that I get more waves then I requested. Almost all the code I ...
0
votes
1answer
741 views

STM32L4 USB Device with VBUS Sensing

I'm trying to get the CubeMX generated sample CDC application working on STM32l475VG IoT board. By following a document from ST Community, I was able to get the clock configuration right and the CDC ...
0
votes
0answers
363 views

Stm32 and FREERTOS

I am a newbie to the embedded world I write this example to learn to programme; I have this problem: I wrote this code but I don't understand it. I have this following situation: I have two Threads "...
-1
votes
1answer
339 views

STM32L0 GPIO Interrupt problem

I am trying to blink the led(PA5) when PC13 Button is clicked. But it doesnot work. main.c ...
0
votes
2answers
97 views

How to get sensor data at fixed time intervals

I am using a STM (stm32l432kb) microcontroller. In my application I need to get the data from the sensor at fixed interval(based on the selected Mode). Like I have to select the Modes:- Mode 1 : which ...
0
votes
1answer
283 views

Cannot read accelerometer values from MPU6050 Interfaced with STM32F303RE

I m working on a "self-balancing robot" with STM32F303RE.I m using STCubeMX to generate the MCU configuration code and then I added the main() to get the values from MPU6050 from the following code : ...
0
votes
0answers
394 views

MPU6050 Interfacing with STM32

I m trying to interface MPU6050 Gryo+Accelerometer to STM32F303RE but I can't figure out how to program it using the HAL Drivers and CubeMx.Can some suggest some literature or material which I can ...
0
votes
1answer
567 views

STM32F4 HSE clock frequency without HSE

I am using an STM32F446ZE Nucleo Board which does NOT have an external HSE clock. From CubeMX I set the clock input from the HSE and after in the clock configuration I set the system clock to 180MHz. ...
1
vote
1answer
388 views

STM32L1xx HAL_GPIO_Init Problem

I am developing an application for a University project on my STM32L1DISCO board with the STM32L152RC MCU. I have configured the pins and generated the init code via STM32CubeMX. I am using Atollic ...
3
votes
1answer
122 views

Can't run code in Keil for STM32L433RCT6P on NUCLEO-L433RC-P

Recently at Embedded World 2018 in Nuremberg I got, for free, NUCLEO-L433RC-P with STM32L433RCT6P chip onboard. I want to broaden my knowledge in STM32 chips. Before, I did simple stuf on STM32F4. ...
0
votes
0answers
47 views

Flashing STM32L0 - QSTlink2

When I am trying to flash STM32L073RZ using QStlink2 with .bin file which was built in Eclipse, QStlink throws following errors: ...
2
votes
1answer
1k views

SD card block read/write issue in SPI mode. (STM32) (CMD17, CMD24)

Good day, I am using an STM32F103C8T6 and trying to interface an SD card (SanDisk Ultra 16GB MicroSD HC card) with it. I know that the card works fine because I can read, write using a PC and it also ...
0
votes
0answers
292 views

Cant make interrupt on Hall sensor with Cube

I've tried to control position BLDC with STM32, CubeMX and Hall sensors. I usually check the values in the main code, but it's bad solution. How to do it with combined mode(Hall sensor) of timer? Or ...
1
vote
1answer
117 views

Simple measuring Ethernet throughput

I have STM3220G-EVAL board (STM32F207IG MCU). I'd like to measure (approximately) its actual Ethernet throughput (board <-> Windows PC). I have CubeMX sources. There are several examples (TCP, ...
0
votes
1answer
370 views

How to get a Timer started without interrupt?

I use an STM32F103c8t6. What I want is to measure time between several statements. I found out HAL_getTick does not work since the resolution is too small (1 ms). However, I cannot seem to initialize ...
0
votes
1answer
508 views

External interrupts in STM32CubeMx on both Rising/Falling?

I'm using STM32Cube to generate the configuration. It creates the following code by default for MX_GPIO_Init in main.c: ...
0
votes
2answers
696 views

STM32L4 Complementary PWM use only the negative Channel

I have problems using the complementary PWM feature of the STM32-L432KC. The non-complemementary pin ch1 is generating the right signal, but the ch1n pin is always at GND. I want to use channel 1,2 ...
0
votes
0answers
911 views

STM32F - how to config DMA transfer to SPI triggered by Timer?

I am trying to make a project with the STM32F746ZG Nucleo board using the DMA to make a transfer of 16-bit values to a DAC connected to the MCU by SPI. I am using the STM32CubeMX to generate the init ...
0
votes
0answers
356 views

STMF4 ADC conversion seems slow

I'm using an STM32F4 to do some 12 bit conversions. I see from here that I should have hopes of getting somewhere around 1us per conversion, and since I'm doing 2 conversions, I would expect ...
0
votes
1answer
71 views

Does STM32CubeMX assist in creating STM32L0 firmware for communication with smartcards?

I need to create STM32L0 firmware for communication with a smartcard (ISO 7816). I will use Tx pin from USART2. Is STM32CubeMX helpful for setting smartcard related stuff?
0
votes
0answers
649 views

How to stop and restart USB device for STM32

I'm trying a project using stm32f103 with cubemx as usb hid device. What I want to do looks really easy: once a button is pressed, the chip works as a different hid descriptor. something like this: ...
1
vote
0answers
319 views

interfacing tcs3200 color sensor with STM32f746zg

I want to interface TCS3200 color sensor with STM32f746ZG. Since the TCS3200 outputs a frequency based on the amount of light received, I need some way to count the number of pulses for different ...
0
votes
1answer
423 views

STM32 RTC - how to update?

I have a remote unit that runs a STM32L0 MCU. It is not connected to the internet but communicates with a remote PC over radio. I would like to update the RTC on the remote unit with a timestamp that ...
3
votes
1answer
1k views

Why does __libc_init_array cause an exception?

After a long time trying to debug why my simple blinky code for my STM32F446RE microcontroller was not working i discovered a line in the bootup assembly file that i was linking to it which was ...
9
votes
6answers
7k views

Why not always use DMA in favor of interrupts with UART on STM32? [closed]

I spend last month a lot of time getting UART (for MIDI) to work with an STM (STM32F103C8T6) using interrupts, without very much success. However, this evening using DMA it worked quite fast. Since ...
1
vote
0answers
205 views

STM32F103 - CubeMx - MCU reboots with FreeRtos v9

I using a STM32F103 in my project and I generate the Keil project with Cube32MX with this firmware package for STM32F1 version 1.4.0. Today I update the Cube to version 4.23.0 and I migrate my ...
2
votes
1answer
126 views

STM32F746 Clock not reporting as expected

I'm using an STM32F746VGT6 microcontroller configured from STM32CubeMX for all the clocks and I'm getting roughly 220% higher clock rates when compiled. For instance I have an HSE crystal at 11....
0
votes
1answer
398 views

Reading onboard-RTC registers of STM32F411

I am trying to read the values in the seconds register of on board RTC of the STM32f411E discovery board. I want to transmit the values to my serial port. I believe i have initialized the hardware ...