Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I have the latest version of the STMCube IDE as of 6/22/20. I have a project defined and I can generate the code for a Cube project. How do I get it to generate an IAR Project? (an EWARM) directory)If I go to Project Manager | Code Generator, there is a ToolChain/IDE pulldown menu that is grayed out.I remembered on an older version of STCube it was easy to generate the EWARM directory. How do I do it now?
I have a project using a STM32f107VC which I am trying to update and I run into some problem configuring the clock in the updated environmentSo I tried to create a simple project using Stm32CubeMX and I still can't configure the clock properly.I added code to my main application that blinks a led with delay of 1000 ms but the LED actually blinks every 2000ms (checked with a scope)I generate an Other Toolchains (GPDSC) project in the CubeMX and then import it to Visual GDB 5.4r12the project information is :Stm32CubeMX: version 5.3.0MCU: STM32F107VCTx Firmware: STM32Cube FW_F1 V1.8.0This is the clock configuration:int main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the sys
..
Hi,I'd like to override the GPIO settings for the I2C GPIOs. For example, I want to disable pullups and change the drive strength. In the CubeMX GUI there's not option to do this. So far I've just modified the code that gets generated but annoyingly when I make a change to the CubeMX config these changes get overwritten.Thanks,Doug Burrell
Are there any demo or tutorial about how to use cpputest framework a project based on cubemx at cube ide ?
Dear all,i have a F412 and SDIO enabled (1Bit). Also, set the corresponding GPIOs to pullup in the GPIO settings. However, I do not see generated code to initialize these Pins at all (they are not showing up). Tried removing them and adding again - no change.Any advice?Best regards Stefan
Good eveningIs it not possible to use TIM1/TIM" for generating a PWM output when USB FS is selected?IDE shows me a warning when selecting internal clock source...and I can't set PSC or preloader value....thansk in advancerichard
Hi all,I am developing stm32l4 application. In my project I created one folder. In that folder I added own .c and .h files. I included path of that folder in project settings. Without any errors I could compile. After making changes in .ioc file, code generated, but my .h files from the newly created folder are missing. can anyone help me ?
I thought I ran into a bug when CubeMX could not configure oversampling for an F767 after I had used it on the less powerful L4. Read the reference manual and understand it is not there. Could not find which non-L families DO have oversampling. Hence the question.
I have a project using STM32G070KBT and I laid out the board after making an assumption that may turn out not to be true. I am using all three UARTs, but for two of them, I only need the RX pins. I am also using SPI1 to access an SD card (the board will monitor RX/TX comms and log them to card, the full port is for debug). I use PA1 and PA2 for SCK and MOSI. But PA2 is also the TX for USART2. CubeMX will not let me turn on both USART2 and SPI1 with this pin combination.Obviously, the right fix is to move MOSI from PA2 to PB5, but the boards have already been built, and cut/patching them would be quite a chore. Is it possible to enable USART2 but only initialize the RX pin, leaving PA2 to be used by SPI1? I suppose I will have to either forego CubeMxIDE's initialization and do it myself, or have CubeMX initialize SPI1 using PB5, then reinit with PA2 in my user code. Any chance this will work?Thanks, Jeff
My install of Keil and CubeMX works fine on my STM32F302R8 project. However when I generate a STM32F303RE project in CubeMX the code generator gives message a problem was encountered in generating a MDK-ARM project. When I load the resulting STM32F303RE project I get a message about an unknown device and then Keil crashes. I don't have the opportunity to look at Project-->options because Keil crashes.I uninstalled Keil completely and re-installed and get the same results. #STM32F3 #Keil #STM32CubeMX
I have recently upgraded to STM32CubeMX 5.6.0 and created a new project based around the STM32H753ZITx family.I can usually get one "Generate Code" operation when the PC has freshly booted up, but if I try and "Generate Code" subsequent times it just hangs at "Generating user source code.." and this will continue until the PC is rebooted.We have tried both fully populated processor configuration and minimal clock and USB only configuration and in both case keep running into the same problem.We didnt seems to experience this in version 5.5.0 of STM32CubeMX.
Hi,I've recently started using STM32CubeMX and I tried installing newest Arm CMSIS 5.7.0, but whenever I do that I get the following error. Errors: - Ërror: Line= 633 : cvc-enumeration-valid: Value 'Cortex-M55' is not facet-valid with respect to enumeration '[SC000, SC300, Cortex-M0, Cortex-M0+, Cortex-M1, Cortex-M23, Cortex-M3, Cortex-M33, Cortex-M35P, Cortex-M4, Cortex-M7, ARMV8MBL, ARMV8MML, ARMV81MML, Cortex-R4, Cortex-R5, Cortex-R7, Cortex-R8, Cortex-A5, Cortex-A7, Cortex-A8, Cortex-A9, Cortex-A15, Cortex-A17, Cortex-A53, Cortex-A57, Cortex-A72, Cortex-A73, other]'. It must be a value from the enumeration. - Ërror: Line= 633 : cvc-attribute.3: The value 'Cortex-M55' of attribute 'Dcore' on element 'processor' is not valid with respect to its type, 'DcoreEnum'. - Ërror: Line= 1037 : cvc-enumeration-valid: Value 'Cortex-M55' is not facet-valid with respect to enumeration '[SC000, SC300, Cortex-M0, Cortex-M0+, Cortex-M1, Cortex-M23, Cortex-M3, Cortex-M33, Cortex-M35P,
More detailed description and questions:1) MacBook Pro, CubeMX 5.4.0, SystemWorkbench 4.6.3.2) Program for NUCLEO-H743ZI board, CubeMX generated and built. Still some development work to do ..3) However, now have the prototype's custom board which includes the STM32H743ZITx 144-pin MCU and I would like to program the board and run the code on the custom board/MCU.4) Can I program the custom board with the code built for the NUCLEO board? Or do I need to create new code for the MCU only/standalone... ?5) If the code built for the NUCLEO board runs as is, great. I guess nothing else is needed.6) However, if I need to create a new version of the code, via CubeMX, should I create it in a separate folder, as a separate Ac6/Eclipse project?The reason I'm asking all this, is because since development continues, I need to manage changes to the code. I use git, but if I continue developing in the NUCELO project, I will have to git cherry-pick all the separate commits from the NUCLEO project to
We made a custom board with a switch KSZ8463 which finally work. I'm just curious that is LWIP & Ethernet implementation in STM32CubeMX for STM32F4 is stable? I mean it works without problem for months or so?Thanks.
HiI am trying to construct an SPI based device driver for an ADC which has 16 bit Frame size .The examples provided for SPI DMA showcases the use of uint_8 * buffers//HAL_SPI_TransmitReceive_DMA(&SpiHandle, (uint8_t*)aTxBuffer, (uint8_t *)aRxBuffer, BUFFERSIZE)//.So i am currently using FIFO for change in data size between peripheral and memory and endian behavior reverses the dataIs there a simple way to use the HAL_SPI_TransmitReceive_DMA to handle halfword directly for the CubeMX setting for HALFWORD to HALFWORD transfer between memory and peripheral and HALFWORD to HALFWORD transfer between peripheral and memoryfor eg :uint16_t aTxbuffer[]={0x0001,0x0100,0xf000};uint16_T aRxBuffer[TXSIZE]={0};HAL_SPI_TransmitReceive_DMA(&SpiHandle, (uint8_t*)aTxBuffer, (uint8_t *)aRxBuffer, BUFFERSIZE)Thanks in Advance
I am new to STM32 and it's tools so please excuse my ignorance. I have both STM32cubeIDE V1.3.1 and STMcubeMX V5.6.0 loaded. When I generate a 'simple' project for the STM32F103C8 it does not run correctly if the IDE was used to generate the initial project. If I generate the initial project with STM32cubeMX I can then compile it with the STM32cudeIDE and it works as expected. I am at a loss to understand why --- any advice would be appreciated
I found that I have to change the define "__PACKED" to "__packed" in "cmsis_armcc.h"; otherwise, the following code in "stm32h7xx_II_usb.c" will crash on the second call to this function, if the "len" in the first call is 7 ( or might be other none 32-bit aligned number). I am wondering whether I do not configure the compiler correctly. It is Keil Compiler Version 5./** * @brief USB_ReadPacket : read a packet from the RX FIFO * @param USBx Selected device * @param dest source pointer * @param len Number of bytes to read * @retval pointer to destination buffer */void *USB_ReadPacket(USB_OTG_GlobalTypeDef *USBx, uint8_t *dest, uint16_t len){ uint32_t USBx_BASE = (uint32_t)USBx; uint32_t *pDest = (uint32_t *)dest; uint32_t i; uint32_t count32b = ((uint32_t)len + 3U) / 4U; for (i = 0U; i < count32b; i++) { __UNALIGNED_UINT32_WRITE(pDest, USBx_DFIFO(0U)); pDes
Hello,I want to control the ad9833 module with the stm32f4 development board. I have a library but I couldn't get SPI communication. I cannot get any wave output from the module. I cannot adjust frequency. where can the problem be? I need to create this project with CUBEMX and do the work using the Keil development environment. I am using the SPI1 module of the board. I use PA5 pin as SCK, PA7 pin as MOSI and PB2 pin as GPIO reset. Below is the code part that i tried to spi communication. void ad9833_send(uint16_t dat) { unsigned char i; HAL_GPIO_WritePin(GPIOA,GPIO_PIN_5,GPIO_PIN_SET); //clk = 1 for(i=0; i<16; i++) { if (dat & 0x8000) { HAL_GPIO_WritePin(GPIOA, GPIO_PIN_7, GPIO_PIN_SET); } else { HAL_GPIO_WritePin(GPIOA, GPIO_PIN_7, GPIO_PIN_RESET); } HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_SET); dat <<= 1; __NOP(); __NOP(); HAL_GPIO_WritePin(GPIOA, GPIO_PIN_5, GPIO_PIN_RESET); } //HAL_GP
Installing X-Cube 'Packs' fails: Invalid zip file or missing expected Pdsc file within pack root directory.I get this trying to Help/Manager embedded software packages/From Local... file en.x-cube-cellular.zip I have downloaded and have spent hours reading UMxxxx.pdf files full of fluff but none so far have described how to actually load an X-Cube pack.I first ran into this issue in February and posted, I checked, no reply after two months...
Since updating to CubeMX 5.6.1, my software won't start when there's a USB memory drive plugged into my system. It gets stuck , which is resolved by removing the USB device and plugging it back in. I'm using STM32F756BGTx with FreeRTOS. I think i pinpointed the problem. Sincde CubeMX 5.6.1 the function USBH_CtlReq() contains a seccond occurence of a call to (void)osMessagePut(). I commented it out in the code fragment below. I noticed the message sent there, results in call to USBH_CtlReq(), which results in sending the same message again, creating an endless loop. Commenting out the second occurence off (void)osMessagePut() got my system working again. USBH_StatusTypeDef USBH_CtlReq(USBH_HandleTypeDef *phost, uint8_t *buff, uint16_t length){ USBH_StatusTypeDef status; status = USBH_BUSY; switch (phost->RequestState) { case CMD_SEND: /* Start
I am using STM32F103C8Tx and I am trying to create a PID adjustable PWM. In PID I will be giving values to PWM from 0 to 100 to set the duty cycle. That means my counter period needs to be 100 in Cubemx. Because as I have learnt while I am changing the dutch cycle it changes the counter period. However, I need to create PWM with 200 KHz frequency and the clock of the timer is 72 MHz.In order to achieve a value of 100 in counter period I need to have a 3.6 prescaler. Am I following a wrong way or did I get this PWM duty cycle thing wrong in stm32?Note: I am changing duty cycle from the code ashtimx.Instance->CCRx =Duty_Cycle; I think I cannot put codes as a reply so I will put them here:static void MX_TIM3_Init(void) { /* USER CODE BEGIN TIM3_Init 0 */ /* USER CODE END TIM3_Init 0 */ TIM_MasterConfigTypeDef sMasterConfig = {0}; TIM_OC_InitTypeDef sConfigOC = {0}; /* USER CODE BEGIN TIM3_Init 1 */ /* USER CODE END TIM3_Init 1 */ htim3.Ins
the file stm32l4xx_hal_conf.h in firmware repository STM32Cube_FW_L4_V1.15.0contains a datatype mismatch in parameter 1 between the invokation and declaration of assert_failed() :#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) void assert_failed(char *file, uint32_t line);The compiler correctly warns of this mismatch when compiling stm32l4xx_hal_dma.c, stm32l4xx_hal_flash.c, stm32l4xx_hal_exti.c, stm32l4xx_hal_flash_ex.c, etc.stm32l4xx_hal_conf.h:437:65: warning: pointer targets in passing argument 1 of 'assert_failed' differ in signedness [-Wpointer-sign]Earlier versions of stm32l4xx_hal_conf.h did not contain this mismatch:#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__)) void assert_failed(uint8_t* file, uint32_t line);Why was this change introduced, and will it be corrected?
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.