Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hi,as in the object I'm trying to create a new pack starting form an existing on a DFP (Device Family Package) for SMT32L4 already published, specifically this one: Keil.STM32L4xx_DFP.2.6.2downloadable here: https://www.keil.arm.com/packs/stm32l4xx_dfp-keil/ We have already a custom PCB built on stm32l451rctx so my goal was to try create a custom package starting from an existing one and this is what I did:1. Start STM32CubeMX2. In tab "External Tools" start "STM32PackCreator"3. Click on "Create New Project from pack"4. Select the above mentioned pack and filled all mandatory field an start the project creation At this point the tool is correctly able to unzip the original pack but then it got stuck there:Checking filesystem the original pack has effectively been unzipped but don't unterstand why it got stuck: Any help would be appreciated. Regards,Silvio Taurisano
I am working on IHM02A1 expansion board. I want .ioc file to visualize the configurations made in x-cude-spn2. How to get them.
Hello all,I have trouble running FDCAN on an STM32H742VG rev V when the cpu clock is above 300 MHz. I have D1CPRE = DIV1HPRE = DIV2D2PPRE1= DIV2leading to the maximum allowed APB1 peripheral clock (= fdcan_pclk) for cpu clock >= 300 MHz (75 MHz for cpu clk = 300 MHz)also I have HSE = 24 MHz used as FDCAN clk (= fdcan_ker_ck) and with FDCAN_CCU_CCFG.BCC = 1 and FDCAN_CCU_CCFG.CDIV=0 this is also fdcan_tq_clk and so fdcan_tq_clk is always smaller than fdcan_pclk.But still this configuration only runs stable up to 300 MHz, at 330 MHz it fails after about a minute and with 360 MHz and above it does not work at all.I have no trouble running UARTs, SPI, timers, ADC, DAC with cpu clk = 480 MHz, its only the FDCAN.Did I miss something? Any known issues or workarounds?Thanks for any hintMartin
I open project which was created with CubeMX in version 6.8.0 and get pop-up window:I click continue and project opens but when I just save project even without changing anyting Cube version for the project changes to 6.10.0.I can see the change in .ioc file immediately:How can prevent CubeMX from changing version?
Hi all,I'm encountering a strange behaviour of STM32CubeMX: from some point on, every time I update the IOC file the generated code is missing the FDCAN function name HAL_FDCAN_GetRxMessage.Obviously this results in a build error; the function declaration in driver file stm32g4xx_hal_fdcan.h is correct:HAL_StatusTypeDef HAL_FDCAN_GetRxMessage(FDCAN_HandleTypeDef *hfdcan, uint32_t RxLocation, FDCAN_RxHeaderTypeDef *pRxHeader, uint8_t *pRxData);While in stm32g4xx_hal_fdcan.c function name is missing:HAL_StatusTypeDef (FDCAN_HandleTypeDef *hfdcan, uint32_t RxLocation, FDCAN_RxHeaderTypeDef *pRxHeader, uint8_t *pRxData){ uint32_t *RxAddress; uint8_t *pData; uint32_t ByteCounter; uint32_t GetIndex; HAL_FDCAN_StateTypeDef state = hfdcan->State; //... other code}So I add manually the function name in .c file and everything works, but the next time I generate the code the function name will be deleted again.Is there a way to avoid this or maybe can it be a CubeMX bug?I'm usin
I am trying to use one of the STM32G examples for a USB device. The example is for STM32G474-EVAL and I would like to try it on Nucleo-G431KB.Following the instructions I found I have created a new CubeMX project, I did NOT make any changes to the configuration, other than selecting not to set all GPIO to inputs.Next, I went to import the example file, however, the import menu item is greyed out.I am using CubeMX 6.8.1Sid
CubeMX 安装时候报错错误:找不到或无法加载主类com,st,stm32cubeide,commonservices,mxjar.core,mx,main,SelflnstalJar原因: java ana,ClassNotFoundException: com.st stm32cube.ide,common.services,mxjar.core.mx,main,SelflnstalJai安装最新的java8u391会报错,我试了很多个发现jdk21可以安装,但是安装过程中会报上述错误,打不开cubeMX,初始页面出来然后就没了,试了很久了都找不到办法解决
I am using the Wireless Connectivity software pack, which automatically generates Wi-Fi and bluetools code files. Due to specific requirements, I have made some modifications to parts of the code files and configured additional pins using CubeMX's IOC. However, every time I press the "Generate Code" button, the compiler regenerates the code files from the software pack, causing my changes to disappear.*I already know that I need to place my code between /* user code begin */ and /* user code end */, but these tags are not present in the code generated by the software pack.Is there any way to preserve the changes I made in the code files after using CubeMX to generate code? Thank you.
When code for LINKEDLIST for STM32U575 will be generated (linked_list.c) with STM32CubeMX 6.9.2 several lines are missing. In the attached ioc file (which is only for illustrating the effect) the commands for e.g. setting DMA_DEST_DATAWIDTH_BYTE are missing before HAL_DMAEx_List_BuildNode(&pNodeConfig, &ByteCopy); on line 151 is called.
Hi,I am trying to figure out to make HRTIM burst DMA working. I want to update timer period, compare1, compare2, and compare 3 registers by using burst DMA. There is not much information about this. There are two postings in the community posted several years ago, and it gave me some idea. But I need to have more information. I used CubeMx to configure and generate code.I want to trigger the burst DMA by software.Assuming that the DMA source buffer data order matches to the order of number of registers to update, for there is no description stated in the reference manual. Nothing happens when I run. It did not stop at burst DMA completion and DMA error callback function when I set breakpoints.Below screenshots and code are used for the configuration. I am not sure that I need to check on the "Increment Address" or not.InvPerComp[0] = new_per; // new period InvPerComp[1] = cmp1; // new compare 1 InvPerComp[2] = cmp2; // new compare 2 InvPerComp[3] = cmp3; // new compare 3 /
Hi there! I just would like to report that enabling the MPU for the M7 core on my NUCLEO-H755ZI-Q, CubeMX (6.9.2, with H7 package version 1.11.1) generates 2 functions:MPU_Initialize() andMPU_Config(). While the second one is declared and defined in the main.c; the first one is just declared and never defined nor used generating a compiler warning.It's simple to fix it by cancelling the useless declaration, but the warning com back any time the code is re-generated... iTTy Edit: Edited by ST Moderator to add right Label "STM32CubeMX"
When I generate code for the MPU region 0 wit HAL I get:void MPU_Config(void) { MPU_Region_InitTypeDef MPU_InitStruct = {0}; MPU_Attributes_InitTypeDef MPU_AttributesInit = {0}; /* Disables the MPU */ HAL_MPU_Disable(); /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Enable = MPU_REGION_ENABLE; MPU_InitStruct.Number = MPU_REGION_NUMBER0; MPU_InitStruct.BaseAddress = 0x08fff800; MPU_InitStruct.LimitAddress = 0x08fff900; MPU_InitStruct.AttributesIndex = MPU_ATTRIBUTES_NUMBER0; MPU_InitStruct.AccessPermission = MPU_REGION_ALL_RO; MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE; MPU_InitStruct.IsShareable = MPU_ACCESS_OUTER_SHAREABLE; HAL_MPU_ConfigRegion(&MPU_InitStruct); MPU_AttributesInit.Number = MPU_REGION_NUMBER0; MPU_AttributesInit.Attributes = MPU_DEVICE_nGnRnE | MPU_WRITE_THROUGH | MPU_TRANSIENT | MPU_NO_ALLOCATE; HAL_MPU_ConfigMemoryAttributes(&MPU_AttributesInit); /* Enables the MPU */ HAL_MP
Guys I just don't get this part in CubeMX. What does it mean by "voltage converter"? Does it refer to voltage translator? In that case why would a software stack cares about a voltage translator (which is basically a 1:1 interface) and changes the signals on pin completely by selecting different modes.
When using STM32CubeMX v6.10.0 (standalone) to update the pin configuration for an STMCubeIDE v1.14.0 project that has the thread safety option enabled, the code generation creates the directory "ThreadSafe" under "Core/Src", while the IDE's version of STM32CubeMX puts the "ThreadSafe" directory directly under "Core", parallel to the "Src" directory. This breaks the project because the build procedure builds two copies of "newlib_lock_glue.o" and tries to link both into the executable image.The standalone tool should be updated to use the same directory structure as the version integrated into the IDE.
I do apologize if this is in wrong section or something. I just don't have time to spend hours looking for correct place to get support. I need to work, not fiddle with misbehaving software.The issue I am having is that CubeMX (latest version from the website) is totally messed up in my desktop PC with windows 10. Everything works fine on my windows 7 laptop.One picture tells more than a thousand words so here are two.It's totally unusable. Never seen this kind of behavior with any software I am using in my windows 10 desktop.All help is very much appreciated, and sorry again if this is in wrong section.
Posted on September 02, 2015 at 18:03Is it possible the change the selected processor in a given STM32cubeMX project? I would like to maintain the user pin labels and config. #stm32cubemx
STM32CubeMX generates incorrect code for the OCTOSPI interface for STM32H725.The generated code does not populate the Req2AckTime field of the OSPIM_CfgTypeDef structure, but HAL_OSPIM_Config() validates this value and throws an assertion error. See attached configuration in STM32CubeMX. Generated code is only: sOspiManagerCfg.ClkPort = 1; sOspiManagerCfg.NCSPort = 1; sOspiManagerCfg.IOLowPort = HAL_OSPIM_IOPORT_1_LOW; // NOTE: MISSING ASSIGNMENT TO sOspiManagerCfg.Req2AckTime if (HAL_OSPIM_Config(&hospi1, &sOspiManagerCfg, HAL_OSPI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) { Error_Handler(); }
I downloaded and extraced STM32CubeMX for MacOS. Double clicking the SetupSTM32CubeMX-6.3.0.app file doesn't do anything
Is there a way to include in the makefile out custom .c .h , other than manually including each .c by hand in the makefile C_SOURCES?
STM32CubeMX version: 6.10.0Firmware version: STM32Cube FW_G4 V1.5.1 I have configured a GPIO pin as EXTI and configured that the interrupt should not be enabled when initializing the GPIO, (i.e. removed the check mark from "Generate Enable in Init").If the initialization code is generated in main.c, the interrupt is not enabled (as expected).// In main.c static void MX_GPIO_Init(void) { /* ... */ /* EXTI interrupt init*/ HAL_NVIC_SetPriority(EXTI0_IRQn, 5, 0); /* ... */ } However, if the initialization code is generated in separate .h/.c files, the interrupt is erroneously generated.// In gpio.c void MX_GPIO_Init(void) { /* ... */ /* EXTI interrupt init*/ HAL_NVIC_SetPriority(EXTI0_IRQn, 5, 0); HAL_NVIC_EnableIRQ(EXTI0_IRQn); /* ... */ }
Hi - I am new to CubeIDE and CubeMX. I am following the "Getting started with STM32" tutorial, currently in "Step 2: Blinking LED with STM32CubeMX and HAL" which recommends using this option when generating code: "Copy all used libraries into the project folder".However this option is greyed out / disabled and the second option ("Copy only the necessary library files") is selected by default. Why is the first option not even available ? How can I enable it ?I am using the latest version of CubeIDE (1.7.0) which integrated CubeMX (6.3.0). Installed on macOS Big Sur.
Hi,i have STM32F767BIT6 MCU and microcontroller crashes into Hard Fault during initialisation of LWIP MX_LWIP_Init(); Problem is that in FreeRTOS is calling memcpy in queue.c in function prvCopyDataFromQueue with huge ammount of length.( void ) memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.xQueue.pcReadFrom, ( size_t ) pxQueue->uxItemSize );Source(pxQueue->u.xQueue.pcReadFrom) and destination(pvBuffer) address is correct placed inside internal SRAM area but length(pxQueue->uxItemSize) is so huge, that end address is placed out of accessible area. So it goes into HardFault_Handler. When i created the same project in older STM32cubeIDE 1.6 (FW F7 package 1.16.x) it works fine but when i create project with newer STM32cubeIDE (1.10 or 1.12 or 1.14) with FW F7 package 1.17.x it crashes into HardFault_Handler. Best regards,Petr
Hello, I saw the link below and ran it.// Set pointers wrapper structs to our data buffersai_input[0].n_batches = 1;ai_input[0].data = AI_HANDLE_PTR(in_data);ai_output[0].n_batches = 1;ai_output[0].data = AI_HANDLE_PTR(out_data);An error is occurring in this code.Can you provide example code so I can easily check it? https://www.digikey.fr/en/maker/projects/tinyml-getting-started-with-stm32-x-cube-ai/f94e1c8bfc1e4b6291d0f672d780d2c0
Dear Sir/Madam, Good day. Here I am facing the problem of missing generated files when building project using STM32 CubeMX software here I am sending image of which files are missing please provide us your kind support i am a beginner thank you best regards.we are missing the files which are in the red box are not showing in my generated source code i need these files for porting an LCD where to find these files?
I had to resolve multiple issues when I used CubeMX to regenerate Ux_Device_HID example code. An example is not very useful if it can't easily be used as the basis to develop functionality. Here is the story.I created example Ux_Device_HID targeting a Nucleo-F767ZI board. Compiled and ran generated code. No compile or link errors. Device showed up when connected to a Windows 10 computer. HID Device recognized and driver was loaded. Seems functional but I never got the mouse to move.Using STM32CubeIDE 1.13.2STM32CubeMX 6.9.2.202309101412Opened IOC.Using X-CUBE-AZRTOS-F7 Version 1.1.0 with 1.0.0 installed as well. Using STM32F7 FW Package 1.17.1Changed ThreadX memory pool size from 1024 to 1025 and then back to 1024 to trick Cube into thinking there was a change.Saved IOC and said generate code.To really use these examples, we need to be able to use them with CubeMX and the code it generates.Did a Project->Clean… and rebuilt the Ux_Device_HID project.With no intentional source code ch
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.