Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Seems like a number of builds of cubemx in history have done this and the response from ST is that a new version fixes it. Or am i doing something wrong?If it is a reoccurring bug, perhaps you guys need to consider revising your automatic-regression-testing strategy on deliveries.
first line in function MX_SPI2_Init() LL_SPI_InitTypeDef SPI_InitStruct; is not filled with zero'sand baudrate is not set for slave mode.But in in funtion LL_SPI_Init baurate is filled in an the destruct SPI CR1 register.I have there fore init the struct to zero and then there is no moer problem LL_SPI_InitTypeDef SPI_InitStruct = {0};
Hello, i validated IN0 and IN1 for ADC1 and ADC2 in CubeMX Pinout tab; in configuration tab, the button ADC and ADC2 are inactive : i can't configure the ADCAny idea to solve this ?Thanks for any supportRegardsNB : it works well for STM32F3 devices...
Hi,I'm trying to use the current CubeMX to generate USB CDC code for SMT32F303RE. The generated code doesn't connect to my Windows 10 machine. The device not even appear.I did almost the same on STM32F411RE and STM32F407VG, both works perfectly.Looking into the code I realized that the GPIO initialization code is not generated, I added it, but still no success.I'm using the following components:CubeMX v4.26.1STM32F3 Series driver package v1.10.0STM32F4 Serias driver package v1.21.0Atollic TrueStudio v9.0.1ThanksZoltan
Posted on January 15, 2017 at 23:06Hello I am reporting a bug generated by cubemx in the file stm32f4xx_hal_sd.c.Please read the thread: https://community.st.com/0D50X00009XkfctSAB , https://community.st.com/0D50X00009XkeRpSAJ Here is the thing:1. Pack version: STM32Cube_FW_F4_V1.13.0, Cubemx 4.16.1. The uSD card I tested is 1GB made in japan.2. The lib for microSD and file is generated by cubemx wizard.3. I tested the microSD on the chip STM32F405RGT6 . . 4. The problem I confronted is that initialization of sd card always fails, but everything goes through smoothly if I reset the chip(via nrst). Weird? Make the story short. Initialization of SD card fails in the function: SD_PowerON(SD_HandleTypeDef *hsd) with error code SD_COM_CRC_FAILED. Note the function is defined in the file: stm32f4xx_hal_sd.c5. I moved the HAL_Delay(1) to after clock_enable in the function SD_PowerON , everything is working well.I am not su
Posted on December 08, 2017 at 05:49Pretty sure this is a codegen bug in CubeMX v4.23.0 with latest libraries.To reproduce: start a fresh project, select STM32F103, enable USB, choose Custom HID Device, press Generate. When run, this generates a hard fault.We see that the 'user string' feature is enabled by default:C:\Temp\Test\Inc\usbd_conf.h:83 &sharpdefine USBD_SUPPORT_USER_STRING 1And this results in an additional callback added to the end of USBD_ClassTypeDef:C:\Temp\Test\Middlewares\ST\STM32_USB_Device_Library\Core\Inc\usbd_def.h: 177 uint8_t *(*GetOtherSpeedConfigDescriptor)(uint16_t *length); 178 uint8_t *(*GetDeviceQualifierDescriptor)(uint16_t *length); 179: &sharpif (USBD_SUPPORT_USER_STRING == 1) 180 uint8_t *(*GetUsrStrDescriptor)(struct _USBD_HandleTypeDef *pdev ,uint8_t index, uint16_t *length); 181 &sharpendif This is used during enumeration, where the hard fault is triggered when the device is plugged in to the host:C:\Temp\Test\Middlewares\ST\S
My hardware developer gave me the attached .loc file which includes DMA enablement. I select Code Generation and then try to generate for AC6 System Workbench, and it hangs almost immediately in the code generation. If I try to create even a simple STM32.loc file (for the Nucleo STM32L073RZ eval board) with DMA enabled and it fails. It seems that it fails whenever the dma is enabled? What is going on?
Hi all,I'm using STM32CubeMX along with Atollic TrueSTUDIO and experiences a small issue.Whenever I generate code from CubeMX, the debug configuration of my TrueSTUDIO project gets modified/overwritten to use JTAG as opposed to SWD (which I would like to use).This means that whenever a generate new code, I need to manually go in and correct the interface.Do you know if there a solution to this (maybe a CubeMX setting that I'm missing)?/ Andreas
Hello, I made a customboard using STM32f217VET microcontroller and KSZ8081 PHY (builtin pull-up resistors for TXP TXM and RXP RXM). I Configured my board to use MII mode, anda I used a 25MHz oscillator to do so. As you can see it is missing a 1k pull-up resistor for the INTRP pin, but I have already fixed this by wiring up a resistor in pin 32. Now it works accordingly.As of this moment I have tried 3 approaches to make this work (it is connected to a point that supports DHCP and is always assigned the same IP).I initially tried to configure freeRTOS + lwIP with a custom PHY, since DP83843 was the only one on the list in cubeMX. With this I was never even able to get a link is up when reading the registers and auto-negotiation never completed. Not to mention that I was unable to receive any data from pins RXD0..RXD3 , even though I can see the differential input data in the RJ45 pins when I ping my board and I can see a 25MHz clock in RX_CLK pin. I just don't get any data. (I didn't tr
Hi, some questions about the HAL USB-CDC (USB_FS) implementation. I use a STM32F405 with TrueStudio and CubeMX (for code generation) and Win10. I changed, as suggested from ST, the heap (0x1000) and stack (0x800) size. The USB CDC user Buffers are 128 bytes each and the USBD_MAX_STR_DESC_SIZ Buffer is 256 bytes.Questions to begin with:What is the use case for USBD_MAX_STR_DESC_SIZ Buffer?Do we store the configured USB-descriptors in this buffer? see https://www.beyondlogic.org/usbnutshell/usb5.shtml#DeviceDescriptorsHow big should this Buffer be (minimal)?My problem:When i change the Buffersize (USBD_MAX_STR_DESC_SIZ) to lower values than 256 or higher values than 512 bytes the USB device is recognized by the OS (WIN10) but i cannot connect to the device/com-port via HTerm or an application. What could be the reason for this behavior?
STM32CubeMX Version 4.26.1 (STM32Cube V1.0) which is the most recent version (as of late August 2018) available for download. It includes FreeRTOS version 9.0 as middleware. Will ST do updates to provide FreeRTOS updates such as FreeRTOS version 10.0? Or is a STM32CubeMX user expected to download the source code from https://www.freertos.org/FreeRTOS-V10.html and build the newer library(ies)?
I have been working with a USB custom HID device trying to get it to work on Android but I'm failing miserably... It looks like Android keeps re-detecting the device every so many hundreds of milliseconds. Here is the dmesg output:[ 735.380289] input: Motus Nova Hand Peripheral as /devices/platform/fe3a0000.usb/usb6/6-1/6-1:1.0/0003:0483:C0ED.1A2C/input/input6703 [ 735.434904] hid-generic 0003:0483:C0ED.1A2C: input: USB HID v1.11 Joystick [Motus Nova Hand Peripheral] on usb-fe3a0000.usb-1/input0 [ 735.484185] input: Motus Nova Hand Peripheral as /devices/platform/fe3a0000.usb/usb6/6-1/6-1:1.0/0003:0483:C0ED.1A2D/input/input6704 [ 735.545130] hid-generic 0003:0483:C0ED.1A2D: input: USB HID v1.11 Joystick [Motus Nova Hand Peripheral] on usb-fe3a0000.usb-1/input0 [ 735.612361] input: Motus Nova Hand Peripheral as /devices/platform/fe3a0000.usb/usb6/6-1/6-1:1.0/0003:0483:C0ED.1A2E/input/input6705 [ 735.681471] hid-generic 0003:0483:C0ED.1A2E: input: USB HID v1.11 Joystick [Motus Nova Hand
I'm working with a Stm32 Nucleo F429Zi board and I am having trouble getting the SWV working when debugging. When I created a blank new project and went through the Atollic tutorial to redirect printf() to go to _write() and eventually ITM_SendChar(). This project worked and printed everything fine so I decided to go ahead using CubeMX because I wanted to include lwIP.After creating the project in CubeMX, without altering many settings, I went through the exact same steps as the previous project to redirect printf. However, when I tried printing in a loop the swv console only showed very strange characters (possibly from the extended ASCII codes) but only all at once, not a constant feed from the loop. I tried just using ITM_SendChar and followed it when debugging all the way until it executes, ITM->PORT[0].u8 = (uint8_t) ch; where the ch value was correct. However, when I look at the SWV trace log, the values going into port 0 are random and happen at the same time.Since this proje
STM32F767 project, converted from 4.25.0 to 4.26.1, now it has an error in the ADC1, 2, and 3 configuration where the Scan Conversion Mode is set to Enabled. This value is apparently bogus and I must pick a new value from the drop down list that only contains the value Enabled.Oooohhhh kaaaaay???I guess my testing is done for now.Andrei from The Great White North
Posted on December 22, 2017 at 14:44Dear ST,First is there any publicly available Bug report site?Found with SMT32CubeMX Version 4.23.0and using the latest firmware package for stm32f4 (1.18.0)USB Custom HID Device: STM32CubeMX Parameter Setting: USBD_SUPPORT_USER_STRING is always enable and can not be disabledUSBD_SUPPORT_USER_STRING does not enable the function: uint8_t * USBD_FS_USRStringDesc (USBD_SpeedTypeDef speed, uint8_t idx , uint16_t *length); as its preprocessor check, checks on USB_SUPPORT_USER_STRING_DESCuint8_t * USBD_FS_USRStringDesc (USBD_SpeedTypeDef speed, uint8_t idx , uint16_t *length); is not added to the USBD_DescriptorsTypeDef when USBD_SUPPORT_USER_STRING is enabled.resulting in a INVSTATE Usagefault when the device is connected to a pc for the first time where the PID / VID combination is unknown.uint8_t * USBD_FS_USRStringDesc (USBD_SpeedTypeDef speed, uint8_t idx , uint1
Posted on May 24, 2017 at 10:49CubeMX (latest version: 4.21.0) advises NOT to use the 'systick' clock has HAL systick source when FreeRTOS is used (a message box pops up when generating code). So I switched to TIM6.When doing this the generated code seems buggy: in the main() function a call to HAL_Init() initializes the TIM6 and it queries the HAL for the current PCLK clock to do so. However, since SystemClock_Config() is called only later on in main(), the PCLK clock will change and we end up in a wrong systick frequency. In my case it ended up in 50uS instead of 1mS.This happened generating code for stm32l476, and it became very evident when using the IWDT: despite it relies on LSI clock, the SW initialization code relies on HAL systick for register write timeouts. It failed and ended up in an error handler.Using the 'systick' clock as HAL systick seems not affected (BTW why doing this is discouraged by CubeMX?)#cubemx-bug
Posted on November 20, 2017 at 16:58On our custom board we don't use RTC clock for time or date.But I need to activate RTC to use Backup registers, and we use GPIOC PIN13 in mode OUTPUT_PP for leds.With STM32CUbeMX 4.23.0 and STM32CubeF1 package 1.6.0 I have two options in Pinout :Activate RCT with 'RTC OUT' as 'Disable' or 'No RTC OutPut'.When 'RTC OUT' is 'Disable', in the screen 'RTC Configuration', I can't select 'No output on tamper pin' so GPIOC PIN13 can't be used.When 'RTC OUT' is 'No RTC OutPut', in the generated code we have :hrtc.Init.OutPut = RTC_OUTPUTSOURCE_NONE; which is OK, but the initialisation of time and date uses RTC_BKP_DR1 with value 0x32f2.So I have the choice of not beeing able to use GPIOC PIN13 or RTC_BKP_DR1.I choosed the first Option, and then manually modify the generated code to write hrtc.Init.OutPut = RTC_OUTPUTSOURCE_NONE; Is there another solution ?Is it possible to have the option 'No output on TAMPER pin' when 'RTC OUT' is 'Disable' in S
Posted on February 16, 2018 at 14:27If I auto generate the code for IAR with STM32CubeMX, it still holds the files open (the IAR files *.ewp and *.ewd).To reproduce- Generate code for IAR- With STM32CubeMX still open, try to delete the generated *.ewp file. See the attached screenshot for the error message that appears.#stm32cubemx #iar
I would like to transfer the data coming to ADC to DMA and average the signals after 15 seconds. I could able to read the values from ADC BUT here are my problems. I am using industrial acceleromoeter while reading adc values i could able to see them when i change the position of accelerometer it does appear in the watch windows of keil but when i connect it to the motor ( to measure the vibrations) I am always getting an error that cannot able to acccess the target !!! so I have decided to store the values read by adc to DMA and calculate the average. I have seen many tutorials but i could not able to find a way to send the data to dma ? how can i achieve that ???? all of the tutorials are using external rc osillator where as i dont prefer to use external oscillator. wont dma work without external osicllator ? hwo can i store the values of adc everytime they change?
2018-08-21 10:07:21,259 [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(ProjectBuilder.java:574) at com.st.microxplorer.plugins.projectmanager.engine.GenerateProjectThread.run(GenerateProjectThread.java:
Posted on February 06, 2016 at 23:01Hello, while dealing with custom bootloader we have to switch application to certain offset address. Thus we have to move the address of the vector table. While HSE values are supported to be customized vector table offset is not. please add following lines to the system_stm32xxxx.c files: /* &sharpdefine VECT_TAB_SRAM */ ---> &sharpif !defined(VECT_TAB_OFFSET) &sharpdefine VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field. This value must be a multiple of 0x200. */ ---> &sharpendif Thanks, Regards, Adib. /******************************************************************************/ #cubemx-stm32-hal
When I start a new project with a STM32L4R9IDISCOVERY board, the OLED display is not configured and I can't manage to configure it correctly? Why isn't it already configured? Does anyone have a working .ioc file that I can use? None of the example projects include an .ioc file
MCU : STM32F446RETCubeMX Version : 4.26.1===Hi! I'm currently developing usb CDC(Communication Device Class / USB-OTG-FS) through STM32CubeMX.When I upload the automatically generated code without changing any settings, the usb device will not be recognized properly as follows.(Error code 10)However, following this YouTube video https://youtu.be/oDoavXrQdEg, change the CDC_DATA_HS_MAX_PACKET_SIZE value of usbd_cdc.h file from 512 to 256, and you can see that it is normally recognized.Is this a problem with the STM32CubeMX library?Thanks! =)
Posted on February 15, 2017 at 04:28It seems STM32CubeMX can not handle well with UTF8 source file.If my main.c is encoded in UTF8, regenerating code in STM32CubeMX will lead to a scrambled mess. Characters above ASCII range are converted to gibberish, even if they are in user code section. It's nonsense.https://community.st.com/s/topic/0TO0X000000BTr8WAG/stm32cubemx
Hi. I am working on stm32f072c8t6 mcu using cubemx and want to develop a touch sensing application. I created a project using CubeMX for this. I would like to include the project library "STM32_TouchSensing_Library", but I encounter many errors. What could be the solution to this problem?CubeMX_Touch_Test\CubeMX_Touch_Test.axf: Error: L6218E: Undefined symbol TSL_Init (referred from tsl_user.o). CubeMX_Touch_Test\CubeMX_Touch_Test.axf: Error: L6218E: Undefined symbol TSL_acq_BankConfig (referred from tsl_user.o). CubeMX_Touch_Test\CubeMX_Touch_Test.axf: Error: L6218E: Undefined symbol TSL_acq_BankGetResult (referred from tsl_user.o). CubeMX_Touch_Test\CubeMX_Touch_Test.axf: Error: L6218E: Undefined symbol TSL_acq_BankStartAcq (referred from tsl_user.o). CubeMX_Touch_Test\CubeMX_Touch_Test.axf: Error: L6218E: Undefined symbol TSL_acq_BankWaitEOC (referred from tsl_user.o). CubeMX_Touch_Test\CubeMX_Touch_Test.axf: Error: L6218E: Undefined symbol TSL_dxs_FirstObj (referred from tsl_user.o
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.