Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Using Windows 7, 64 bit. Installed Keil uVision5 first and can run. Install of STM32CubeMX had no issues but can't run the application. Have updated Java, uninstalled CubeMX and reinstalled CubeMX and getting the same message. Not sure about editing the registry -- don't want to screw it up. Any help would be great. Thanks!
MCU: STM32F303RETxFirmware: STM32Cube FW_F3 V1.10.0In TIM15 -> Mode -> Combined Channels it is not possible to select XOR input on TI1:In the reference manual (RM0316) at page 685 you can see the XOR input:And at page 720, the register TIM15_CR2[TI1S] description:So I suppose that there really is the possibility of activating the XOR input for TI1 of TIM15, but the possibility of doing it in STM32CubeMX is missing. Maybe a BUG?RegardsAndrea
Using MX 5.0.1 and create a new project "PrjA" for STboard STNM32F401 Nucleo. No changes or configs. Then generate code and open in TrueStudio. Compilation fails because of: ..\Drivers\CMSIS\DSP_Lib\Source\FilteringFunctions\arm_fir_decimate_init_q15.c:41:22: fatal error: arm_math.h: No such file or directoryBut the arm_math.h is existing in the folder C:\STM32\PrjA\Drivers\CMSIS\Include.Is that normal that I have to add a library path to a MX generated project to compile without error?Then I try to add this path to the project / properties / Includes or Library Paths and get even worse compilation error missing include files.
Hi. Why the option for LWIP is disabled on, STM32CubeMx v4.27, for the STM32H743? And, when using the STM32F207, the option MBEDTLS turn disabled when LWIP is selected and vice-versa? Can't both be used simultaneously?Thanks in advance.
The program is alternating between two modes, one is high performance and the second is low power. For perfomance mode the ADC is used with a timer triggering and DMA+interrupt at fast rate. In the low power mode it is intended to make a single conversion triggered by software on a very slow pace. The clocking is also different. Now I am using custom code to switch peripheral configuration between the two modes. I Would like to use CubeMX for both, in the cleanest possible way. Any good experience to share? Thanks!
If I have done two different project using different peripherals, how can I import the peripherals settings contained in project #2 into project #1?If for example in a project I have configured some timers to perform a certain function. Then in another project I set up other timers to perform another function. Then I need to do both of those functions, so I have to merge the configurations contained in the two projects to create a new one. Made myself clear?Andrea
Hi everyone.Up to now i have been programming STM32 mcus at register level but i have to use cube mx now. So i created a cube mx project only to see if timer 2 works fine. When i build without any problems and run the code on my F303RE board and pause i see program pointer shows at the least function call before while(1) loop which in here is "HAL_TIM_PWM_Start" function. I didn't understand why this problem occured. Can anyone please help me? Below is my simple code. Thank you.#include "main.h"/* Private includes ----------------------------------------------------------*//* USER CODE BEGIN Includes *//* USER CODE END Includes *//* Private typedef -----------------------------------------------------------*//* USER CODE BEGIN PTD *//* USER CODE END PTD *//* Private define ------------------------------------------------------------*//* USER CODE BEGIN PD *//* USER CODE END PD *//* Private macro -------------------------------------------------------------*//* USER CODE BEGIN PM *//* U
Hello, i have a some problem with CAN_BUS on stm32f13c8t6 under CubeMX. I used example from CubeMX for init and transmit. Under debug stepper in AddTxMessage function, i see HAL_CAN_ERROR_PARAM, HAL_CAN_ERROR_NOT_INITIALIZED. It is bug or i have error in code?Sorry for my english. source file in attach. thanks for a halp:folded_hands:
I am having a strange problem with FreeRTOS in CubeMX, I cannot get multiple tasks to work concurrently. I use the following procedure -Pre: Check STM32Cube_FW is fresh (v1.9.0 used)Open STM32Cube V1.0 (v5.0.0 used)New Project -> 'Access To MCU Selector'MCU -> 'STM32F091RC' -> 'Start Project' (sel STM32F091RCTx)SYS: Timebase Source - TIM17FreeRTOS: EnabledAdd Task: myTask02 with defaultsGenerate CodeFor the example above myTask02 fires but the defaultTask does not, what am I missing to get both working? This has always worked for me before, what is wrong now?
Hi,i am trying to implement my mcu (stm32f407IG) as a composite device with USB FS. I want to use CDC+HID or more how can i implement that with CubeMX ?Are there any examples about that?Thanks for your help.
Hello, I am debugging a board which contains the MCU - STM32L4R7VI6 and an HYPERRAM IC connected to the OCTOSPI2 port on the MCU. While generating code on the STM32CUBEMX the tool generates the following code snippet at the bottom of the OCTOSPI_INIT function. sMemMappedCfg.TimeOutActivation = HAL_OSPI_TIMEOUT_COUNTER_DISABLE; sMemMappedCfg.TimeOutPeriod = 1; if (HAL_OSPI_MemoryMapped(&hospi2, &sMemMappedCfg) != HAL_OK) { Error_Handler(); }HAL_OSPI_MemoryMapped should not be initialized here and will execute the Error_Handler() 10/10 times since the sMemMappedCfg array isn't fullfilled at this point. It should be initalized in the main function according to the AN5050 OCTOSPI application PDF when the OCTOSPI2 port have been set to MemoryMapped. This is done in the main() function before HAL_OSPI_MemoryMapped () is called. So every time I generate code using the CubeMX tool I have to delete the snippet of code in the OCTOSPI_init() function. I found another issue where the
When checking "Set all free pins as analog ( to optimize the power consumption )" a previously not clocked GPIO port is clocked. Wouldn't the optimal setting be not to start any unused GPIO ports ?STM32CubeMX 4.99.7-D25STM32L4xx
Hello!I have upgraded to version 5. Can anybody tell me where the generator command is gone? It used to be directly in one of the 3 menus as far as I remember, something like generate code or something like that.Thanks!K
Hi.I have the latest STM32CubeMX with a STM32L433 project.I have selected in CubeMX Advanced Settings to use "LL" drivers for TIM1 & TIM2, and the option to "Not Generated Function Call" for these timers.As expected, In the auto generated main() there is no call to functions "MX_TIM1_Init()" and "MX_TIM2_Init()", but the functions are still automatically being defined in main.c. I can manually remove the init functions, but they are added back.How can CubeMX be configured to not include these function definitions?Thanks.
Minor bug, CubeMX v4.27.0.How can the Makefile retain the -Og flag I set, as opposed to Cube defaulting the value to -O3 each time I regenerate code?
Hello,I searched in cubemx where to change the default value of gpio pins, but couldn't find it.Does anyone knows ? In generated code, all output gpio are set to 0, for example :HAL_GPIO_WritePin(GPIOK, SW_LED1_Pin, GPIO_PIN_RESET);Thanks,ranran
Hi,I'm new STM32L072 (Discovery Kit) and I had generated a code to run the RTC using the LSI Clock and displaying the values via UART2 but the RTC values are not incremented even if rest button is pressed, Then I deactivated the calendar and observed the values via UART2 and the output is same but when i reset the board then RTC value is getting updated as shown in below, please anyone suggest me to solve the issue.Thanks & Regards,Vijay Rakesh.
Pretty frustrating experience so far. I have seen many people asking but no-one has a straight answer. Very simple question, these are my steps:1- Started Cube32MX, selected NUCLEO and reset all no essential pins. See photo. 2- Clock configuration is set to 96MHz. Trying to set clock to 400MHz creates a never ending searchThis is just one of several dead-end headaches I am experiencing after migrating from L4 to H7. Can someone from ST please make an honest comment on this.
For my CubeMX application on the STM32F091RC we are trying to setup an active external clock source. We do this by selection 'BYPASS Clock Source' for 'High Speed Clock (HSE) Mode', correct?Seems confusingly simple, I wanted to ask here before researching further in the Reference Manual and Datasheet.
I could not find direct definition for the RCC mode options in CubeMX, are these correct?RCC Mode Options:'Disable' - External oscillator disconnected'BYPASS Clock Source' - External active clock source'Crystal/Ceramic Resonator' - External passive oscillator connectedIs this correct? I assume so, just wanted to be safe for confirmation :)CubeMX Loc: 'System Core->RCC->RCC Mode and Configuration->Mode->HSE&LSE'
Used to make source code for USB FS Virtual Com, the computer can't connect the device。Same way on STM32F407 chip, it is OK.Is there somebody can help me? Thanks!
I set up DMA with USART in CubeMX 5.0.1 but it is not working correctly....When callingHAL_UART_Receive_DMA(&huart1,USARTBuffer,10);Only the first [0] field of my array changes and contains a received char. All other fields stay untouched. After that I can do what ever I want, DMA seems not to work until I reset. Than I get once again only one char.What am I doing wrong?Contents of my usart.cUART_HandleTypeDef huart1; DMA_HandleTypeDef hdma_usart1_rx; /* USART1 init function */ void MX_USART1_UART_Init(void) { huart1.Instance = USART1; huart1.Init.BaudRate = 9600; huart1.Init.WordLength = UART_WORDLENGTH_8B; huart1.Init.StopBits = UART_STOPBITS_1; huart1.Init.Parity = UART_PARITY_NONE; huart1.Init.Mode = UART_MODE_TX_RX; huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE; huart1.Init.OverSampling = UART_OVERSAMPLING_16; huart1.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; huart1.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; if (HAL_UART_Init(&
Hello.I´m using a SMT32F427ZTGx. I have generated the code with CubeMX and compiled it with Keil 5.USB communications from the PC to the board work correctly but vice versa no. Some of the messages from the board to the PC are lost. Using a port sniffer tells me that the message is lost by a USBD_STATUS_XACT_ERRORCan someone help me?Thank you.
We have a new board with seven STM32H743 onboard. One is used as SPI-master, the other 6 are SPI-slaves. Clock speed is set to 25MHz. When communicating to the slaves, 3 of them return wrong data after a few seconds. The initialisation code for the Slaves is the same Source code. Is was created by SMT32CubeMX V5.0.SPI is set to 8Bit data, CPOL High, 2nd Edge, Pin speed is set to very high.The SPI configuration is as follows: Slaves are connected to SPI1, SPI2, SPI 4, SPI5 and SPI6 of the master unit. SPI6 is routed to 2 processors and will be selected using the CE pin.We are wondering what could cause the failure of the 3 slaves which are connected to SPI4, SPI5 and one of the connection to SPI6.Any help is very much appreciated!
Hi,I am using version 1.9.0 of the STM32F0 package in cube.I have chosen DMA1CH4 for USART1TX and the following line was autogenerated as expected: LL_SYSCFG_SetRemapDMA_USART(LL_SYSCFG_USART1TX_RMP_DMA1CH4);However, the following line is missing: LL_APB1_GRP2_EnableClock(LL_APB1_GRP2_PERIPH_SYSCFG);My code is heavily amended, so there is a small chance I have inadvertently removed the line - I am fairly certain though that this is a bug. If so, please fix it?Kind regards,Lloyd
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.