Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Posted on June 07, 2018 at 18:44After updating to CubeMX 4.26.0, Makefile projects cannot be updated due to the following errors:2018-06-08 00:35:55,360 [INFO] ToolchainGenerator:120 - stack trace : java.lang.UnsupportedOperationException: Not supported yet. at generators.MakefileGenerator.updateHeapAndStack(MakefileGenerator.java:315) at generators.Generator.generateLinkerFile(Generator.java:715) at generators.Generator.copyLinkerFile(Generator.java:407) at convertor.Convertor.generateMakefile(Convertor.java:1436) at convertor.Convertor.generate(Convertor.java:608) at convertor.Convertor.convert(Convertor.java:515) at convertor.Convertor.updateProject(Convertor.java:384) at com.st.microxplorer.plugins.projectmanager.model.ToolchainGenerator.update(ToolchainGenerator.java:114) at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createToolChainFolders(ProjectBuilder.java:1780) at com.st.microxplorer.plugins.projectmanager.engine.ProjectBuilder.createProject(ProjectBuild
Working with the STM32F429 Discovery board and STMCube_FW_F4_V1.21.0 I've got the same problem several times.If I use the main.c provided with the application examples, the code will run into an endless loop after calling HAL_RCC_OscConfig and taking care of the return value.The program works as expected, if the return value is ignored.The configuration of the PLL causes this behaviour:The check, if the PLL is used as system clock source will go to the else path and returns HAL_ERROR. The calling function expects HAL_OK.
Hi All,I am using 32L100C Discovery board to develop my own project at the moment and I just need to add watch dog in my code. Everything works fine until I code generate IWDG according to the attached slides although settings are different and RCC is enabled. In addition, I have 2 UARTS to transmit and receive packet to third UARTS but it transmitted weird character after code-generate watchdog. I set my prescaler to 32 and reload value to 4000 and I did not change anything in the clock configuration. Have I done something wrong and missed something?Kind Regards,William
Hi Everyone,I am using STM32L100RCT6 at the moment for my own personal project and I want to add watchdog function in my code especially IWDG. So I want to ask if there is any tutorial and example code I could use or does anyone has experience in setting it up. Sorry, I am a beginner and this is just the last bit of my own project. Many thanks
Posted on February 22, 2017 at 15:30I'm trying to install STM32CubeMX on Win10 64bit.I know I have Java Version 8 Update 121 installed and I'm sure it's working (since I'm using it).Now when I invoke SetupSTM32CubeMX-4.19.0.exe a window pops open after a couple of seconds saying:STM32CubeMX InstallerThe registry refers to a nonexistent Java Runtime Environment installation or the runtime is corrupted.And that is it.It doesn't say which Java Version it's looking for nor does it say which one it finds (corrupted).Can somebody help, please??#stm32cubemx #stm32cubemx-install #stm32cubemx-java
Posted on March 30, 2018 at 00:30I was looking at the timing value that STM32CubeMX calculated for the I2C timing register in my STM32F486. I have the I2C1 clock in at 80MHz. I checked the data sheet and did not see a maximum value for the I2CCLK and CubeMX is not complaining so I figured it was OK to leave this as is. When I checked the value for I2C_TIMINGR that CubeMX calculated it seems to be off somewhat. The value for SCLH is 0x9C and the value for SCLL is EC. If I back these out to actual time SCLH is 3.925usec and SCLL is 5.925usec. The I2C clock turns out to be 100502.5Hz, just over the maximum 100KHz it should be. It seems to me that these values really should be 0x9E and 0xEE. Am I missing something here? Thanks. #stm32f486 #i2c-timing-register #stm32cubemx #i2c-setup
Posted on February 09, 2018 at 21:13I'm using an STM32F779IIT6 configured by the CubeMX (V 4.24.0, STM firmware 1.9). FreeRTOS is configured for STATIC memory only (important), no dynamic allocations allowed. I've enabled the USB_HOST_FS system as a Mass Storage Host Class.The generated Cube code under USBH_Init in usbh_core.c snippet is as follows:osMessageQDef(USBH_Queue, 10, uint16_t);phost->os_event = osMessageCreate (osMessageQ(USBH_Queue), NULL);This, in turn, calls osMessageCreate as seen above, which leads to...&sharpelif ( configSUPPORT_STATIC_ALLOCATION == 1 ) return xQueueCreateStatic(queue_def->queue_sz, queue_def->item_sz, queue_def->buffer, queue_def->controlblock);&sharpelseWhile that's all fine and dandy, the queue_def->buffer was NEVER initialized by the Cube code; It's NULL, causing an ASSERT each time the processor starts up.The top line of code should be osMessageQStaticDef, not osMessageQDef as there is NO dynamic memory
I tried to use the STM32CubeMX to configure DAC to work with DMA which would enable me to transfer data from memory, all clocked by TIM6. I used same configuration for STM32F334 and it worked without any problems. After I never got this working, I tried to add another request in DMA configuration menu and discovered this, which looks like some kind of bug, because I haven't found anything like this in reference manual. I believe that STM32CubeMX is not optimized for STM32H7 enough and it looks like this is also the reason why my code wouldn't work with this model.Thank you for reply.
Posted on September 28, 2017 at 11:49In STM32CubeF4 STM32F446ZE, there is a timer one pulse mode example.Setting TIM3 CH2 as input capture and CH1 as Output Compare to work as One pulse mode.(Set slave mode as trigger mode and trigger source as TI2FP2 )It works totally fine!However, It seems that CubeMX cannot be configured to do this job!(Let's suppose CubeMX is used. I hope this is not a stupid question because I am told to offer an ioc project)Let's review what needs to be done for TIM3 as One Pule Mode using CH2 as Input capture and CH1 as Output compare.1. TIM3 CH2 as input capture2. TIM3 CH1 as Output Compare, PWM mode 23. Slave mode as trigger mode.4. trigger source as TI2FP2.5. one pulse mode is enabled.A typical one pulse mode (OPM) looks like this, Yellow wave is CH2 input capture, Blue wave is the Output compare pulse toggling high with a certain period after a certain delay.Now back to our CubeMX,Trigger source must be chosen first....Once TIFP2 is chosen, channel2 becomes
Posted on August 24, 2017 at 04:41I used STM32CubeMX version 4.22 to generate MSC usb device and modified it to have 2 custom bulk interfaces. I am using STM32F412, FS usb with internal Physical with maximum packet size of 64. Interface 0 has 2 BULK endpoints IN and OUT. Interface 1 have two alternate settings. Alt Setting 0 has 0 endpoints and Alt Setting 1 have 2 BULK endpoints IN and OUT.Endpoints are defined as :&sharpdefine INTERFACE0_IN_EP 0x81&sharpdefine INTERFACE0_OUT_EP 0x01 &sharpdefine INTERFACE1_IN_EP 0x82&sharpdefine INTERFACE1_OUT_EP 0x02My device enumerates fine and Interface 0 works as expected. Host sends Set Interface 1, Alt Setting 1 request then i activate Interface 1 endpoints (0x82 and 0x02).Interface 1 is not working as expected, i am sure it has something to do with my FIFO Settings. I get dataOut Call for INTERFACE1_OUT_EP but when i try to write INTERFACE1_IN_EP host only get 3 bytes back while i am writing 24 bytes. Immediately after th
Posted on May 31, 2018 at 11:12Hello,generally i have problems importing project example from cubex repository.1� i lauch the System Workbench for STM32 with a workspace on c:\workspace2� i import the cubex project by File->import->genral-> existing project into workspace -> browse -> C:\Users\..\STM32Cube\Repository\STM32Cube_FW_F4_V1.18.0\Projects\STM32F429I-Discovery\Applications\STemWin2 projects are proposed so i select both (hello world + sample demo)Then i have the warning some project cannot be imported because they already exist.How can i do to import the 2 projects into System Workbench for STM32 ?thanksbest regardsSystem Workbench for STM32 - Copie#system-workbench-for-stm32-cubex-repository. #system-workbench-for-stm32
Hey there i want to send and receive LIN Message through my MCU (STM32F091CCT6 - TJA1021T/10/C LIN Transreceiver). But i cant see any example code in documents.Here what i did for this.I select USART1 in LIN mode and USART2 Asynchronous mode to see console messages.Here my clock configurations. My crystal has 12Mhz clock and i want to work at 48Mhz.These are my parameter settings for LIN mode. I select to 19200bps for LIN limitations and i did not use interrupt for this USART.After these settings i generate the code. I add delay for 500ms and send break signals. HAL_Delay(500); HAL_LIN_SendBreak(&huart1);When i plugged in oscillator to uart pins i can see a break signal in 500 seconds like that.After that problems start. I cant see any break messages in PLIN API(Peak PLIN USB Converter API to see LIN messages). I can understand that because break signals are not data signals. But when i try so sent data in code like HAL_UART_Transmit(&huart1, 0x20BBCCDDEEFFDD1
On linux if I use the latest STM32CubeMX (4.26.1) and generate a project for Atollic Truestudio, the project tries to use the executable called 'arm-none-eabi-objcopy.exe' this is the name for the windows verison however on linux it is called 'arm-none-eabi-objcopy' without the extension.If I fix the project setting and save, the next time I use STM32CubeMX on the same project and regenerate it wipes out my change.
Posted on January 18, 2017 at 03:55I am using stm32cubeMx to generate initialization C code for programming STM32L476RGTx MCU using Keil IDE. Recently, I need to interface an AD5262 digital potentiometer to control the gain of an amplifier automatically. The AD5262 requires 9 bit spi data to be configured perfectly (1 bit for resistor selection, 8 bit for wiper position selection). I have tried HAL_SPI_Transmit_IT(&hspi,&data,1) // data is 8 bit. //to transmit twice (so I did some bit manipulation so it becomes A0 D7 D6 D5 D4 D3 D2 D1 D0 0 0 0 0 0 0 0, please check AD5262.jpg). I considered last 7 zeros' to be ignored by AD5262. Seems like my process is not working. There one other way I can think of which is 1st bit (A0) to be transferred manually programming the spi by using the gpio pins (CS, SCLK and SDA) and transmitting the rest 8 bit using the function I mentioned. But I will do it if I can not find any other convenient way to transmit 9 bit directly using HAL. Can you
Dear All, I am working with STM32F4 Discovery board. I have been stuck with the sd card interface for last 1 week. I have used cubemx version 4.26 for creating this project. But F_mount function is not working.Please find the below code. and kindly help me out to solve this issue.#include "main.h"#include "stm32f4xx_hal.h"#include "fatfs.h"/* USER CODE BEGIN Includes *//* USER CODE END Includes *//* Private variables ---------------------------------------------------------*/SD_HandleTypeDef hsd;/* USER CODE BEGIN PV *//* Private variables ---------------------------------------------------------*//* USER CODE END PV *//* Private function prototypes -----------------------------------------------*/void SystemClock_Config(void);static void MX_GPIO_Init(void);staint main(void){ HAL_Init(); SystemClock_Config(); MX_GPIO_Init(); MX_SDIO_SD_Init(); MX_FATFS_Init(); UINT testbyte; HAL_Delay(10); if(f_mount(&SDFatFS,SDPath,1)==FR_OK) { HAL_GPIO_TogglePin(GPIOD
Something has change with Version 4.26(.1)Any time I look at the Project Settings (even with no changes) I get a message saying:"This Project File (System.ioc) already exists in the chosen folder. Overwrite this file by this new Project?"If I say No and I generate code I get an error that the code was generated but the project generation got an errorIf I say yes it them proceeds to delete the *entire* Src and Inc directories and creates fresh files. It even deletes my source files and hidden files (like CVS dir)Any changes to main.c or ethernetif.c (USER CODE) are totally lostI am using Atollic 9.0 (TrueSTIDIO project format)My processor is the STM32F407What triggers Cube to think I am creating a new project?WHY does Cube think it is OK to delete files it knows nothing about?Tom
Hello,Currently, I am working on STMH43ZITx Nucleo board. In order to generate code for Ethernet as well as LWIP, I am using STMCubeMX. After updating STMCubeMX to the newest version i.e 4.26.1, I cant able to select LWIP option at all even after selecting ETH option to RMII/MII.The same works if I select other boards for example STM32F7 series. Is that bug in the newest release of STM32CubeMX or I am doing something wrong?Best regards,Sid
I recently upgraded from CubeMX 4.25.1 to 4.26.1. It deletes the src directory. I'm generating for an STM32F407 MCU to be used with the SW4STM32 toolchain with the Generate Under Root option selected.
I have installed STM32CubeMX version 4.26.1. I have downloaded X-CUBE-MEMS1 5.0.0. I go to Help->Manage embedded software packages, and click on "From Local..." I pick the zip file containing X-CUBE-MEMS1, and I get the error message "This Package version is not managed on this version of STM32CubeMX".How can I use X-CUBE-MEMS1 to generate BSP code to interact with the IKS01A2 expansion board that I purchased? I am using a STM32L476RGT6.
Hello, whenever i use stm32h743 nucleo with stm32cubemx code generator for DMA with adc ,it's not working ,i am unable to use DMA with adc, stm32h743 nucleo adc examples for adc dma working fine.how to solve this problem.
Hi. I'm currently trying to develop a simple USB (CDC) application with an STM32 MCU that is configured using CubeMX. So far I have managed to make the device send some text message to my host machine which is displayed using a serial terminal program. But, I have noticed, that after programming new firmware to the target, I must physically disconnect and connect my board in order to reestablish the connection. I was wondering if there was a better way to do this ?Best Regards,abaldur
Posted on April 04, 2018 at 18:39Hi everyone,I'm trying to use my Nucleo-144 with the STM32H7 processor on CubeMX and Atollic TrueStudio and I'm getting the problem of arm_math.h and other DSP files not beeing copied to the project folder.I tried with some boards with STM32F4 and STM32F1 that I got here and they work OK just after generating the project files with CubeMX, but the H7, doesn't.I checked the Build Configs and both FPU and hardware implementation are enabled, tried to manually link to the folder, tried a new install of the CubeMX and Atollic in other computer and in none of my tries I succeeded.Is this a know bug? How can I make this work?#arm_math #stm32h7 #bug
Posted on July 10, 2018 at 09:49When generating MX_USART1_UART_Init for a usart in HalfDuplex mode, the USART_InitStruct.HardwareFlowControl field remain uninitialized which leads to unpredictable behavior of the system. in my case the I2C DMA was triggered by USART DMA requests....fix: adding the missing initialization fields in mcu/config/llConfig/USART-STM32F0xx_LLConfigs.xml fixes the issue.I only fixed this for my F030F4 project, the same issue might also be present for other configurations/mcu'sregardsingo#stm32cubemx-bug-ll_usart_init #stm32cubemx-bug
Posted on June 28, 2018 at 15:32How can I installed ARM.CMSIS.*.*.pack into STM32CubeMX software components? I was able to include the package into STM32CubeMX 'Embedded Software Packages Manager', but it won't installed.The errors were missing CMSIS Core package, but the package is on the listing. How do I fix the problem? See the attached snapshot file. I am using STM32CubeMX Version 4.26.0 (latest software download).#cmsis #stm32cubemx. #cmsis-dsp #cmsis-rtos
the errors appear in Arabic numerals;The two function :ADC_REG_InitStruct.SequencerLength = 2; LL_ADC_REG_SetSequencerRanks(ADC1, 1, LL_ADC_CHANNEL_2);
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.