Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I have followed the ST tutorial on how to genterate a 1Hz PWM using timer, but for some reason its not blinking.I configured:1)Clock configuration to 8Mhz2)Set PWM genration channel 33)Set prescaler to 1274)Set ARR to 624995)Selected PWM mode 1 and made the pulse value to 312506)Finally I set the PINB10 to tim2_ch3 and connected it to an LED in a breadboardIn the main.c I have this HAL function to start the PWM HAL_TIM_PWM_Start(&htim2,HAL_TIM_ACTIVE_CHANNEL_3 );Please help ,I have been with this for some time now. But still I am not getting the output.
I am trying to set up SPI according to datasheet .Here is the datasheet recomendation:the pin that is connected to DRDY is the SPI MISO pin. But on CubeMX I can not change the GPIO mode. There is available only one mode: Alternate Function Push Pull. How to solve this?
I am using a Nucleo H743ZI2 with the CubeIDE and while it does generate code to initialize the SPI peripheral itself, it does not generate code to configure GPIO pins as the SPI alternate function. This is despite the fact that the GPIO pins for SPI are shown green on the Pinout & Configuration window and it is able to generate code for other GPIO pins, like the pins connected to the LEDs.
..
This is the code that is missing (and i had to add myself):ADC_INJ_InitStruct.TriggerSource = LL_ADC_INJ_TRIG_SOFTWARE; ADC_INJ_InitStruct.SequencerLength = 2; ADC_INJ_InitStruct.SequencerDiscont = LL_ADC_INJ_SEQ_DISCONT_DISABLE; ADC_INJ_InitStruct.TrigAuto = LL_ADC_INJ_TRIG_INDEPENDENT; LL_ADC_INJ_Init(ADC3, &ADC_INJ_InitStruct);(The HAL code generator does this correctly).
Hello everyone.I started ARM-coretax study at yesterday.first, I am Arch linux user. and I want use makefile of STM32CubeMX on my linux.but I can't use build file in the bin file.<I get the st-link and I can use 'st-info --porbe'. but I can't build at makefile in the my linux.>"/usr/bin/arm-none-eabi-ld: error: build/TEST2.elf uses VFP register arguments."I installed all 'arm-none-eabi'package. (i don't know why not show me [installed] message)thank you for read my Q.
Hi,I've setup the pin configuration for my device using STM32CubeMX and setup the STM32 MAT / TARGET environment in Simulink along with the necessary add-ons e.g. embedded code generation and MatLab code generation.Now when trying to build a simulation GPIO blocks work as expected although ADC blocks have no channels available.Has anyone run into this issue before and have a possible solution? I've also tried Matlab 2021a with latest STM32CubeMX and run into the same issue. my configuration .ioc file is as follows:File.Version=6 GPIO.groupedBy= KeepUserPlacement=false Mcu.Family=STM32L0 Mcu.IP0=ADC Mcu.IP1=NVIC Mcu.IP2=RCC Mcu.IP3=SYS Mcu.IPNb=4 Mcu.Name=STM32L083C(B-Z)Tx Mcu.Package=LQFP48 Mcu.Pin0=PA0 Mcu.Pin1=PA1 Mcu.Pin2=PA2 Mcu.Pin3=PA3 Mcu.Pin4=PA4 Mcu.Pin5=VP_SYS_VS_Systick Mcu.PinsNb=6 Mcu.ThirdPartyNb=0 Mcu.UserConstants= Mcu.UserName=STM32L083CZTx MxCube.Version=5.6.0 MxDb.Version=DB.5.0.60 NVIC.ForceEnableDMAVector=true NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true
open stm32cubemx (version 6.2.1)new project -> access to board selectorselect the board "STM32L152C-DISCO"Initialize all peripherals with their default Mode? YesGive project name "test"Toolchain/IDE changed to MDK-ARM (min version v5.27)Open project in uVisioncompile it, and then start debuggingstep over HAL_Init();step over SystemClock_Config();step over MX_GPIO_Init();();step over MX_ADC_Init();at this point, the debug show Debugger - Cortex-M error:"Cannot access target. Shutting down debug session" (as shown in the attached screenshot) and get out of debugger mode after you click on "OK".
Hello, I am trying to run a project generated by STM32cubeMX. DHCP thread code I got from ST example called "STM32H723 webserver demo" and put it to my code. Communication between PHY and STM32 works well, DHCP doesn't work. Even if I put a static IP, it doesn't connect to my router. But if I download that ST webserver example, everything is ok, and DHCP works. Where is the problem? I did Lwip configuration via CubeMX equal to Lwip configuration in that ST example, everything other is the same (linker areas, MPU config, etc). I haven't in my project an HTTP server yet, I just want to ping my device from my PC. DHCP stops at SELECTING state.
Hi everyone,I am starting using the STM32 to store data on MicroSD card over the SDMMC port. My board is a NUCLEO-L476RG. CubeIDE version is 1.6.1 and CubeMX is 6.2.1.My MicroSD card is a basic 2GB model, it works perfectly well when connected through card reader to a PC. I was going by this YouTube tutorial: https://www.youtube.com/watch?v=I9KDN1o6924Configured it the same way, didn't work. Looked at this forum, added DMA, interrupts and internal pull-ups, lowering the clock, still nothing.It fall into Error Handler() when it tries to format the card. If I disable the formatting and go straight to creating a file, again, it falls into the Error Handler().Here are the SDMMC settings: Here are the FATFS settings: Here is the detection pin and clock settings: And here is the piece of the code. I use simple variable to tell me, where the routine fell into the error handler.
CubeMX lets you choose 4 voltages.Option/Value 0 should be 2.5V jnstead of the mentioned 2.048VOption/Value 1 should be 2.048 instead ogf the mentioned 2.5VProof: When you select 2.5V it generates 2.048 on the VREF output.
I am unable to configure FMC with SDRAM in latest STM32CubeIDE 1.6.1.Regardless of what I chose in the Mode section. Can someone guide me, what settings I have to perform?
I have a working project on STM32H750VBT6 with multibootloader and executing code from external Flash. When changing to CubeMX6.2.1 clock configuration reports issues although nothing has been changed. How to solve?
The thing is, that i have no problem with the communication on 22408 Bits. I used the parameters:Prescaler: 1Time Quanta in Bit Segment 1: 13 TimesTime Quanta in Bit Segment 2: 02 TimesReSynch. Jump Width: 1 TimeMy clock configuration is attached. I used the same parameters on the PCAN, but there is no message sendet. Is there any connection from the Baudrate with the clock frequency that could create the problem? There is no error in my compiling btw.
Hello,How can I configure lwIP to send packets in LAN. Everything what I can it's to see my device on router. I tried to ping device, but always I have timeout and I tried to send packet to my PC, but I don't see it on wireshark.
Hi,i have a simple question: how do i have to configurate the clock of my STM32F072RB to send or receive CAN-Messages with 500kBit/s. With 8MHz it seems to work only until 250kBit/s.Best regards
I am using CubeMX v6.2.1, when I attempt to install the L4 MCU package v1.10.0, I get an "HTTP Access Forbidden" error. I am seeing the same error on Windows and Linux.I can download v1.9.0 and v1.11.0, and v1.17.0 without issue. The error only seems to happen with v1.10.0.I am attempting to update a project from v1.8.0, however, the CAN API changed in v1.11.0, so wanted to upgrade to v1.10.0 as the most recent update prior to the CAN API change.As far as I can tell, the error is on the ST web server, when I look at a network capture, I see the following HTTP request:GET /packs/resource/firmware/stm32cube_fw_l4_v1100.zip HTTP/1.1and the following response from the server:HTTP/1.1 403 Forbidden (text/html)Any chance this can be corrected so I can get the v1.10 package?Cheers,Martin Z.
Hello, I use STM32F407 and I wanna config virtual com port on my board using CubeMX,but I always get error 43, I saw many topics, my stack size is 0x4000 and heap size is 0x2000.I tried to change max packet size, reinstall stm32 vcp drivers, but nothing changesI use cube 5.3.0, and FW package F4 V1.24.1.And I think the problem is in Cube, because I made the same project like a half year ago and it works now on the same board.Do you have the same problem? Thank you,Anton
I used STMCubeIDE to generate the following code...It is for Timer16 to count up and generate an interrupt after 100ms. Can someone tell me why the code did not set up __HAL_RCC_TIMx_CLK_ENABLE()?When I use the IDE to generate GPIO stuff it automatically adds the RCC Enable bit into the INIT functionThanksSteve
Hello,We have been using STCubeMx(v6.2.1) to generate our system initialization code. We started a new project for an stm32H7A3xx MCU.But with the auto-generated code, it fails on the HAL_RCC_ClockConfig->HAL_InitTick->HAL_SYSTICK_Config.We tried different clock configurations (lower freq., different prescalers) but it resulted in the same fault.Any idea where the problem is?Thanks in advance,Adria TerradesAuto-generated SystemClock_Config:void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {0}; RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; /** Supply configuration update enable */ HAL_PWREx_ConfigSupply(PWR_LDO_SUPPLY); /** Configure the main internal regulator output voltage */ __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE0); while(!__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY)) {} /** Configure LSE Drive Capability */ HAL_PWR_EnableBkUpAccess(); __HAL_RCC_LSEDRIVE_CONFIG(RCC_LSEDRIVE_LOW); /** Initializes the RCC Oscillators acc
Hello! I need to send/receive a 16 bits data to an external ADC, but I realized that SPI HAL functions just support 8 bits buffers. How can I send more than 8 bits? Even DMA function all work with 8 bits. In CubeMX I set the word length as 16.
I am using STM32CubeIDE 1.6.1 with HAL libraries for STM32 G474RE. I would like to dynamically change the Duty Cycle, Period, and Dead time values for the HRTIM1: Timer A after initialization using HAL. After initial configuration set up by STM32CubeMX, I believe I can use __HAL_HRTIM_SETCOMPARE to change the Duty Cycle after initialization and use __HAL_HRTIM_SETPERIOD to change the Period after initialization.Is there a way in HAL to change the Rising Value and Falling value of Dead Time after initialization?
Is there any way to force the reset to defaults when the dialogue box does not come up asking you?Using 1.6.1 of the stm32cubeide with L432 nucleo32 development board.I have seen this once in a while but thought it was fixed in the latest version but a student in my class says it never asks him. So wondered if there is a workaround?
Hi,I have installed STM32CubeMX on my laptop.The installation was successful.But when I try to create a project it says "Not a Valid ioc". I have tried the following steps but still the result was same:1) I forced uninstalled the software STMCubeMX.2) Uninstalled java and checked for correct version.3) Reinstalled the software.I have attached the error screenshot Kindly, find the attachment and help me with the error.Thanks
ST Community highlights – April to June 2026
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.