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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
37 views

How to change the PWM Mode in STM32F407 during runtime?

I have set Timer 8 to PWM Generation CH2 CH2N. Based on the value read by the ADC, I want to change the polarity of both CH2 and CH2N. I have found that using ...
user avatar
0 votes
1 answer
79 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 ...
user avatar
1 vote
0 answers
62 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 ...
user avatar
  • 115
0 votes
0 answers
96 views

Weird Letters in Proteus Virtual Terminal

I'm a newbie to Proteus and electronics world. I have an assignment in which I need to use USART communication. Basically, at the end of the assignment, I should have accomplished that when I enter a ...
user avatar
1 vote
0 answers
88 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 ...
user avatar
  • 11
0 votes
1 answer
74 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 ...
user avatar
0 votes
3 answers
273 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 ...
user avatar
  • 1,117
2 votes
1 answer
164 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 ...
user avatar
  • 97
2 votes
1 answer
238 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 ...
user avatar
  • 2,656
0 votes
1 answer
89 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 ...
user avatar
  • 11
1 vote
1 answer
353 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 ...
user avatar
3 votes
1 answer
1k views

STM32F3DISCOVERY board using STM32CubeIDE download fails "No ST-LINK detected!" but CubeProgrammer works

Using the STM32CubeIDE with an STM32F3DISCOVERY board I was able to use the Run menu option to download and start running a program. After a Windows Update which involved updating USB drivers, the Run ...
user avatar
4 votes
4 answers
3k views

Did I kill my STM?

I have (had?) an STM32F429ZI. I was working with the ADC on PC0 and due to a hardware malfunction, 12V ran through the pin when the maximum voltage an ADC pin supports is 3V. Since then, whenever I ...
user avatar
  • 43
0 votes
0 answers
57 views

Is it possible to use the RTC alarm signal on the tamper pin in order to hold that value in a D flip flop? STM32 (bluepill)

I've been doing a lot of research concerning Low power modes for the STM32 (Bluepill) and I was wondering if I could power my board through VDD and then, right after going into sleep mode, I would use ...
user avatar
  • 601
0 votes
1 answer
869 views

STM32CubeIDE how to import complete working program from TouchGFX Designer

Situation: STM32F469 Discovery board with DSI 800x480 Screen, broken native BSP drivers (Display-related part). I tried to create a project in STM32CubeIDE, set all the settings, initialized as ...
user avatar
  • 3,328
1 vote
1 answer
311 views

STM32F7 HSE not starting

I'm using an STM32F765VGTx on a custom PCB with an external crystal (at 26 MHz), which however I can't seem to get working. My first question, before any further detail, is: how can I find out if the ...
user avatar
  • 135
0 votes
2 answers
1k views

Keil Error: Not a genuine ST Device! Abort connection

I am using ST-link V2 for programming/ debugging my STM32F103C8t MCU using Keil. So the problem is that when I try to program the STM32 controller it shows a popup error Not a genuine ST Device! Abort ...
user avatar
  • 66
0 votes
1 answer
94 views

How to flash a bootloader onto the STM32WLE

I am currently designing a custom PCB with this board: https://www.st.com/en/microcontrollers-microprocessors/stm32wle5jb.html I cannot find any mentioning that it comes with a factory installed ...
user avatar
0 votes
2 answers
116 views

Driving led matrix with SN74LS595N instead of SN74HC595N

I worked out how to drive a ledmatrix (8x8) width monochrome leds with 2 SN74HC595N on a STM32F103C8 over SPI. It works. (Un) fortunately I got my hand on a free a bag of SN74LS595N's. I tried to ...
user avatar
0 votes
1 answer
1k views

STM32 - How to trigger a DMA transfer via hardware timer, while CPU is in SLEEP mode?

I'm trying to set up a simple project that does the following: Enter sleep mode and in the main loop, it waits for interrupt - __WFI(). Transmits data from a buffer[4] to the PC, via UART. The ...
user avatar
1 vote
1 answer
166 views

stm32 - i2c communication fail after disconnecting oscilloscope probe

I am trying to communicate with TCS34725 module with NUCLEO-F401R board. The first I tried is to read out ID register of TCS34725, which should be 0x44, to check the connection. Everything works fine ...
user avatar
0 votes
2 answers
803 views

