Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Please find the details below:Part - STM32F072VBstm32cube mx for code generationtimer clock - 24MHzstatic void MX_TIM7_Init(void){ /* USER CODE BEGIN TIM7_Init 0 */ /* USER CODE END TIM7_Init 0 */ TIM_MasterConfigTypeDef sMasterConfig = {0}; /* USER CODE BEGIN TIM7_Init 1 */ /* USER CODE END TIM7_Init 1 */ htim7.Instance = TIM7; htim7.Init.Prescaler = 2000-1 ; htim7.Init.CounterMode = TIM_COUNTERMODE_UP; htim7.Init.Period = 1; htim7.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; if (HAL_TIM_Base_Init(&htim7) != HAL_OK) { Error_Handler(); } sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET; sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE; if (HAL_TIMEx_MasterConfigSynchronization(&htim7, &sMasterConfig) != HAL_OK) { Error_Handler(); } /* USER CODE BEGIN TIM7_Init 2 */ /* USER CODE END TIM7_Init 2 */}/** * @brief TIM14 Initializ
I got an interesting bug when working with the queue (STM32CubeMX 5.6.1 + lib 1.25 in STM32F407VGT6):typedef struct{ uint8_t* data; uint16_t len;} message_t;uint8_t str[] = "hello\n"; for(;;) { message_t* message; if ((message = osMailAlloc(ComOutputQueue, 0)) == NULL) { // no action } else { message->len = 6; message->data = malloc(6); if (message->data == NULL) { osMailFree(ComOutputQueue, message); } for (uint16_t i = 0; i < 6; i++) { message->data[i] = str[i]; } osMailPut(ComOutputQueue, message); CDC_Transmit_FS((uint8_t*)str, 6); osDelay(30); CDC_Transmit_FS(message->data, message->len); } osDelay(30); }The ComOutputQueue is declared and initialized.Result:What am I doing wrong?
I have 1.3.1 STM32CubeIDE. When I choose the generation for full assert the tool generates invalid declaration:stm32l4xx_hal_conf.h (r. 427 ->)/* Exported macro ------------------------------------------------------------*/ #ifdef USE_FULL_ASSERT /** * @brief The assert_param macro is used for function's parameters check. * @param expr: If expr is false, it calls assert_failed function * which reports the name of the source file and the source * line number of the call that failed. * If expr is true, it returns no value. * @retval None */ #define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) /* Exported functions ------------------------------------------------------- */ void assert_failed(char *file, uint32_t line); #elseassert_failed is declared as f(char*, unsigned int) and char is signed. In main.c the definition is f(unsinged char *, unsigned int).#ifdef USE_FULL_ASSERT /** * @brief Reports the name of the source file and the so
How to change target device in STM32CubeMX if you need to migrate either up or down or select a different footprint
Target is the Nucleo G474RE board and I've tried both the CubeIDE (1.3.1) embedded CubeMX and the standalone CubeMX (5.6.0) in both cases if you enable the Calibration option and set it to "Calibration 1Hz routed to OUT2" then the signal comes out of the wrong pin. It appears on PC13 (the Nucleo's User Button) not PB2. PB2 is the pin highlighted on the CPU graphic however.
Every time, I regenerate the code after including the above ARM file, I get an error on all source files that states 'incomplete inclusion' - enable CMSIS DSP. I have been getting around this by adding the appropriate ARM DSP libraries manually. It is a little painful and eventually would like this error resolved?
What is new in STM32CubeMX V6.0.0? Added the support of new part numbers in the STM32G4 Series: STM32G491K(C-E)Ux, STM32G491C(C-E)Ux, STM32G491C(C-E)Tx, STM32G491REYx, STM32G491R(C-E)Tx, STM32G491R(C-E)Ix, STM32G491M(C-E)Sx, STM32G491M(C-E)Tx, STM32G491V(C-E)Tx, STM32G4A1KEUx, STM32G4A1CEUx, STM32G4A1CETx, STM32G4A1REYx, STM32G4A1RETx, STM32G4A1REIx, STM32G4A1MESx, STM32G4A1METx, and STM32G4A1VETx Added the support of new part numbers in the STM32H7 Series: STM32H723x, STM32H725x, STM32H730x, STM32H733x and STM32H735x Added the support of one new part number in the STM32F4 Series: STM32F479IIHx Added the support of three new part numbers in the STM32F7 Series: STM32F723V(C-E)Tx and STM32F733VETx Added the support of new part numbers in the STM32L0 Series: STM32L031C4Ux, STM32L041C6Ux, STM32L051C(6-8)Ux, STM32L052C(6-8)Ux, STM32L053C(6-8)Ux, STM32L062C8Ux, STM32L063C8Ux, STM32L071C8Ux, STM32L082KBUx and STM32L083RBTx Added the support of new part numbers in the STM32L1 Serie
Hello, i have got problem with basic project form STM32CubeMX. Help please.This is my project https://drive.google.com/file/d/1nJh5805ZFjzibTgeT_i-kSdNzgrmXk0_/view?usp=sharing for STM32CubeMXI write in SW4STM32 main.c:* USER CODE BEGIN Includes */ #include "lwip/opt.h" #include "lwip/arch.h" #include "lwip/api.h" #include "usbd_cdc_if.h"/* USER CODE END Includes */And I compile the project with "Optimization level -O0" and "Debug level None".I do .dfu file with DfuFileMgr.exe and load program with DfuSeDemo.exe. Successful.Driver Virtual Com Port for STM32 version 2.1.0.Problem: Putty don't open Virtual Com Port. Why is this happening?If you reduce the number of threads the port opens. But this option is not suitable.
When creating a new project in CubeMX for Nucleo-F767ZI LD1 is not initialised and no initialisation code for it is generated. I suspect the reason for this is that on the schematics in UM1974 LD1 is not on the same page as the other user LEDs and is easy to miss.CubeMX version: 5.1.0Firmware version: FW_F7 V1.15.0Expected behavior: CubeMX should initialise PB0 as GPIO output and name it "LD1 [Green]"I also noticed that on page 1032 in UM1905 the function description for HAL_USART_Receive_IT() seems wrong. It says that this function is for receiving data in blocking mode but it is for receiving with interrupt and therefore should not block. This, however, seemed too minor to make a separate post about it.
Hi, has anyone been able to configure maximum clock speed (480MHz per datasheet) for the H743ZI with cubeMX?I can't get the radio button from TIM2_CK to CPU_CK and as such I can't get the PWM resolution I am looking for on the HRTIM. Not my only question... The provided project examples are helpful but none of these examples help with PWM configuration of sync'ed channels. This is for a 3phase motor control project. I have everything up and running fine on TIM1 (CH1/CH1N, CH2/CH2N, CH3/CH3N) but I'd like to transfer PWM to HRTIM for increased resolution (that is if I can setup HRTIM to use the CPU clock).Thanks for your helpCheers
With every new release cubmx is getting slower and slower. At this point it is not usable, after i change some setting i have to wait several seconds ~10sec for the gui to update, and in the time is updating everything is frozen and apparently doing 'nothing'. Older versions work fine, i noticed the newer version i use, the slower it is. Is it just me, or this is how it supposed to work. I have a modern pc, with top specs.
Posted on January 19, 2017 at 19:52I have been using the CubexMX for a few years and have no problems with programming nucleo and discovery boards.I am using Keil IDE.I recently bough the http://www.st.com/en/ecosystems/x-nucleo-iks01a1.html and have some problems with integration it with nucleo-F411.===Starting with the library description and trying to understand all the dependencies seems to be daunting task.I tried it but I found it difficult to solve library dependencies issues. I am not talking about what function to call - it's rather inter library dependencies issues.===Opening already existing example project for F401 and replacing the MCU with F411 gives so many compilation errors so I rejected the idea for now.===I wonder if someone have some experience how to quickly integrate the CubeMX-generated program skeleton with BSP drivers. The goal is to have compilation/linking error free application skeleton.The Getting started document for x-nucleo boards is focused on ge
Hi, I try to use stm32f429 lcd screen. for this i need to add bsp library in my project and then use some .c file like sdram.c lcd.c etc. Can someone explain how can i add this library ?What I'm trying to do is in the video on the link, but he's using Keil.https://www.youtube.com/watch?v=u_TVAudWabIIs there another method for controlling the LCD? Only using cubemx.I just want to print the word alone on the screen.Thank you.
I have a running project that is based on CubeIDE 1.3.1 and it includes FreeRTOS, FATFS, USB_Device and TouchGFX running on F429.After upgrade to 1.4 and regenerate the code based on the project existing IOC I saw that all the interrupt priorities changed from 5 to 0 and the system stopped working. Only after I changed it manually to 5 it started to work again.FreeRTOS is defined with:#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5In the previous CubeIDE version the generated code made the NVIC IRQ interrupt to be depend on that value and all the default IRQ priorities was 5.Any input on that?
I am trying to use STM32CubeIDE 1.4.0. Previously I was using 1.3.0. I was calling the CubeMX, since I wanted to make a change to the configuration. When CubeMX generated the update code, it deleted the entire project. No traces of the project are left, except for the root directory and and an empty directory "Drivers/CMSIS". Why is this happening? Forunately, I made a backup just before I did this, otherwise my entire project would have been gone.
I notice that the code generator of CubeMx output these two lines in the usart configuration code: LL_USART_EnableOverrunDetect(USARTx); LL_USART_EnableDMADeactOnRxErr(USARTx);This happens even if all the "Advanced Features" in the Usart configuration are disabled, including Overrun and DMA on RX Error.However, marking Overrun and DMA on RX Error as enabled, removes the two line of configuration shown above.Doing this exercise with other Advanced Features eg. "MSB First", inserts the enabling code line when enabled in cubeMX which seems correct. The problems occures also on the LPUART.CubeMx version is 4.24.0, and I have Low level code generation turned on for the Usarts.
Hi!I have NUCLEO H743-ZI board, and I am trying to create PWM sequence with advanced timer 1, by utilizing DMA feature.Code is mostly generated by cubeMX.I am using PWM mode 2, Center-aligned mode 1.Code works, untill DMA loads into compare register (TIMx_CCR1 register) value 0, than it hangs.After some digging through HAL code, and manual, I presume this happens because timer stops generating interrupts, which force DMA to load new values into compare register (TIMx_CCR1).My theory is that interrupts are generated when counter gets bigger than compare value, which never happens (lowest counter value is zero, and zero is not higher than zero, thus no interrupt).Now how to resolve this issue…..TIMx DMA/interrupt enable register (TIMx_DIER) has flag „Bit 8 UDE: Update DMA request enable“, but enebling it did not help. Simultaneously I set flag „Bit 0 UIE: Update interrupt enable“, but to no avail, I am still stuck…..Did anyone came across this problem, and how was it resolved?At this mom
Hello all,I downloaded the X-CUBE-CLASSB library from the ST website and I'm stuck trying to integrate it into a project. The same issue has been discussed in 2017 in this thread with no solution: https://community.st.com/s/question/0D50X00009XkXsFSAVUnfortunately, I already had to learn that this library can not be used with the CubeMX code generation tool and has to be integratedmanually.Does someone have a solution? The documentation is no help and only explains all library functions.Thank you in advance!
Hello, I am putting together a project for STM32H7 and lwip, using STM32CubeMX and Atollic TrueStudio. I am aware that to make the project work I have to modify the .ld file and bring the data for the .lwip_sec into RAM_D2. However, the .ld file generated by the STM32CubeMX does not contain a .lwip_sec. I attach the .ld file to this post.This is a strange problem, I have no idea how to solve this. I appreciate any help. Thank you in advance. Best regards, Vouria
Hi I have a STM32F334R8 Nucleo board on which I need to enable SPI. Sadly, CubeMX is greeting me with a conflict between the user LED and the SPI dedicated pins.Is there a work around that doesn't involve physically unsoldering the LED?thanks
Hi There,I have been working on NUCLEO-H743ZI2 and trying to open with KEIL IDE but it direct me to use STM32CubeMX . what would be the main reason?I'm adding error message to here.thanks and best regards for your support.
With the latest version of CubeMX (Version: 6.0.0-RC5) there is a reported error with ADC configuration. I will attached the preferred configuration below. The problem is that the latest version will not let me select ADC2, see attached configuration, for 'DMA Circular Mode'. ADC1 is ok but for some reason CubeMX will no allow ADC2 to be selected as 'DMA Circular Mode'. I can only select DR or DFSDM Mode - not circular!
(Sorry CubeMX)Anyway. I've downloaded en.x-cube_classb.zip and sbsfu, and en.x-cube_mems1.zip and I've never managed to convince Cube to pull them in.When I try (no documentation as to how) with <Help><Manage embedded software packages><STMicroelectronics><From Local...> I get:This Package version is not managed on this version of STM32CubeMXThis is with Cube V.5.2.1, but I couldn't get it working with version 4 either.Any pointers to how to install the extensions?ThanksAndrei (from the Great White North)
Hi everyone, I have problem when i try to change GPIO inform then i push "generate code". But it replace my old code.can you let me know how to only update inform for code not replace old code?thanks you and sory about my poor english!
I have been using CubeMX to generate HAL libraries and made use of simple makefile option. I realized that makefile is based on GCC and what should I do to make use of clang instead of GCC and compile the project?
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.