Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I'm using the STM32L475 processor with STM32CubeMX 6.11.1.I have configured ADC1 to read two channels, an external input and the internal temperature - see configuration image in CubeMX. The code to drive the adc reading is simple:int16_t Channel;void Adc_Convert(void){ Channel = 0; if (HAL_ADC_Start_IT(&hadc1) != HAL_OK) { for(;;) ; }}void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef * hadc){ Adc.Result[Channel] = HAL_ADC_GetValue(hadc); Channel++;}void HAL_ADC_ErrorCallback(ADC_HandleTypeDef * hadc){ uint32_t err = HAL_ADC_GetError(hadc);}Adc_Convert() is called once every 2 seconds. I only ever get 1 end-of-conversion interrupt, so the temeprature input is never being read - I can see this both by looking at the Adc.Result array and by using breakpoints to confirm. HAL_ADC_ErrorCallbackI() is never called.This
New to STM32. Ordered myself a Nucleo-U545RE-Q Board for software generation used in an embedded project later. Generated a project and started working on it. First it worked just fine. But since mid of last week (start of August), most likely after an update which was installed, it wont crate a working IOC for new projects with the board anymore. New projects for other controllers or other Nucleo-boards work just fine.More specifically as seen in following screenshot, all pins which should be pre- configured with a function for the Nucleo board produce a conflict. The USART1 function is fully grayed out and not configurable. During project creation the options for the USER features are ticked as seen in following picture: the right pins seem to get configured in a wrong way.My current STM32CubeIDE Version: 1.16.0 &
Anybody occured this issue?configuarions in stm32cubeMX1. RCC configuration2. SYS configuration: use ST-LINK to debug3. select the USB of connectivity4. Middleware setting5. clock configuration6. project setting 7. code generation problem in this project1. device cannot be recongnized.
Hi I am getting nowhere trying to use the X Cube IRRemote package, please help.Should I expect the projects in en.x-cube-irremote\Projects\STM32G081B_EVAL to be imported into Cube IDE and run as a working example of the IR Remote functionality?The readme file says:- "This example has been tested with STMicroelectronics STM32G081B-EVALboards and can be easily tailored to any other supported deviceand development board."Which makes me think it should just run.If not can I please have some detailed description of how to make it work?I have managed to get the point of one error in after building the project: unknown type name 'RC5_Frame_TypeDef' main.c Any instructions gratefully accepted.When I read the readme file it says:@par Directory contents- TIM-Infrared/Src/main.c Main program- TIM-Infrared/Src/menu.c Menu navigation implementation- TIM-Infrared/Common_IR/Src/ir_common.c Functions shared for both IR protocols.- TIM-Infrared/Common_IR/Src/rc5_decode.c RC5 receiver impleme
Once I enable UCPD for STM32U5G9 source mode, Cube MX (the latest version 6.12) generates code which does not compile. I am sometimes wondering what is CubeMX testing process - if it exists, ofc.
i have a code like this :but i iwant to ask why result signal in my code freq max is 1,5k and minim 200 hz bu while i want to freq max is 200hz and freq minim is 0 hz, and why while value adc under 100, freq in osiloscope lost?main(void)://DAC#define BUFFER_SIZE 225;uint32_t Wave_LUT[225] = {2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048,2048, 2048, 2048, 2048, 2048,2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048,2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048,2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048,2048, 2048, 2048, 2048, 2048,2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048,2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048,2048, 2048, 2048, 2048, 2048, 2048, 2149, 2250, 2350, 2450, 2549, 2646, 2742, 2837, 2929, 3020, 3108, 3193, 3275, 3355, 3431, 3504, 3574, 3639, 3701, 3759, 3812, 3
I discovered the Tools tab (see picture) with various parameters (voltage, frequency, intensity, etc.) and a sequence when I was using STM32CubeMX to create a project. Nevertheless, I find it difficult to comprehend all of its details, such as how sequence time functions (does it indicate the amount of time the chip is running?).I would greatly appreciate it if someone could please explain the tab to me and let me know if it is a means of determining the chip's power consumption (like stm32h747-DISCO).Thanks in advance!
Hi, I am using ChaN's FatFS on Cortex M7 microcontroller family (stm32F7xx).I'm also using CubeMX HAL from ST and FreeRTOS and SDMMC interface with DMA. The environment is the Attolic IDE.But I'm facing some problems to use it. Sometimes some functions like f_open, f_mkdir, f_opendir returns FR_INT_ERR.After some tests and internet research, I'm still blocked on this issue and couldn´t solve the problem yet.So I started debugging the HAL from ST/ChaN FatFS and I found something that could be a possible bug. I'll appreciate if someone could confirm this or analyze it.The first thing I am using is the "ENABLE_SD_DMA_CACHE_MAINTENANCE=1" configuration.At file "sd_diskio_dma_rtos.c" on function "SD_read" the following code is:.....#if (ENABLE_SD_DMA_CACHE_MAINTENANCE == 1) /* the SCB_InvalidateDCache_by_Addr() requires a 32-Byte aligned address, adjust the address and the D-Cache size to invalidate accordingly.*/ alignedAddr = (uint32_t)buff &
Hello guys, i am trying to open and existing code on cubemx ide after I reinstalled it. i am trying to open the code that is available on my desktop location, also available on git. so please help me to how can I add back my project to cubemx ide.
Hi, a noob post from a noob developer. I am trying to understand how STM32Cube ide works. I guess by default UART2 has set as UART_TX - PA2, UART_RX - PA3. I have reconfigured PA1 and PA2 as GPIO_OutPut and set UART_TX - PA14 and UART_RX - PA15. There is a yellow warning sign beside UART2 that says, 'UART2 Partly disa bled conflict with PA mapped with GPIO_Output'Below is the new configuration: And below is the old configuration: In that case, can I continue to use the new configuration? Also planning to reconfigure the below pins: Will this be any problem? Do I have to configure RCC_OSC32_IN, RCC_OS32_OUT, RCC_OSC_IN, and RCC_OSCOUT? What do these use for?Thank you in advance.
We are pleased to announce you that the official release of STM32CubeMX V6.11.0 is available. What is new in STM32CubeMX V6.11.0? New MCUs series : STM32U0 (STM32U083xx/73xx/31xx), STM32H7RS (STM32H7R7xx/H7R3xx/H7S3xx/H7S7xx) and STM32H5 (STM32H533/H523) New Boards supported: NUCLEO-H7S3L8, STM32H7S78-DK, NUCLEO-H533RE, NUCLEO-U083RC, NUCLEO-U031R8 and STM32U083C-DK New Boards are supported by the Star from Board feature: Nucleo-H755ZI-Q, NUCLEO-U031R8, NUCLEO-U083RC, NUCLEO-H533RE and NUCLEO-H7S3L8 Add Cmake support (Generation in Cmake format ) and which is available only for single-context series (Mono-Core, L5/U5/H5/WBA in TZEN=0) Add the support of the memory management tool for STM32H7Rx/7Sx and STM32H523/533 microcontrollers New Flash feature for the STM32H7RS, STM32U5, STM32WBA, STM32U0 Main fixed issues: 172964: Correction of Nominal Time SegX to start at 1 when using FDCAN. 168811: STM
I'm having issues while trying to generate a project for the L152. When I attempt to install the firmware package for this micro, CubeMX prompts me to log in. However, the login window displays some oscillating bars and then asks me to check the internet connection. Interestingly, when I click to check for updates, CubeMX successfully verifies the installed package versions using the network.I tried to manually download and install the STM32Cube MCU Package for STM32L1 series, but when I try to install the latest patch, 1-10-4, it indicates that it cannot find the file stm32cube_fw_l1_v1100.zip. The downloaded package is named stm32cube_fw_l1_v1-10-0.zip, so I attempted to rename it, but the same error persists.In summary, creating a project for the L152 using CubeMX seems impossible.
I know timers are not designed for that purpose but Input Capture channels have unique Input Filter property which I think could be used to debounce a button. It just needs to be configured a way so interrupt is triggered on external signal rising (or falling) edge.I cannot figure out how to configure it in CubeMX. It would also be good to know which channel triggered the interrupt - in case more than one channel is used.Please advise.
This is my first STM32 project and I am using the Nucleo U5A5ZJ-Q with CubeIDE version 1.15.0. I am trying to use the generated code to toggle the LEDs as a simple "hello-world" example. When I create a new STM32 project in CubeIDE, I take the following steps shown in the screenshots below. When I go to generate the code, I get a warning about the RCC peripheral being incorrectly configured (shown below). I generate the code anyways, and when I navigate to the pinout & configuration window, I see that CRS SYNC has a conflict with PA10.When running the auto generated main.c program, an error is thrown on line 170 in SystemClock_Config() in main.c.I am currently working through the documentation, but any suggestions on what might be going wrong here would be appreciated. Note I have not changed the code or the pinout configuration at all up to this point , this is the default state when the project was created.
I work with STM32CubeIDE 1.9.0, STM32CubeMX 6.5.0, and STM32Cube FW_U5 V1.1.0, on a NUCLEO-U575ZI-Q.I created a new project for this specific board, and left everything by default.I need to use the ADC1, wich is enabled by default.I start with this call:HAL_ADC_Start(&hadc1);And it never succeed. Digging deeper, there seem to be a timeout on the ADC1 activation. The register bit ADC_CR_ADEN is set but the corresponding flag ADC_FLAG_RDY never rise.For information, the ADC voltage regulator was successfuly enabled during system initialization (ADVREGEN set to 1, wait for a time, then check that the corresponding flag is risen). Before rising ADC_CR_ADEN, all bits of the register ADC CR is are low (except ADVREGEN = 1). According to the RM for STM32U575, this is the only condition before enabling the ADC.Did I miss something in the reference manual, or in the code? Is there something wrong with my STM32U575 chip?
HelloI'm new to STM32.The name of the board I am using is NUCLEO-F091RC.I am using TureStdio and want to use simple I2C communication.But I get the error in places like MX_GPIO_Init (void).The function is an automatically generated function so I don't know how to fix it.Here is a list of errors:expected declaration or statement at end of inputinvalid storage class for function "MX_GPIO_Init"invalid storage class for function "MX_I2C1_Init"invalid storage class for function "MX_TIM14_Init"invalid storage class for function "MX_USART1_UART_Init"invalid storage class for function "MX_USART2_UART_Init"I have attached my project.Please help me.
i have program like this and from the program i have the output like this (picture) and i used the potentiometer to find the value is AD_RES_BUFFER: the potition of picture is disable of DMA Countinous Request ADC ANALOGbut the potentiometer work (produces value ) if i enable the 'DMA Countinous Request' in stm32cubeMX i used the nucleof334r8 but the value of b and output is 0 (zonk).and if i disable the 'DMA Countinous Request' in stm32cubeMX the potentiometer doesn't work (produces no value if rotated) and only displays value randomly and i dont know from where the value, but i have a value of 'output, b' in watch 1.so i want to enable the 'DMA Countinous Request' and get the value of potentiometer (REAL TIME AND UPDATE ID I ROTATED THE POTENTIO) but i dont know how to set it in cubeMX and prgram the keil.PLEASE ANYONE HELP ME.
Hi guys,I have successfully connected a PCM5102 DAC to my STM32F401CCU6 black pill board. The CubeMX Setup with DMA and I2C works fine. I have interrupt routines and a double buffer which create samples. Electrically, I connected 3.3V supply (from STM32 VCC 3.3 Pin). I configured the 4 config pins so that the DAC works correctly. There is a STLinkV2 connected to the STM32 board, which is also the power supply.My Problem is that the sine wave is completely "swapped", if I try to set a signed value.My settings (CUBE IDE): hi2s2.Instance = SPI2; hi2s2.Init.Mode = I2S_MODE_MASTER_TX; hi2s2.Init.Standard = I2S_STANDARD_PHILIPS; hi2s2.Init.DataFormat = I2S_DATAFORMAT_16B; hi2s2.Init.MCLKOutput = I2S_MCLKOUTPUT_DISABLE; hi2s2.Init.AudioFreq = I2S_AUDIOFREQ_48K; hi2s2.Init.CPOL = I2S_CPOL_LOW; hi2s2.Init.ClockSource = I2S_CLOCK_PLL; hi2s2.Init.FullDuplexMode = I2S_FULLDUPLEXMODE_DISABLE;My synth code looks like this:int32_t sample = s * 0.6 * 0x7FFF - 0x10000;uint16_t sampleL = (uint16_t) samp
Hi All, I am trying to run a code with NUCLEO-U575ZI-Q The tool chain/ IDE is EWARM but the unable to select the latest version of IAR(9.50) The option is available only until IAR version 8.5. When I select generate code and select open project the IAR version 8.5 IDE opens and I will not be able to debug the firmwareI am able to debug the run the firmware when I select open folder and run EWARM from latest version of IAR(9.50)Is there a way to be able to see the latest version on STM Cube MX ?
if i have int angka_test = 10;int a;while (1) {output = output_start + ((output_end - output_start) * (angka_test - input_start)) / (input_end - input_start);a = angka_test;__HAL_TIM_SET_AUTORELOAD(&htim2, output); } why 'a' if i seee form watch is 0, but angka_test=100, help me
Hiya! I'm trying to figure out the clock config for my micro. I'm using ADC3 IN1 currently, and using the internal HSI clock source. Using the default settings, I can't seem to get anything better than 3.3 MSPS, and this is with a 10-Bit ADC resolution. From what I read, I should be able to get around 4 to 5 MSPS! However, that's assuming the ADC is clocked at 60 MHz. By defualt, the ADC clock is divided by 4, so the resulting clock is at 42.5 MHz. Okay! So, I just need to change the divider ratio/or clock it to the PLLP to fix this. However, I can't figure out a good way to get the prescaler to be okay with an async clock mode with a divider less than 4.I've tried changing the PLLP clock divider ratio down to 6, which gives the ADC a clock of 56.666667. Won't let me change the prescaler still, stuck at async divide by 4. Tried a PLLP clock divider of 5, which gives 68 MHz. Still can't change it to lower than 4. And changing the PLLP clock DOES impa
I am using an Ethernet switch with three ports. The first Ethernet port (IP address 192.168.1.206) is connected to a CPU. The second Ethernet port is connected to an STM32H743ZIT6 board, and the third Ethernet port is connected to another STM32H743ZIT6 board. The first STM32H743ZIT6 board (sender) has an IP address of 192.168.1.100, and the second STM32H743ZIT6 board (receiver) has an IP address of 192.168.1.101.In my code Transmit and Receive is not working . please help and give me a solution or hint .
Posted on October 11, 2016 at 12:01Hi all, I just downloaded the STM32CubeMX software from st.com and tried to run it on my Mac, but nothing showed up and I got an error message saying ''missing java runtime environment''. Then I installed the latest java, 1.8, but it still doesn't work. I tried some debug methods, but non worked. Please help. Any suggestion would be appreciated.Thank you #bug-stm32cubemx
I've installed the latest Cube, 1.16.0, and configured a DAC and PWM. The code generated fine but I wanted to add FreeRTOS. So I added it under the Middleware dropdown and it does appear to install. However, when I generate code I do not get any FreeRTOS support. Previously, in 1.14.0, I would see FreeRTOS in the Middlewares directory. Now I don't even have a Middlewares directly and there is not FreeRTOS support in my generated code. Any ideas what is going on here? thanks,Jeff
Hi ST team,I want to generate my own file main.c with freemarker template. I refered to tpl_main_c.tfl and tpl_main_h.tfl for details. I tried to copy these file to other directory then changed the name and use them as the template for CubeMX but I got this error like thisI want to ask where is the declaration of this variable? and why didn't the main file template follow this rule below?
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.