Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I set up USB host in Cube MX. The STM32L476 hardware to the USB is connected the same as I have successfully used previously in an F4 processor. I am using pin PA8 to drive the power switch (STMPS2141STR)Under "Connectivity", the mode is "Host Only". VBUS_Sensing is activated (although this did not seem to matter) The SOE and SOF boxes are not checked. Under "Middleware", USB_HOST set up for BSP "Drive VBUS_FS" is GPIO_Output, and I selected the PA8 pin "Found Solutions" I then generated the code, and among other additions of code, it placed a call in main while(1) loop: MX_USB_HOST_Process(); Right after that, I placed a call: "HAL_Delay(1000)" so the output of a printf could be seen.What is happening (or not): software does not appear to detect the connection when I plug in a USB stick. In the module "usbh_core.c" there is a function "USBH_Process(USBH_HandleTypeDef *phost)". Just before the switch statement, I placed a printf:printf("state = %i\n", phost->gState);I started w
Hello,Controller STM32F302C8T - 48 pins. I tried to config USB as CDC with STM32CubeMX version 5.0.1 and USB CDC doesn't work. STM32CubeMX doesn't setup USB-pins as additional functions or alternative functions. How I can setup USB-pins? And how is correct to setup USB-pins as additional functions or alternative functions?BR, Eugene.
Hello STM,when I generate a project for STM32H750 with CubeMX 5.1 with Toolchain SW4STM32 selected, CMSIS DSP library is missing from the project and it does not compile. Also, a preprocessor define of__ARM_ARCH_7EM__=1is missing to specify the ARM Architecture, which leads to missing gcc intrinsics in cmsis_gcc like __SSAT and the likes.
i am using stm32f4 discovery board and had generated freeRTOS software timer through cube MX so its seems osKernelStart(); does not get start
I need to convert group of channels in scan mode. I've selected 4 channels in CubeMX GUI and specified this number in the 'Number of conversion' field. Then generated code in LL mode. In the initializer MX_ADC1_Init() i see ADC_REG_InitStruct.SequencerLength = 4So, the parameter ADC_REG_InitStruct.SequencerLength is filled with plain number of channels to convert. This structure is passed to LL_ADC_REG_Init(), which calls LL_ADC_REG_SetSequencerLength(), which expects a value of ADC_LL_EC_REG_SEQ_SCAN_LENGTH, not plain number !CubeMX version 5.0.1.
At the time I re-generates the code in CubeMX, the Flash ID file is emptied and i have to copy it from a previous version or a copy out of my code directory.The first time that the code is generated it works properly, and it can be compiled as usually.I'm loading the basic CubeMX configuration for NUCLEO-144 STM32F746ZG with LWIP libraries activated, and Eclipse IDE for C/C++ Developers Version: 2018-12 (4.10.0) with the latest revision of AC6 system workbench.I'm using latest version (V 5.1.0) of CubeMX to generate my code.Thanks in advance for your response and support.
..
Hi,What is the maximum frequency that the APB buses on the STM32H743 can be run at?In CubeMX's Clock Configuration page when trying to configure the APB bus frequencies, there is a note on the APB clock that its maximum frequency is 100MHz. CubeMX also enforces this constraint and will not allow me to set the bus frequency on any APB to more than 100MHz. However, I can't find any information about this anywhere in the reference manual, nor the datasheet, so I am not sure what the maximum frequency actually is.I am aware that it is possible to run the timer peripherals which use the APB clock as a clock source at a higher frequency than the APB clock, but I would like to know what the maximum bus frequency of the APB itself is.Best,Cindy
Hello,I'm currently trying to get a SD card running on a Nucleo-L476RG in SDMMC (SDO) mode. Unfortunatelly I had a problem for days now and just found out, that this is a known bug already posted nearly one year ago. For this topic, please see here: https://community.st.com/s/question/0D50X00009XkY9GSAV/bug-in-hal-sd-driver-codeI can confirm, that this error is still there, using the newest CubeMX 5.1.0 and the STM32Cube MCU package for STM32L4 Series in Version 1.13.0Is it possible to say, when a version with this error fixed will be released?Best regards,Christian
I have DMA, MDMA and BDMA configured for an STM32H742ZIT6. After upgrading CubeMx to Version 5.1.0, the generated main functions only calls two of the three generated DMA init routines.This issue can easily be reproduced by creating a new CubeMX project and configure BDMA (MEMTOMEM), DMA (also MEMTOMEM) and MDMA (SW request). Then generate code and inspect the generated file main.c. The previous version of CubeMX generated MX_BDMA_Init(), MX_DMA_Init() and MX_MDMA_Init() and all three were called from within main(). The new CubeMX still generates all three init function, but only calls two of them:... MX_DMA_Init(); MX_BDMA_Init(); ... If I remove the configuration for DMA or BDMA, the call to MX_MDMA_Init() reappears.Is there any explanation for this behavior?
Hello,I am using CubeMX version 4.27.0 and trying to customize the code generation. My project is configured as a Makefile project.First I tried to use the .extSettings file to make minor modifications to the generated Makefile. Nothing worked as advertised. Adding the [Groups] section to the file did not create a new group of files but rather appended the source files to the C_SOURCES list. Added the [Others] section and attempted to add a new define. This was ignored. I did not try to modify the HALModule options.Then I tried to generate a sample.h file following the instructions. This did not work. The file was stripped down to the bare bones to avoid any possible file generation issues. It still did not work. The file is attached for your reference. I also tried copying the file into the templates directory vs. the extra_templates directory. It still didn't work.As an extra precaution, CubeMX was restarted prior to each new test. This is a very cool feature I would like to use but
STM32F405:
Tested with STM32CubeMX 5.1.0, 5.0.1, 4.27.0: I open the Embedded Software Packages Manager and click on a new firmware to install, press Install Now. The Download fails for unknown reason (network overload?), thats okay. See attached picture. But, when I close the Error Message Box, the Progress Message Box stays open with all buttons deactivated. There is no way out, I have to kill STM32CubeMX using the task manager :(
My MCU is stm32L432kc, it has two serial ports 1 and 2. But I'm wondering if I can use the same serial port1 only to communicate with two modules (not on the same Tx & Rx pins but 4 different pins) ? Is there anyway I can in the software communicate with one module then disable the communication and communicate with the other?I tried connecting both but one of them never works unless I remove the Serial definition of the other.I attached a pic of my MCU with pins functions described
After upgrading STM3CubeMX to Version 5.1.0, I started to encounter the Code Generation problem. Even after upgrading Keil uVision to Version V5.26.2.0., the problem is still persist.
If Makefile is set as output Toolchain/IDE on STM32L1 (specifically STM32L100C-Discovery board, STM32L100RCT6 onboard), CubeMX generates invalid (unparsable) Makefile. In my case, this were project settings:Generated Makefile has a missing '\' (and duplicated entry) at the line 122 :# C includes C_INCLUDES = \ -ICore/Inc \ -IDrivers/STM32L1xx_HAL_Driver/Inc \ -IDrivers/STM32L1xx_HAL_Driver/Inc/Legacy \ -IDrivers/CMSIS/Device/ST/STM32L1xx/Include \ -IDrivers/CMSIS/Include # missing '\' -IDrivers/CMSIS/Include Can someone please check what is going on? Thank you!
My environment is NUCLEO-F446RE and TrueSTUDIO / STM32CubeMX.On Microchip PIC32MX's framework(MPLAB Harmony), it can make a custom usb device as "Vender".On the other hand, STM32CubeMX has only options for custom HID and virtual COM devices so I can't define the original device. This is an example of a simple WinUSB device demo descriptor output by the microchip framework./******************************************* * USB Device Layer Descriptors *******************************************/ /******************************************* * USB Device Descriptor *******************************************/ const USB_DEVICE_DESCRIPTOR deviceDescriptor = { 0x12, // Size of this descriptor in bytes USB_DESCRIPTOR_DEVICE, // DEVICE descriptor type 0x0200, // USB Spec Release Number in BCD format 0x00, // Class Code 0x00, // Subclass code 0x00, // Protocol code USB_DEVICE_EP0_BUFFER_SIZE, // Max packet size for EP0, see system_config.h 0x04D8, // Vendor ID 0x0053, // Product
Dear Members,I tried to run STM32CubeMX 5,but when I selected MCU Selector, it's frezeed there...What's wrong with it ?Thanks
Hello,I am working on a project for a STM32F767NIHx. I am using the STM32CubeMx tool and validating using RM0410. The problem I am having is that the i2c4_tx peripheral is not listed in dma1 stream5 on page 248 of the reference manual. CubeMx, however, gives dma1 stream5 as an option for the i2c4_tx. If I had to guess, I would say that the reference manual is wrong here and dma1 stream5 channel2 should actually be i2c4_tx instead of i2c4_rx, but I was wondering if someone could verify this for me.Thank you very much for your assistance.
Posted on March 29, 2018 at 22:22I am using the latest TrueStudio with a project for STM32L452 created using the latest STM32CubeMX.The created project contains both a debug and a release build. When I set the debug as active and look in one of the files that contains conditional compiles based on the compiler (core_cm4.h) I see that the lines for __GNUC__ are not grayed out. So obviously that compiler is defined somewhere.However when I set the release build as active and look at that same file, all the conditional statements based on compiler are grayed out, and the final 'else' for 'unknown compiler' is the one not grayed out. So clearly __GNUC__ is not being defined anywhere.Also, when I go to the build settings and select the release build I see a warning at the top that says 'Orphaned configuration. No base extension cfg exists for com.atollic.truestudio.exe.release.1518366166'. I don't get that when I select the debug build.So, what does that warning actually mean, and why is t
Hi I am using STM32Cube V1.0 , version 4.24.0 along with Atollic TrueSTUDIO® for STM32 V9.0. Within Cube I created the project with USB, and created the source code. When I try and compile it I get a bunch of HAL errors, HAL_init() undefined and a bunch of HAL_RCC... commands undefined. I havent done anything different as I have done than creating other projects , straight forward. The .h files seem to be there. Has anyone else have this issue, or know what I have done wrong? ThanksScott
When I try to set up quad SPI with dual bank on an STM32H7, I get the following message: "You must select a ChipSelect signal for Dual bank mode first"This is true even for a blank project with nothing else assigned. I don't see anywhere available to select the chip select lines.
Hi, Im using stm32f1 serise and today updated my cube mx so now version is 5.0.1I just found that can init code is several changed,but it's some kind simple missing errorin main, static void MX_CAN_Init(void) { /* USER CODE BEGIN CAN_Init 0 */ /* USER CODE END CAN_Init 0 */ /* USER CODE BEGIN CAN_Init 1 */ /* USER CODE END CAN_Init 1 */ hcan.Instance = CAN1; hcan.Init.Prescaler = 3; hcan.Init.Mode = CAN_MODE_NORMAL; hcan.Init.SyncJumpWidth = CAN_SJW_1TQ; hcan.Init.TimeSeg1 = CAN_BS1_8TQ; hcan.Init.TimeSeg2 = CAN_BS2_3TQ; hcan.Init.TimeTriggeredMode = DISABLE; hcan.Init.AutoBusOff = DISABLE; hcan.Init.AutoWakeUp = DISABLE; hcan.Init.AutoRetransmission = DISABLE; hcan.Init.ReceiveFifoLocked = DISABLE; hcan.Init.TransmitFifoPriority = DISABLE; if (HAL_CAN_Init(&hcan) != HAL_OK) { Error_Handler(); } /* USER CODE BEGIN CAN_Init 2 */ /* USER CODE END CAN_Init 2 */ }but in stm32f1xx_hal_can.h,typedef struct { uint32_t Presca
HelloI m using STM32CubeMX 5.1.0 with STM32CubeF1 Firmware V1.7.0 09-October-2018I try to generate the LL for use USART1 and USART2 over STM32F103RCT6, when the Cube generated the code I have the follow problems LL_USART_InitTypeDef (undeclared identifier) LL_GPIO_InitTypeDef (unknow type name)GPIO_InitStruct.OutputType ====> OutputType no member namedUSART_InitStruct.BaudRate ====>Undeclared identifierI m include 2 screenshot the first show the error message and the second is a little error in creationof the headerany idea how fix this issue???
My project work fine with STM32CubeMX v5.0.1.I upgraded to v5.1.0, It generated code miss something.My project detail: stm32f103cbt6 + freertos,SYS -> Timebase Source: TIM1-----Generated code stm32f1xx_it.c missing a line: HAL_TIM_IRQHandler(&htim1);when i use "SYS -> Timebase Source: TIM2", it's OK.
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.