Debugging STM32 with OpenOCD, STM32 for VSCODE won't work or flash, Configuration issue maybe?

First and for most I googled a lot and Its been a week of searching with no solution at all. Please bare with me! I tried to add all necessary info! Please request more If you need. My problem is: I ...
user avatar
0 votes
2 answers
362 views

Connecting multiple encoders in to STM32 TIMx hardware counter (using channels 3+4)

I have a requirement to connect 3+ standard rotary encoders (A/B quadrature) into an STM32 - the STM32L072x is the current choice. While I could bit-bang it, it would be nice if I can just use the ...
user avatar
  • 6,629
-1 votes
1 answer
289 views

What does 'pulse' in STM32CUBE in PWM generation

I would like to know what 'pulse(16 bits value )' for is it Ton of the PWM signal
user avatar
  • 129
0 votes
0 answers
176 views

Could a china ST-Link have bricked my STM32F4?

I have built several boards with STM32F405 on them and I have been flashing them with a cheap china ST-Link knock-off from eBay which worked perfectly for many months now. However, I now noticed, that ...
user avatar
0 votes
2 answers
802 views

STM32F407 Discovery CAN Bus RX interrupt doesn't fire

I am designing a CAN Bus with two STM32F4 Discovery boards. I use transceivers SN65HVD234 from Texas Instruments. I configured the Discovery with CubeMX and used CubeIDE. I am using the HAL library. I ...
user avatar
1 vote
1 answer
927 views

How to load Touchgfx files to external flash

I have W95Q64 flash memory and STM32F429 custom board. I want to load Touhgfx files to external flash memory. For this purpose, firstly I added below declarations into FLASH.id file as; ...
user avatar
  • 13
0 votes
0 answers
269 views

stm32l431 Read multiple channels ADC

I am trying to read from 2 channels of ADC 1, I have followed other tutorials and tried but I am not getting any success. I can read from one channel but not the other. ADC configuration: This is my ...
user avatar
-1 votes
1 answer
80 views

STM32 send code directly to chip

I have just started in the world of stm32 microcontrollers and I have seen that they have many boards for debugging, testing, etc ... But my question is the following. If I develop software with ...
user avatar
  • 93
1 vote
1 answer
315 views

Does USB host mode on an STM32 require VBUS sensing?

I’ve been using an STM32F413ZH Nucleo board as a USB host device. All is working well. However, I’m in the process of designing my own PCB based on the Nucleo design, but using a full-size USB Type A ...
user avatar
  • 31
2 votes
1 answer
258 views

STM32 usart interface sends data but "128" is added to each sent byte

I'm using the newest version of stm32cubemx to config my hardware. I'm using a Waveshare STM32H743 dev board and it's completely healthy and uClinux works(I can easily communicate with it using that ...
user avatar
0 votes
0 answers
115 views

STM Nucleo-F722ZE UART weirdness when setting the baud rate (it needs to be set 3 times larger)

For the past days I've been trying to communicate via UART between an Arduino and an STM32 Nucleo F722ZE board. After much troubleshooting with the oscilloscope I realized that when I set a baud rate ...
user avatar
  • 3
0 votes
0 answers
189 views

Setting up UART with STM32L4RGTx

The prompt here is to debug the issue with UART setup on the STM32 chipset. I've followed a couple of online blogs to understand and setup the UART interface. I want to transmit (only) a dataframe (...
user avatar
8 votes
3 answers
1k views

STM32 - How does analog configuration of MCU pins affect the power usage?

When I was creating a new project using the STM32CubeMX, I saw a check box stating that setting all free pins as anlog will decrease the power consumption. I couldn't figure out how it works. How can ...
user avatar
0 votes
0 answers
85 views

STM32F105 stop executing after 16 seconds [duplicate]

I'm facing an issue with an STM32F105 microcontroller which with a simple code executing in a while loop it stops after 16 second here is code which I don't think there is a problem with the code ...
user avatar
  • 145
0 votes
2 answers
3k views

STM32F10x microcontroller debugging problem

I'm a beginner and I'm using STM32F10x family to learn about electronics.I was using STM32F103 blue pill in the past few months and I can debug it and upload code to it while both boot0 and boot1 are ...
user avatar
  • 145
