Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hello,I've got a STM32H745BI on custom board and I cannot get it working. The program always jumps to the error handler at while((__HAL_RCC_GET_FLAG(RCC_FLAG_D2CKRDY) != RESET) && (timeout-- > 0)); if ( timeout < 0 ) { Error_Handler(); }I've found in the reference manual that D2CKRDY is D2 domain clocks ready flag, so it's probably some sort of clock issue. I'm using the internal oscillator. What could be wrong? Thanks :)
..
Hiii guys, RT-Thread Studio IDE v2.1.0 is out now. Thank you to you all who made this release possible. In this release: - 20+ New ST boards are supported. - RT-Thread Studio is now in collaboration with STM32CubeMX, where you can open CubeMX Settings directly in RT-Thread Studio. - v2.1.0 has added two simulators for the stm32f401 and the stm32f410 series respectively and enhance the QEMU debug configuration parameters, and the configuration interface has also made some updates.Check out more in Release Note: https://bit.ly/2PeOnJeFree Download RT-Thread Studio: https://www.rt-thread.io/studio.htmlPlease share your feedback to help us improve!
With the SW generated by MX as example I have a timer that seems to work, but not a signal on PC7.
Using the latest CubeMX 6.2.1 and STM32H7A3 I try to accomplish, one would think, a very simple task: filter data from ADCs using DFSDM.Objective: capture N samples (conversions) on demand (e.g. button press) from several ADC channels, smooth edges with DFSDM and analyze - just like oscilloscope 'single run' or ADC Conversion Data Management = DMA One Shot Mode but for DFSDM.After several evenings of trying and failing I found configuration that may work. I call:HAL_DFSDM_FilterRegularStart_DMA(...);HAL_ADC_Start(...);and HAL_DFSDM_FilterRegConvCpltCallback() gets called repeatedly, the buffer seems to contain some data.Problems:On DMA callback the data in the buffer is exactly the same at least three times in a row. It seems that DMA does not actually copy new data. It is next to impossible that 8 active ADC channels produce exactly same conversion results three times in a row (FOSR=1, IOSR=1)DFSDM+ADC concept is unclear at best. RM0455 33.4.6 (Parallel data inputs) covers the whole s
Hi, I am struggling to make QSPI+Ext Flash and DMA to work for several days, but having issues.I was using BSP library for both external SDRAM (with FMC) and Flash with QSPI.However, BSP library had DMA read/write for FMC SDRAM, but not for QSPI Flash (why?).BSP_QSPI_Read worked nicely, but it was slow, so I wanted to make DMA work.My board is stm32f7508-DK.Below is what I tried:Using STM32CubeMX, I enabled DMA for QSPI. Proper code was generated under HAL_QSPI_MspInit and it was using DMA2_Stream7. I will not paste the code for brevity.However, weirdly, the generated code did not contain code to enable the DMA, e.g., HAL_NVIC_SetPriority() or HAL_NVIC_EnableIRQ(). Why is this the case? Anyways, I tried manually adding those calls as well, which did not work - though the mode of error changed.I naively changed the HAL_QSPI_Receive() call in BSP_QSPI_Read to HAL_QSPI_Receive_DMA().I added a handler for DMA2_Stream7 in stm32f7xx_it.c/h.I will try to write down different mode of errors th
I am currently using Linux and compiling my project using my own Makefile, with libraries generated via STM32CubeMX from my Windows machine. I am trying to use CMSIS's arm_mat_mult_f32() function but it is not working. I suspect I am passing the wrong compilation flag, but am not sure what I am doing wrong.I am using STM32F7508-DISCO board. Below are my (what I think are relevant) compilation flags..-mthumb -mfpu=fpv5-sp-d16 -mfloat-abi=softfp -mcpu=cortex-m7 -DSTM32F750xx -DUSE_HAL_DRIVER -DARM_MATH_CM7 -D__FPU_PRESENT=1 (-DARM_MATH_DSP)I had to add -DARM_MATH_CM7 and -D__FPU_PRESENT=1 to make it compile, but maybe I am adding something I shouldn't be adding. I tried both with and without -DARM_MATH_DSP but it does not work.Especally, I go into hardfault handler while running arm_mat_mult_f32(), especially when (I think) running this inst: vldr s14, [r4, #-12]I am not sure if I am passing the wrong flags, and if so, what is the right flag for my board. (1) what is the right flag for m
The SPI rate is at 21MBit/s and I use STM HAL.Data rate is high and I receive up to 1 message all 3ms. After I tested my application I wanted to port it to a G4 to use a cheaper microcontroller. When using the same code on the Nucleo G474RE and G431RE the SPI connections is not working correctly. After a short and irregular period the SPI interface delivers wrong values. As example I read 2 bytes RSR register of the Wiz5500 and receive a value around 65000. The value in the RSR register can not exceed 2048 because it is the buffer size. For G431RB I changed the clock multiplier after PLLM from x85 to x84 and APB1 + 2 Presclater to get the same clock values then F429ZI but the error is still there. Attached are the settings of SPI1, CS_Pin and Clock Config for both microcontrollers. I checked the wiring three time and I am quite sure that this is not the problem. F429ZI Clock SettingG431RB Clock Setting F429ZI SPI1 Settings and Pins G431RB SPI1 Settings and Pins I think t
Hi there,Trying to use an STM32H723 MCU (as that's the cheapest thing right now that seems available with Ethernet, yay semiconductor shortage...)For some reason it's coming up with "STM32CubeMX cannot load this Mcu".Is there a beta/update I can download?Is there another MCU I can 'pretend' to be to access configuration options?Are these actually stable, usable MCUs which will be/are supported or should I use an older MCU?Seems weird to have them on sale and yet have no software support.Max
Hello,I am trying to generate a PWM signal with the help of several guides from internet that ultimately contain the same thing, but it does not work, I'm doing something wrong, but I cannot see what. As a result, I only see a zero line in the display of a digital analyzer.I have included the most important settings in the appendix below.With the values for Prescaler = 2399 I would like to achieve a timer clock of 100 kHz and for Period = 1999 a PWM frequency of 50 Hz. However, it is not entirely clear to me what the change in Pulse does. Is it the duty cycle?The code is very simple:... int main(void) { /* USER CODE BEGIN 1 */ uint32_t br; /* USER CODE END 1 */ ... MX_TIM3_Init(); ... /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ br = 1000; pwm_setValue(br); HAL_Delay(100); } /* USER CODE END 3 */ } ... static void MX_TIM3_Init(void) { /* USER CODE BEGIN TIM3_Init 0 */ /* USER C
I am trying to generate code using stm32cubeMX. During code generation pop-up appreasres and shows the following error.Error downloading files:stm32cube_fw_h7_v180.zip(cannot unzipped)
So the above pic shows SAI_1 configured correctly with 3 Microphone Pairs, on the STM32CubeIde. The pins are appearing in the GPIO.For this one, I am trying to use 2 Microphone Pairs, but it won't let me change microphone pairs from 3 to 2. This is causing the GPIO to not turn green, they keep saying no mode.I understand the SAI_1 & SAI_2 D2 pin are connected to the same pin, which means only 5 pairs of microphones can be used at a time with the two PDM interfaces. My main question is, is this a glitch in the STM32CubeIde? I can easily change the automated code to suite my needs, I just want to make sure its not something else wrong. Thank you for reading this!
Hi,after new installation of CubeMX and CubeIDE i have some troubles to install mcu packages with CubeMX.After configuration with CubeMX, i want to generate the code and install the regarding mcu package in the default Repository folder. At the end of download and unzipping the package i got the error message that the target directory already exists.However, the .zip package was downloaded to the folder but not unzipped.Now I have unzipped the package and copied it directly into the repository folder. After that I start code generation again and now it seems that it works.Can someone give me a hint as to what the problem is?
I have a Keras model and topology. It works in version 5.2.0 but shows an error in version 5.0.0 as shown below. May i know how i could resolve it?
:(
Hi, We are using a STM32G071GB uC, and have created an application using STM32CubeMX 5.4.0 (project file is attached).When using the go command to jump from the built-in bootloader to the user application, HAL_RCC_OscConfig() called by SystemClock_Config() fails:void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {0}; RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; RCC_PeriphCLKInitTypeDef PeriphClkInit = {0}; /** Configure the main internal regulator output voltage */ HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1); /** Initializes the CPU, AHB and APB busses clocks */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; RCC_OscInitStruct.HSIState = RCC_HSI_ON; RCC_OscInitStruct.HSIDiv = RCC_HSI_DIV1; RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; RCC_OscInitStruct.PLL.PLLM = RCC_PLLM_DIV1; RCC_OscInitStruct.
Hi,When I am generating Code with CubeMX, it will delete my complete Src folder. I always have to recover it. For that reason it will also not generate any new c files once i add a new peripheral.Tried this on Mac and Windows with latest CubeMx version (4.26.1) and i get the same behaviour in both.Can anybody help?Thanks
I saw that this issue was reported back in 4.* days, but I'm experiencing this now with 6.1.1. The Core/Src folder is removed even though Core/Inc files are regenerated.Is there a version that is known to work?
stm32cubeIDE deleting SRC folder, im posting this after it deleted my 2nd project i always update stm32cubeIDE , cube mx on day 1 itself,it is not deleting while i developing , only completed project getting deleted, i only noticing it when i open project folder for later use, only inc, startup folder available ... tried many recovery software to recover no luck, (note: i duplicate older project to develop new one like template, i started from STM32CubeIDE 1.2.0 now currently using STM32CubeIDE 1.4.1)please add auto backup core folder feature in later release
As far as I understand the sample type options available in Cube MX simply waits for the number of clock cycles after the completion current conversion. In STM32h745 the sampling rate is as low as 1.5 clock cycles but I do understand the its the wait time after which the next conversion to start in polling method 1.5 clock cycle works fine but I am sure I can not accomplish highest sampling rate from that.But when I did the same thing by making use of Interrupt and DMA the STM just stops working even in debugger mode the same issues is followed.Is STM bluffing about there High speed ADC if not then why I am unable to use 1.5 clock cycle settings. As far as I understand the the ADC generates more interrupt frequently and this makes very hard when other programs are running along with ADC. I remember one of my program works only when the sampling time is greater than 64.5 clock cycles I thing I was using 8 channels from one ADC module.
I'm confused regarding the importance of Quad-SPI for Ethernet communication. I see that pins PH2/PH3 were configured for QSPI without it being activated for either core. I tested leaving these pins in GPIO_Analog mode and still detected UDP broadcasts from the example code. Are these Quad-SPI pin configurations optional? How to create project for STM32H7 with Ethernet and LwIP stack working
Hi,I want to generate LL based flash module. but i can't generate it from cubeMX.My overall system operations are based on LL.In cubeMX there no option for it.Can you suggest for it, or have any alternative way for it.Thanks Akshay Patil
In studying "stm32f0xx_hal_tim.c" I came across this: case HAL_TIM_PERIOD_ELAPSED_CB_ID : htim->PeriodElapsedCallback = HAL_TIM_PeriodElapsedCallback; /* Legacy weak Period Elapsed Callback */ break; It says "legacy". This implies there's a new-and-improved way. Where do I find this information?Thanks.
I have installed STM32CubeIde 1.6.0 and STM32CubeMX 6.2.0 on my Win7 64 bit PC using all the defaults and administrator rights. i have downloaded the MCU package and I am trying to run one of the projects from the Repository. The training video suggests navigating to the .project file and selecting this will invoke the STM32CubeIde? However all this does is give me an error message 'STM32CubeIDE (project importer_.exe - System Error, The program can't start because the api-ms-win-core-path-l1-1-0.dll is missing from your computer. Try reinstalling th program to fix this problem'. I have reinstalled the IDE and also run the windows system file checker, but that didn't find a problem. After messing about for a couple of days i have made no progress! I then thought it could be an issue with my PC, so i installed it on another Win7 PC and got exactly the same issue. After I ok the first error message it pops up another' Error loading Python DLL ... python39.dll. i assume this is related to
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.