Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Posted on July 23, 2017 at 05:38Hello anybody.I have one problem. File SetupSTM32CubeMX-4.22.0.linux do not start to execute any way. Previously I has used it on Netrunner 17 without any problems. Please tell me how to fix this. Thank you in advance.#ubuntu #stm32cubemx #stm32cubemx-install
Posted on March 06, 2017 at 01:23I am using an STM32L4 device. I am making a USB device that uses CDC and have battery charge detection enabled. I need to request 500mA from the USB port if a standard downstream port is detected. It appears that the max power is hard-coded for 100mA in 'Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c' and that this will be overwritten by STM32CubeMX every time the project is regenerated if I modify this file.Is there an expected way that this value should be changed for CubeMX projects? There does not appear to be any public interface into this device structure.#stm32l4 #hal #usb #usb-power #cdc #stm32cubemx
Posted on July 20, 2017 at 20:13Anyone had success in adding their own code library to stm32CubeMX for inclusion in generated source code? In addition to FreeRTOS, which is currently supported, I'd like to be able to add FreeRTOS+CLI, FreeRTOS+FAT SL, as well as some of our own code libraries for various commonly used tasks, drivers for sensors, and the like.#freertos+fat #freertos+cli #3rd-party-library #customize-stm32cubemx
Posted on August 03, 2016 at 19:57Hi,Recently acquired a laptop with a 3240 x 2160 display running Windows 10. Some of the dialog boxes and configuration tables are unusable because the fonts used do not fit within the space allocated for the text. To replicate, select the Configuration tab, then the NVIC configuration dialog.I have been unable to find a workaround within Windows. Any suggestions?Thanks,Steve #cubemx-screen-resolution-font
Posted on June 20, 2017 at 17:49Since my last update of WIN10, Java and STM32CubeMX (I did all after Windows update) my STM32 Cube MX crashed on lot of actions : can not load a project, can not save project etc... Any suggestion ? My PC runs WIN10 64bit#java8 #cubemx-4.21
Posted on May 19, 2017 at 14:34As in title, when trying to save a new project the Cube crashes generating a Java error log file.Seems to happen just before opening a file dialogue window to ask where to save the new project.#cube-mx #stm32cubemx-java #java-crash
Posted on July 13, 2017 at 10:03Hello there,I am using CubeMx with FreeRTOS for a while now. I am still not sure how does the checkbox ''Uses FreeRTOS functions'' works under NVIC Configuration settings:I would appreciate an explanation on what does this really do and what exactly are ''FreeRTOS functions''. I have noticed that interrupts generated in CubeMx sometimes get this checkbox checked automatically and sometimes not. I dont know what does it depend on.#interrupts #freertos #cubemx
Posted on April 08, 2017 at 11:03Hi. I'm using STM32CubeMX V4.20.1 and System Workbench for STM32(SW4STM32) now.Actually I use CubeMX plugin for SW4STM32.the problem is...when I click 'Generate Code' after changing the gpios or timers or any changes, project properties(more exactly Optimization) that I was set before changed after load the modified project.I'll show you example pictures.I think that is CubeMX V4.20.1's one of problem#optimization #propertied #cubemx #sw4stm32
Posted on July 06, 2017 at 19:06Hi. I have noticed that STM32CubeMX has some limitations when configuring a USART for synchronous mode. I am using a STM32F413RGTx running at 100 MHz.I am configuring USART3 for synchronous transmit/receive (pseudo SPI master mode) and would like it to run as fast as possible. The HAL sets the OVER8 bit with the following comment in USART_SetConfig:Force OVER8 bit to 1 in order to reach the max USART frequenciesSo this is not even a user-configurable option. This is great because it means that USART3 should be able to run at 6250000 baud. However, CubeMX does not allow me to set a value greater than 3125000. I have tried setting the value to 6250000 in the code and, as expected, it works fine. Anything higher fails immediately. When configuring the peripheral in asynchronous mode and explicitly setting 'Over sampling' to '8 Samples' CubeMX allows 6250000 baud. So I believe CubeMX should allow 6250000 in synchronous mode as well.Next, I am tryi
Posted on December 06, 2016 at 18:20The define USBD_CDC_INTERVAL in usbd_conf.h generated with CubeMX is not used anywhere in the project. It was used in the old USB Library in the usbd_cdc_core.c SOF-Function, which no longer exists.#f4 #usb #cubemx #cdc #vcp
Posted on July 04, 2017 at 18:33Repro steps... Create a new CubeMX project, selecting the Nucleo32 L432KC board.In settings give it a name and select to generate code for the 'System Workbench for STM32' selecting SW4STM32Generate the code and open the project.The project does not build.The problem is that core_cm4.h cannot be found - its not present.Can anyone help?Paul#nucleo-l432kc #cubemx #sw4stm32
Posted on July 02, 2017 at 03:41 I am using STM32CubeMX 4.0 and STM32L4 HAL version 1.8.1. TheHAL_PCDEx_BCD_VBUSDetect() function for 'USB' and 'USB_OTG_FS' differ and the 'USB' version is buggy. TheHAL_PCDEx_BCD_VBUSDetect() functionis supposed to callHAL_PCDEx_BCD_Callback(hpcd, PCD_BCD_DISCOVERY_COMPLETED) when the BCD discovery is complete. However, the way the 'USB' version of thefunction is written, it will only be called when a 'Charging Downstream Port' is detected and not for the other port types. The code as written looks likethis: /* If Charger detect ? */ if (USBx->BCDR & USB_BCDR_PDET) { /* Start secondary detection to check connection to Charging Downstream Port or Dedicated Charging Port */ USBx->BCDR &= ~(USB_BCDR_PDEN); USBx->BCDR |= (USB_BCDR_SDEN); HAL_Delay(300); /* If CDP ? */ if (USBx->BCDR & USB_BCDR_SDET) { /* Dedicated Downstream Port DCP */ HAL_PCDEx_BCD_Callback(hpcd, PCD_BCD_DEDICATED_CHARGING_PORT); } els
Posted on January 20, 2017 at 12:31 I have a very typical application here - long periods of minimal current consumption (15 minutes to 24 hours sleep duration) with short periods of activity in between. In my particular case, this is mostly ADC and GPIO manipulation (which explains some of the extra initialisation in my code which is unused) but for this example, I am just trying to achieve the following: Turn LED onDelay 1000ms (using HAL delay - don't care about efficiency here)Turn LED offEnter Stop modeHave RTC Wakeup Timer return me to Step 1. after 5 seconds So far this works well for the first loop through - I see the LED turn on, turn off after 1000ms, stay off for 5 seconds (current draw drops to approx. 2uA) and then turn on again. However, the LED never turns off again. I can't use SWD to debug this as the board seems to never enter Stop mode with SWD debugging active. My code (partially generated by STM32CubeMX and partially from reading docs) is as below: #include 'm
Posted on June 23, 2017 at 15:24Hey guys,i just created a project for the STM32L4 Discovery Board with CubeMX (I'm using Atollic TrueStudio). I assume that CubeMX always generates the same structure, namely the folders 'Drivers', 'Inc', 'Src', 'startup' and 'Middlewares'. Is this assumption correct or is this structure only generated when using CubeMX with Atollic TrueStudio (e.g. I could have used Eclipse + OpenSTM32 instead)?Now, where can I place my own source code and header files? Do I have to use the folders 'Src' and 'Inc'? I would prefer using my own structure, because I only want to port an already existing software to STM32.Thanks in advance! #atollic #cube #hal #cubemx #truestudio #source-file #header-file #mx #own
Posted on June 27, 2017 at 16:45Hi,I have an issue with generating the project code on any of my Macs running macOS. I'm using STM32CubeMX V4.21.0 but already discovered the same issue in previous versions.Whenever I choose 'Generate Code' from the 'Project' menu CubeMX starts generating the project as expected.The code generation stops at the stage 'Generating XXX project...' (where XXX is any of the existing toolchains) which means that the progress bar does not advance anymore and the generation is not completed. The application itself remains reactive.I can quit CubeMX with the result of having an incomplete project without the toolchain specific project files (e.g. .project, Makefile, linker script etc.).This problem is independent of the selected MCU and toolchain.Can anybody help?Alex#mac-os #problem #stm32cubemx #code-generation
Posted on June 17, 2017 at 22:41Hi everyone,I decide to start a discussion about the use of the Keil (v5) logic analyzer with the STM32F7 MCU.For example: in the STM32F7 cube examples there is an interesting example about the ADC capability of the F767ZI board. The value are stored in the memory of the MCU itself and it follow that the value can't be visualized in the tool. In the Keil's documentation is clearly wrote that the registry value and other type can't be added as trace. Arguing with a couple of colleagues they've told me that doing some 'tricks' like copy the registry value in a global variable(that I'm sure that can be added as a trace) is a solution. What do you think about ?Can you give useful tips ?Thanks in advance#keil #stm32-keil-cubemx #logic-analyzer #stm32
Posted on June 15, 2017 at 21:54Hi, I'm trying to develop my own libraries to use a lux sensor MAX44009 with an STM32L476RG-Nucleo. I've modified the example I2C_TwoBoards_ComPolling and using its configuration I was able to set up and read the values even using interrupt of the sensor. Now I would use no more the I2C3 but I want to change on the I2C1. I try to generate the code through CubeMX. But I have some problems, first of all CubeMX doesn't generates/includes the library stm32l4xx_nucleo.h and trying to include stm32l4xx_hal_conf.h (generated by CubeMX) I have this error compiling with the MDK-ARM v5:../Inc/MAX44009.h(37): error: &sharp20: identifier 'HAL_StatusTypeDef' is undefined HAL_StatusTypeDef getLux(I2C_HandleTypeDef I2cHandle, float *luxVal);../Inc/MAX44009.h(37): error: &sharp20: identifier 'I2C_HandleTypeDef' is undefined HAL_StatusTypeDef getLux(I2C_HandleTypeDef I2cHandle, float *luxVal);../Inc/MAX44009.h(38): error: &sharp20: identifier 'HAL_
Posted on June 06, 2017 at 19:48Hello.I use STM32CubeMX for programming of a STM32F407 Discovery board.I want to play a sound using audio codec.Unfortunately I can't communicate with codec by I2C and I2S.There is no any sound in headphone.Is there any simple example for Audio Playing in STM32CubeMX without using DMA or Interrupt or USB?Maybe using a MEMS Mic?#audio-playing-in-stm32cubemx
Posted on June 08, 2017 at 10:48Hi,i'm trying to generate code of STM32072B-EVAL via CubeMX, the Tollchain i use is MDK-ARMV5.I notice that the board support in manage run-time environment didn't match with STM32072B-EVAL evaluation board and it represent another board which is STM32072-Discovery , and so i can't find GLCD_fonts.c or Joystick.c files.Thanks for help,#cubemx #stm32072b-eval #mdk-armv5
Posted on June 06, 2017 at 21:19Hello.How can I Play a Sound by STM32F407 Discovery Board in STM32CubeMX Not Using DMA or Interrupt?I Tried to Communicate With Board Using I2S and I2c, But I Couldn't anyway?For Example I Couldn't Read any Register of Codec?(in STM32CubeMX)#stm32cubemx
Posted on June 01, 2017 at 13:47Hi,I'm using STM32CubeMX (STM32Cube_FW_F3_V1.8.0) to generate ADC HAL code for my custom board based on STM32F303VB.I see that ADC HAL is not implemented. Only API is givenIs it available in new releases (if any) ?Is there any ETA on when the complete HAL will be available for ADC?.Any inputs will be of help.Regards, Pj#hal #adc #stm32cubemx
Posted on May 25, 2017 at 22:17I've experienced random and unexplainable problems with CDC communication over USB, while using CubeMX-generated code.The PC was always able to enumerate the COM port, but sometimes it was unable to open it, (Windows reports a ''wrong parameter'' error).After a thorough research and the use of an USB sniffer, I think I've identified the problem.The issue comes from a wrong answer to the PC's request GET_CODING_LINE.When the PC issues this request, it expects a payload containing line speed in bps, parity, stop bits and databits.CDC_Control_FS() in usbd_cdc_if.c should fill the payload with correct data, but in facts its body is empty. There a switch listing the various CDC messages, but the case statements do nothing.case CDC_SET_LINE_CODING: break; case CDC_GET_LINE_CODING: break;(...and so on...)For this reason, the payload contains random data that, in most cases, prevent the communication to work.Here is
Posted on May 25, 2017 at 13:10I use SW4STM32. I noticed that when I generate a project with SW4STM32, the speed of my STM32F401VBT6 is twice faster. For example, HAL_Delay(1000) actually awaits 500ms. USART1 transmits data on the speed 230400, although 115200 is specified in cofiguration.But if I generate a project using CubeMX it's all ok. I transfered all the source code from the project generated by CubeMX into the project generatd by SW4STM32, but the problem remained.#cube-mx #clocks
Posted on May 24, 2017 at 11:49Hi, I've got this from the F446 data sheet.I hope that I can run TIM2 at 180MhzHowever, it seems that APB1 peripheral CLK can only run at 90Mhz as the cubeMX indicates as followed:So can I really make TIM2 run at 180MHz or not?!Thanks for reading!,Zt #tim2 #stm32f4 #clock-configuration #cube-mx #stm32f446
Posted on May 24, 2017 at 10:11Hello World,Im new to working on LwIP and I want to create a simple Webserver based on LwIP stack and FreeRTOS configured by the CubeMX. I read carefully all the user manual. I also tried to run and digged into the Netconn HTTP server example, but I still couldnt make it work! I guess my configurations in the CubeMX has problems, so I post them here, if anyone have successfully worked on this project can help me, if possible could I have your .ioc file to study more about my problem ?Thank for read my post in advance My ETH configLwIP config. I disabled HTTPD feature.This is my FreeRTOS configsThis is my StartDefaultTask function that I followed an tutorial. I replaced the task in the example by this code and it worked great.void StartDefaultTask(void const * argument){ /* init code for LWIP */ MX_LWIP_Init();/* USER CODE BEGIN 5 */ struct netconn *pListeningConnection, *pAcceptedConnection; err_t err; pListeningConnection = netconn_new(NETCON
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.