4 votes
1 answer
371 views

Why operations on float variable are performed on a double? STM32F401RE, MDK-ARM v5

I am debugging a simple line of code: float temp_f; ... ... temp_f= temperature[0] +(temperature[1] >> 5)*0.125; that is assembled into ...
user avatar
0 votes
1 answer
203 views

STM32 Device_only USB_OTG

I a working on a project around the STM32H7 (Nucleo STM32H743ZI2) on which I am using the user USB to communicate through CDC interface. Everything is working fine, however, I just noticed that this ...
user avatar
  • 61
0 votes
2 answers
341 views

How can I open and run the blink example from the STM32F3 MCU package?

I have previously written, compiled and flashed applications to an STM32F3 Discovery board succesfully with the STM32CubeIDE. ST offers an STM32Cube MCU Package for STM32F3 series, which I downloaded ...
user avatar
-1 votes
1 answer
301 views

How to flash a large binary file to the 512-Mbit Quad-SPI memory of the STM32F7308-DK board?

I have a STM32F7308-DK board: I want to upload my custom binary code.bin for the board to execute it and display output on the screen. For that, I downloaded and ...
user avatar
1 vote
1 answer
607 views

Where can I find the EEPROM memory in STM32 Nucleo F401RE?

I'm looking for to store and read values on STM32 Nucleo F401RE and I need to find which sector and begin address to start with. I did watch a tutorial how to do, but he's using another STM32 board. ...
user avatar
  • 785
0 votes
0 answers
254 views

Why do I get Hard Fault error when I use RTOS with STM32?

I have created a library for ILI ILI9341 LCD that can do lot's of stuffs. It's made for STM32 and it can do: Plots Number pad Icons 16 bit Windows 3.11 Question dialog Frames But when I try to load ...
user avatar
  • 785
1 vote
0 answers
122 views

Debugger connection fails when using UART2 in DMA mode in Nucleo-401RE

I am trying to build a simple communication between my PC and a Nucleo-F401RE using UART over the USB connection. I am able to do this successfully using a “polling” or an “interrupt” configuration. ...
user avatar
0 votes
0 answers
100 views

MCU Package of STM32f1 series for stm32CubeMX

I am trying to download MCU Package of STM32f1 series for stm32CubeMX from the following link: https://www.st.com/en/embedded-software/stm32cubef1.html But the given link sends this messege that the ...
user avatar
  • 43
-1 votes
1 answer
681 views

Can we program and debug STM32F401C via SWD interface using STM32 Cube IDE and STM32CubeMX?

I am planning to use STM32F401C microcontroller for my project, so I am in the process of gaining knowledge on it. I am planning to use the SWD interface to program as well as debug the ...
user avatar
  • 483
0 votes
1 answer
322 views

STM32f103 NRF24L01 Communication Problem

I am trying to apply communication between two stm32f103c8t6 with NRF24L01 modules. And using uart with usb to ttl module to reach putty terminal. I am using KEIL and for generating code CUBEMX. Here ...
user avatar
  • 69
1 vote
0 answers
1k views

STM32CubeIDE issues with CMSIS-DSP library files

I have been trying to add the Library file libarm_cortexM4lf_math.a in the Eclipse based STM32CubeIDE as shown in the pictures below. But the linker is not able to find the library, and drops the ...
user avatar
1 vote
3 answers
7k views

STM32 USART 1-wire communication

I'm fairly new to embedded developping and I'm trying to read and write to a 1-wire device (DS18B20) using USART. After digging around I found two alternatives: Connecting USART RX and TX pins with ...
user avatar
  • 67
0 votes
1 answer
50 views

Atollic's TrueSTUDIO IDE / SDK displays unbelievable variable values

While debugging with Atollic's TrueSTUDIO IDE / SDK, variables are reported to contain unbelievable values. But, if the code is left to run, the code behaves as if the variable values are correct. ...
user avatar
  • 3,100
1 vote
1 answer
1k views

Why Nucleo-STM32G474RE HAL_GPIO_ReadPin returns wrong value?

I am using the on board user button, which is connected to the port C13 and has an external pull up resistor. The HAL_GPIO_ReadPin function returns 0 when the button is not pressed and returns 1 when ...
user avatar
  • 37