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.
229 questions
0
votes
1
answer
76
views
STM32L552RET6 she [closed]
This microcontroller has many options for each pin (GPIO, UART, SPI, I2C, etc.) , and I don’t know how to choose between them. Can you explain how pin selection is done in a hardware design and send ...
0
votes
1
answer
70
views
How to verify ADC data sampling aligned with center-aligned TIM8 PWM on STM32H743 without oscilloscope?
I am working on an STM32H743 project where I need to read ADC data synchronized with a center-aligned PWM signal generated by TIM8. My goal is to ensure ADC sampling is correctly aligned at the center ...
0
votes
0
answers
66
views
Can I connect 4 PCM1808 (with 2 mics each) to STM32H723 via SAI for syncronized 8-channel audio input?
I have STM32H723 and four PCM1808 with two analog microphone each. I need to receive syncronized (read all mics at same time) audio. I guess, SAI input is best for working with audio.
Is it possible ...
0
votes
0
answers
88
views
STM32G4 ADC oversampling issue in regular and injection channels
I'm using ADC regular and injected channels in STM32G4. I need different oversampling ratio for regular and injected channels, in STM32CubeMX it's possible to configure the oversampling ratio ...
-1
votes
2
answers
132
views
STM32 Custom PCB, can't program, without setting header pins or I have to play with the reset line
I have a custom STM32 PCB, when I try to connect the STLink V2 to the PCB, through STM32Programmer, it says:
If I hold the MCU Reset button, and in the program I press connect, after waiting 3 ...
0
votes
1
answer
226
views
STM32H7 trigger at falling edge of PWM signal
I'd like to trigger a GPIO when detecting a falling edge on my PWM.
I want to do all of this within the same timer.
For example:
Timer 1: PWM Generation
Timer 2: Input capture indirect mode or ...
0
votes
1
answer
163
views
STM32 PWM generation polarity changes after the DMA cycle transfer complete interrupt
I am generating PWM using TIM1 channel 1 and channel 2 along with their complementary channels. I am providing the CCR values from an array via DMA. I have written a DMA complete callback function. ...
0
votes
1
answer
1k
views
How to use STM discovery board as an external debugger using SWD
I have F407G Disc1 board where it has the SWD ports and I want use this board as a standalone external debugger and I went through the manual for the connections but got stuck
Also found a thread in ...
1
vote
0
answers
200
views
SPI2 on the bluepill STM32F103C8 doesn't work
For a while, I have been trying to interface a 1.8 TFT ST7735 to my STM32F103C8 bluepill using SPI2 and HAL.
I tried SPI1 and has worked perfectly, but because I am interfacing LoRa to the bluepill ...
1
vote
0
answers
373
views
How can I connect multiple I2S devices to STM32H7?
I am building an audio application using STM32H7 to communicate with two 32 bits SRC (Sample Rate Converters), two 24 bits CODECs, one 32 bits ADC and two 24 bits DAC.
I want to receive audio data ...
0
votes
2
answers
2k
views
HAL_SPI_TransmitReceive not working properly
I am trying to use HAL function to drive SPI to read analog voltage from external ADC (adc128s102). I see what I expect to see in first 16 CLK with MISO(Blue) and MOSI(Yellow) line. But what's causing ...
1
vote
0
answers
374
views
How to export values to TXT file in STM32CubeIDE
I have a code for ADC: (STM32F407)
...
0
votes
1
answer
190
views
STM32 H7 - Outputs wrong I2S BCLK (1.027 Mhz pulses, expected 1.024)?
The STM32 seems to be a nightmare... Just such weird issues constantly. Anyways, I'm trying to output Master I2S (with BCLK, no MCLK) at 16 kHz, but for some reason am getting a 1.027 MHz clock ...
1
vote
1
answer
556
views
STM32 (H7) DMA Callback Imbalance for SAI vs I2S (same clock frequency, one is called slightly more / less often)
I have a strange issue here trying to read 2x PDM mics from the SAI peripheral and output the audio over the I2S peripheral here on the H7.
I use what appears to be the correct frequency for both ...
0
votes
1
answer
193
views
STM32H755ZIT6 RCC Issue
I'm trying to set maximum frequency for M7 - 480 MHz and 240 MHz for M4.
when I'm setting them I always have RCC Power Regulator Voltage Scale 0 in RED and I can't change it.
what am I missing?
1
vote
0
answers
225
views
How to calculate the desired dead-time for 2 reversed pwm pulses?
I'm learning about stm32f103rct6 but I don't understand how to calculate the desired dead-time to configure on CubeMx as below. I don't know if it has a formula. If so, can you explain it to me? Thank ...
1
vote
1
answer
133
views
Difference between Systick exception handler and Sytick interrupt handler. do all cpu exceptions also have IRQ handlers?
THIS IS WHAT MY UNDERSTANDING
Is Systick an exception or an interrupt? since it is one among the list of cpu exceptions, I'm coming to conclusion, systick as an exception.
since it is an exception, it ...
0
votes
0
answers
179
views
STM32 L4(Nucleo-144) CAN Tx pin stays high and dosen't transmit any data
I'm new to STM32 and a starting knowledge of C. I'm trying to get some level of CAN communication to be working. I've tried looking up the HAL'S required but for some reason no matter what I do, the ...
2
votes
1
answer
3k
views
Booting modes of STM32 microcontrollers
I am creating a custom board and using STM32F303 chip. I have looked into the datasheet and there are 3 boot modes and according to the datasheet the bootloader resides in the ROM memory.
I got ...
0
votes
0
answers
427
views
Printf retarget on STM32 with CubeMX
I'm using STM32F7xx for my project where I use VS Code text editor in combination with CMake project build. I also use CubeMX for code generation. For a record I have already examined all the answers ...
0
votes
0
answers
143
views
How to transmit five byte data transmit in UART_DMA?
HAL_UART_Transmit_DMA call in timer interrupt handler to check the output for just now. The output is came but this is not proper output. this method for just call in to the interrupt handler output ...
0
votes
1
answer
773
views
How does STM32 pin assigment work in cubeMX?
I'm configuring a stm32 chip in cubeMX (a code configurator). The specific chip is the STM32H7A3ZITQ.
When you enable a peripheral, the io pins for that peripheral are highlighted in green on the chip ...
0
votes
0
answers
533
views
Please install STM32CubeIDE toolchain to open the project
I want to create a project with STM32CubeMX, but when I say Generate Code,
"Please install STM32CubeIDE toolchain to open the project. Or associate the file type of the project with your ...
0
votes
1
answer
1k
views
STM32F103 programming using a USB port and CubeProgrammer
I created a custom board with an STM32F103C8T6 microprocessor and Iwant to use the USB to program the board using the STM32CubeProgrammer. I found out thanks to a user on Stack Exchange that it is not ...
1
vote
1
answer
451
views
How can I choose hrtc.Init.SynchPrediv value
I am using STM32L073V8T6 microchip. I'm trying to get clock data using RTC with this.
If I set the hrtc.Init.SynchPrediv value to 258 while configuring, it overcounts about 4 minutes in 24 hours. Even ...
0
votes
1
answer
535
views
Getting started with STM Nucleo boards. Mapping from processor pins to board functionality (like LEDs)
Please tell me if there is a more appropriate group!
I'm just starting with STM developmeent using STM32CubeIDE. I have a background in programming (C#/C++/C) on the desktop and some minor experience ...
2
votes
1
answer
264
views
Activate VREF+ pin on STM32L073VBT6
I would like to read ADC over STM32L073VBT6. When I try this, I see that the value is always 4095 and does not change (expected to be 0 or close to it). While searching for the error I noticed that ...
2
votes
2
answers
1k
views
Implementing direct digital synthesis in STM32 microcontroller
I am working on a project that requires phase locking (digitally) of an output signal from a sensor to the reference signal which needs to be done on STM32 microcontroller. I am new to this area, and ...
1
vote
0
answers
269
views
Azure NetX Duo: where can I find a driver compatible with my Ethernet PHY ADIN1200?
Context of my question
I am trying to use Azure NetX Duo with a micro STM32F4. I'm using the following tools:
STM32CubeMX version 6.7.0
In the STM32CubeMX I have installed the Package STM32F4 version ...
1
vote
0
answers
1k
views
How to solve the linker 'Error: L6218E Undefined symbol' when I compile a project with RTOS ThreadX?
I'm trying to compile a project where I have add the Software Pack RTOS ThreadX on a STM32F4 and I'm using uVision Keil 5.29.
I have included ThreadX in the project ...
1
vote
4
answers
4k
views
UART not sending correct data in STM32
I have to send data by UART1 from my STM32F429. The problem is that the data is not sent correctly.
I debugged and I got this.
For testing I want to send ...
0
votes
1
answer
3k
views
STM32 CAN-bus: Mail boxes are full and gives HAL_CAN_ERROR_PARAM back - Change parameters
I have two STM32 microcontrollers and they have CAN-bus connection with each other.
The problem is that when I connect them together, then the transmitter will after a few messages, stop transmitting ...
1
vote
1
answer
1k
views
How to read MCU schematic and map each pin correctly
I relatively new to working with MCU's and have been having some trouble figuring out what "mode" to set a pin to when trying to map it to the correct function. For this project, I am using ...
0
votes
1
answer
718
views
How to configure CDC (VPC) on the STM32 Nucleo F401RE board?
I am trying to establish communication between my host machine (running Ubuntu 22.04) and the STM32 Nucleo F401RE board. I only need to transmit data from the board to the host computer (only single ...
0
votes
0
answers
2k
views
Recovering a "dead" STM32F429VGT6
Recently I lost power on my printer with an BTT SKR 2 board (https://github.com/bigtreetech/SKR-2). I connected my ST-Link v3 to the SWD pins and confirmed I can identify the IC. I am connecting to ...
0
votes
1
answer
229
views
STM32 - Porting/Tailoring Example Files to different Microcontroller - xcubeide
How do you convert a project made for one development board for another development board within X-CUBE-IDE.
I am trying to copy a SMBUS example over to a different Development board, so I was ...
1
vote
1
answer
677
views
Understanding the implications of STM32 pinout configuration conflicts (yellow triangles) in CubeIDE?
Using CubeIDE and configuring STM32L072 I get some (yellow triangle) GPIO conflicts on my I2C2 interface. The GPIO's are assigned to other non I2C uses. Where would I look to understand the ...
2
votes
1
answer
584
views
STM32G0 Stuck on SMBUS Slave
This question has been "self answered". Please see answer below.
I am trying to communicate with SMBUS Master and Slave configuration on both STM32G070RB (NUCLEO Boards). So the master ...
1
vote
1
answer
262
views
Streaming image data to SD card using 8-bit data width SDRAM and DCMI peripheral on STM32F446ZCH6
I am currently working on an application involving streaming 480p/720p video from an OV5640 camera to an SD card (using SDIO) but I am afraid that the 128Kb of available SRAM are not enough.
Given the ...
2
votes
1
answer
460
views
Interface TFT display with STM32 parallel connection
I am searching for an explanation for the coding idiom for changing TFT
display resolution that is used in the PORT from mcufriend’s Arduino code.
...
1
vote
2
answers
2k
views
STM32 CubeIDE Could not connect to target problem
I'm trying to code the stm32g030f6p6 microprocessor using J-link using STM32 CubeIDE, I get the warning "Could not connect to target, Please check power, connection, and settings".
When I ...
0
votes
2
answers
6k
views
Using a FDCAN controller with a CAN transciever on the STM32 platform (G431KB)
I have a source of can messages connected to the SN65HVD232D CAN controller, which is then wired to a NUCLEO-G431KB via the FDCAN1 TX and RX pins. I confirmed with an oscilloscope/digital decoder that ...
1
vote
0
answers
714
views
GPIO basically not working on STM32401CCU6 Blackpill
As a newbie I switched from Nucleo to Blackpill recently (STM32401CCU6 ) and after an overally good start I faced a wall.
It seems like GPIOs are... dead for some reason:
HAL_GPIO_WritePin/TogglePin ...
1
vote
0
answers
557
views
STM32H743 with USB HS, FUSB2805 not detected
I have a custom board with STM32H743VIT6 connected to an external USB HS PHY, the FUSB2805MLX.
I am trying to run a bare minimum example setup in STM32CubeMx. Just including a USB HS connection and ...
0
votes
1
answer
375
views
What are the things to keep in mind while replacing the MCU with a pin compatible MCU?
I am swapping a pin-compatible STM32 MCU from STM32F0 to STM32F4 which is a transition from Cortex-M0 to Cortex-M4. I will have to migrate the F0 based STM32 library to STM32F4 one to ensure the ...
0
votes
3
answers
2k
views
Why are MSPs in STM32 HAL defined as callback functions?
Please see my edit:
I asked this question stackoverflow and no one answered.
In STM32CubeMX MSP stands for MCU Support Package and of all here is what it basically about:
MSPs are user callback ...
3
votes
2
answers
2k
views
STM32 USB HID Keyboard skipping key presses
I have an STM32F3DISCOVERY evaluation board which has an stm32f3 mcu on it. I am trying to use the board to emulate a USB keyboard.
I used the STM32CubeIDE to enable USB communication, configure the ...
2
votes
1
answer
2k
views
STM32 : set APB1 and APB2 to same clock frequency
When configuring a STM32 (or at least my STM32F722ZE based nucleo board), there are 2 clock frequencies, one for APB1, the other for APB2. The annoying thing is that some timers use APB1, other use ...
0
votes
1
answer
437
views
Can I download my code from Keil uVision5 or STM32CubeIDE to the STM32F103C6T6 board via FTDI?
Can I download my code from Keil uVision5 or STM32CubeIDE to the STM32F103C6T6 board via FTDI? If yes, then how should I do it? I can't find anything that helps online.
If there is no method to do so ...
1
vote
1
answer
2k
views
STM32f7 I2C master transmission using DMA does not work
The problem is the code:
HAL_I2C_Master_Transmit_DMA (&hi2c1, (uint16_t)(MCP4725A0_ADDR_A00<<1), (uint8_t *)buffer, 2);
Though it returns ...