Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
..
Hi,I am working on STM32G0 Nucleo Board with STM32 Cube IDE 1.3.0 .How to Use STM32G0 Power Voltage Detector (Internal ) with STM32CubeIDE ?I want my MCU should only start when Voltage goes above 2.5V (Say)..The above setting nothing generate in .c file for PVD.I have also checked below example but nothing configured in PWR_PVD.ioc..\en.stm32cubeg0\STM32Cube_FW_G0_V1.3.0\Projects\NUCLEO-G071RB\Examples\PWR\PWR_PVDThanks in advice ..Any Other option..--Karan
Following the instructions below, I create a new project.https://wiki.st.com/stm32mcu/wiki/STM32StepByStep:Step2_Blink_LEDBut it seems that the led blinking thread fails to get started.I must comment some system initialization to get the default thread ran./* Initialize all configured peripherals */ MX_GPIO_Init(); MX_ADC1_Init(); MX_ADC3_Init(); MX_CRC_Init(); MX_DMA2D_Init(); MX_ETH_Init(); MX_FMC_Init(); MX_HDMI_CEC_Init(); MX_I2C1_Init(); MX_I2C4_Init(); //MX_IWDG_Init(); MX_LTDC_Init(); MX_QUADSPI_Init(); MX_RTC_Init(); MX_SAI1_Init(); MX_SAI2_Init(); //MX_SDMMC2_MMC_Init(); MX_SPDIFRX_Init(); MX_SPI2_Init(); MX_TIM1_Init(); MX_TIM3_Init(); MX_TIM10_Init(); MX_TIM11_Init(); MX_TIM12_Init(); MX_UART5_Init(); MX_USART1_UART_Init(); MX_USART6_UART_Init(); MX_USB_OTG_HS_PCD_Init(); //MX_WWDG_Init();What's the problem?
I use cubeMX version6.0.0,generate a simple serial port project, I need to click three times 'run' can run to the main function(break point) use jlink in debug mode , The serial port tool has output character,. But direct download and re power-on does not work.Self-made board: stm32f446ret, other projects(mbed os) can be downloaded and run directly. In debug mode, only need to press run once, there is no problem with the board
Hello,I am trying to set the clock frequency to max of 480 MHz. I tried 120 MHz and there is not problem with that. The block code is very similar for both, so not sure what is going wrong.I feel the oscillator fails and goes into an error state. Based on datasheet max speed is 480 MHz and PLLM, N, Q are set based on valid values taken from CubeMX.I also tried all possible value for "FLASH_ACR_LATENCY_15WS" since this is the only difference between 2 code blocks of 120 and 480.Here is USART output:[2020-11-15_10:56:03:539] Before.[2020-11-15_10:56:03:539]SYSCLK : 64000000Hz[2020-11-15_10:56:03:539]HCLK : 64000000Hz[2020-11-15_10:56:03:539]PCLK1 : 64000000Hz[2020-11-15_10:56:03:539]PCLK2 : 64000000Hz[2020-11-15_10:56:03:539] AFTER 120.[2020-11-15_10:56:03:539]SYSCLK : 64000000Hz[2020-11-15_10:56:03:539]HCLK : 64000000Hz[2020-11-15_10:56:03:539]PCLK1 : 64000000Hz[2020-11-15_10:56:03:539]PCLK2 : 64000000Hz[2020-11-15_10:56:03:574]Someth
Hi,I'd like to use C++, and I had a question.Currently my procedure is:(a) Configure the peripherals using CubeMX (since I wish to use MX HAL) and generate code .(b) In CubeIDE I rename the main.c file to main.cpp, and then from the project window I right-click the project name and select Convert to C++Although that procedure initially works, the problem is that if I subsequently wish to make additional peripheral configuration changes, things get messy, because if I use CubeMX and click on Generate Code, it won't modify the existing main.cpp and will instead create a new main.c file, because it thinks I'm coding in C. Now I have a merge problem to get the auto-generated content in main.c into main.cpp and then have to re-click on Convert to C++. What's the correct procedure I should be using?
I setup SPI using CubeMX and set First Bit as LSB First as described in the datasheet.I thought setting this will handle LSB data by itself however it is not working as expected.Below code only work with _SPI_HARDWARE_LSB defined which means I have to manually realign all the data in the buffer when transmitting through HAL_SPI function.Is this is known issue or is how LSB suppose to be handled?void spi_rw(uint8_t* data, uint8_t count) { HAL_GPIO_WritePin(RFID_SS_GPIO_Port, RFID_SS_Pin, GPIO_PIN_RESET); HAL_Delay(1); #ifndef _SPI_HARDWARE_LSB for (uint8_t i = 0; i < count; i++) { data[i] = reverse_bit(data[i]); } HAL_SPI_TransmitReceive(&hspi1, data, data, count, _SPI_TIMEOUT); for (uint8_t i = 0; i < count; i++) { data[i] = reverse_bit(data[i]); } #else HAL_SPI_TransmitReceive(&hspi1, data, data, count, _SPI_TIMEOUT); #endif HAL_Delay(1); HAL_GPIO_WritePin(RFID_SS_GPIO_Port, RFID_SS_Pin, GPIO_PIN_SET); } uint8_t reverse_bit(uint8_t num) { uint8_t resu
does any body know how to define a pin in CubeMX, so it would be GPIO_INPUT and GPIO_OUT at the same time?I want to write to a pin and read it's state too
Hello!Before I forget:I'm using Windows 10. Fresh machine.I have downloaded the latest CubeMX. When I wanted to install it, it asked me for Java, so I installed the latest Java. Now it says:The application requires a Java Runtime Environment 1.8.0_45 (64 bit). But the only one I could find is the one which is downloadable now, which is newer than _045. Actually the version is 1.8.0_261. Does anyone have a solution to this problem?Thanks,Pascal
When I run code generated by CubeMX (version 5.6.1) using Atollic IDE or VisualGDB w/ VisualStudio and STlink as Segger or as STlink after first run that don't works well (Read Errors) I can't connect anymore the microcontrollers for debug (virually they are destroyed for debug) . If I write the code manually and in my old projects it never happens. Is it some declaration on some header? Can anyone help me?
We are working with the STM32 B-L4S5I-IOT01A discovery kit in the idea to then develop a product with the MCU STM32L4S5VIT. We are working with the SW4STM32 toolchain and want to integrate both FreeRTOS and LwIP (for MQTT protocol) on the STM32CubeMX project generator. However, it seems that it is not possible to generate such code based on theses configurations. Is there a reason for that or a work around ? Could we download directly FreeRTOS from their website and integrate this code easily?Thank you in advance for your help.
I remember there was a feature in STM32CubeMX for pin out compatibility check which was very useful for designers to find a pin compatible uController. I can't find the same feature here in the latest STMCubeIDE. Is this feature obsolete?I'm wondering what is the best option in H7 product line to be replaced with my current micocontroller which is STM32F765ZGT6-LQFP144?Thanks in advance
I'm trying to enable ADC channel 16 on STM32G031J6 but the IDE does not list up the channel.What is the matter? How can I enable the channel? My environment as bellow.STM32CubeIDEVersion: 1.4.2Build: 7643_20200813_1322 (UTC)STM32CubeMX - STM32 Device Configuration ToolVersion: 6.0.1-RC3Build: 20200810-1643 (UTC)STM32CubeG0 Firmware Package V1.3.0 / 25-June-2019
I'm trying to use the DMA on an STM32 H743ZI2 nucleo dev board to continuously read values from an ADC input into a buffer. I'm trying to follow along the tutorial here: https://www.digikey.com/en/maker/projects/getting-started-with-stm32-working-with-adc-and-dma/f5009db3a3ed4370acaf545a3370c30cHowever, when I try to configure my ADC parameter settings, I do not see an option to enable DMA continuous requests, and as a result, my callback functions aren't being called. How can I enable continuous DMA requests if this option is unavailable, or change settings such that this option appears?Below are screenshots showing my issue: Thanks,chris
Hello,For my first project with STM32 microcontrollers I try to use STM32F769I-Discovery board with TouchGFX 4.13.0 Designer and STM32CubeIDE 1.3.0.So I first generate a project with TouchGFX, generate the code and then open the project from the directory “STM32CubeIDE�? created by TouchGFX.Its work fine, an .ioc file is created and changing things with TouchGFX can be see on the DISCO screen once the debug launched.Problems starts when I try to add Ethernet peripheral on my application. I select ETH from Connectivity categories, with RMII and interruptions activate.Once the code created I found only MX_ETH_Init() function on the main.c. It is normal ? On the “ETH Firmware driver API description�? chapter of HAL description this is only step 3 of 12 (page 317 of dm00105879). This is the expected behavior ? Why not having all necessary code ?So, to go further I search examples for ETH complete initialization and I wanted to add LWIP from .ioc. The problem is that once code was generated
Hi, guys!I like CubeMX and it's code+project generation features very much, thank you for a great job! But now I've faced the followed issue. Cube deletes <FileOption> and <GroupOption> sections when regenerates project.That is inconvenient because I use Keil's project/file setting in order to allocate code, const and other data to the specific memory ranges. It works well and much more conveniently for me than writing scatter file by hands and writing a lot of __attributes__(.sections()) over all the files and variables/arrays, especially generated by CubeMX. That is extra important when I want to use handy HAL IRQ handlers, but they work too slow from the FLASH.So, my feature request is the following:when CubeMX regenerates Keil project let it keep <FileOption> sections near regenerated files.For example:Here is the Keil Project fragment with file stm32h7xx_hal_dma.c allocated by file settings menu to the specific RAM area, defined in Project Settings-> Targ
Hi everyone,I wanted to uninstall my STM32CubeMX but uninstaller didn't run. I have downloaded latest version of java.Then I tried to ran uninstaller.jar in cmd I got this error Error: Could not find or load main class com.izforge.izpack.uninstaller.UI would like to know is this bug or i have any chance to uninstall CubeOnik
Because of a mismatch in the enumeration of USB speeds the HAL_PCD_ResetCallback() can not determine the correct USB speed and calls Error_Handler().In this example it occurs in CubeIDE v1.0.1 on STM32F767VIT6 with the USB-FS interface configured as CDC-ACM device. But it also happens with different targets and on CubeMX 5.1.0, 5.2.0 and 5.2.1. Here's a copy of the HAL_PCD_ResetCallback() function in "usbd_conf.c":void HAL_PCD_ResetCallback(PCD_HandleTypeDef *hpcd) { USBD_SpeedTypeDef speed = USBD_SPEED_FULL; if ( hpcd->Init.speed == PCD_SPEED_HIGH) { speed = USBD_SPEED_HIGH; } else if ( hpcd->Init.speed == PCD_SPEED_FULL) { speed = USBD_SPEED_FULL; } else { Error_Handler(); } /* Set Speed. */ USBD_LL_SetSpeed((USBD_HandleTypeDef*)hpcd->pData, speed); /* Reset Device. */ USBD_LL_Reset((USBD_HandleTypeDef*)hpcd->pData); }When I debug I can see that "hpcd->Init.speed" is set to 3, while the only valid options here are 0 (USBD_SPEED_HIGH) and 1
Hi all,I have noted a lack in CubeMX SAI configuration. When the interface is configured as a Master, it is only possible to set frame length to a power of two from the drop-down list. Despite when I configure it manually to 20 (I need this to implement XY100 interface, and it is one of the standard frame lengths for SAI also), it works perfectly.In Slave mode, frame length is freely configurable.Regards,Dmitry
OS: Windows 10IDE Version: 1.4.0My project resides one a network storage folder, accessable by //BALA/my_project.The network storage is further linked to a virtual storage device, namely B:When trying to compile the project, the linking process returns the following error:...ld.exe could not open /BALA/my_project/STM32F078CBTX_FLASH.ld : File not foundThe problem is due to the notation of the absolute path of the linker script inside the Makefile. arm-none-eabi-gcc -o "MicPcb_Code.elf" @"objects.list" $(USER_OBJS) $(LIBS) -mcpu=cortex-m0 -T"\\BALA\my_project\STM32F078CBTX_FLASH.ld" --specs=nosys.specs -Wl,-Map="MicPcb_Code.map" -Wl,--gc-sections -static --specs=nano.specs -mfloat-abi=soft -mthumb -Wl,--start-group -lc -lm -Wl,--end-groupThe double backslash at the beginning of the path is interpret as escaped backslash during the execution of ld and hence, leads to an path starting with a single backslash and hence is invalid.The solution is, however, quite simple! In the Makefile eith
Hi All,How do I generate a generic Makefile from STM32Cube ide? Preferably for L56 series. Currently when I create a project the Makefile option under toolchains inside the cubemx is grayed out. The CubeMX is installed as part of IDE. thanks,
Hello,I have a STM32CubeMX installed on an offline cumputer (that cannot be changed!)I would like to install the last firmware for L0 familly, so I download:stm32cube_fw_l0_v1110.zipstm32cube_fw_l0_v1113.zip (patch only file)From local, there is no problem to install the version 1.11.0. But when selecting the 1.11.3 file, there is an error "corrupted or not recognized package)How can I install the 1.11.3 FW version? I tried to extract the 1.11.3 zip in the repository directory. But after that, the version 1.11.3 do not appear in the Packages Manager, and version 1.11.0 is no more there!Thank you for your helpAntoine
Hello, The stack size is defined by a macro definition, INTERFACE_THREAD_STACK_SIZE inside the "ethernetif.c" file located under: LWIP/Target.I had to manually increase the size due to stack overflow and any new code generation via CubeMX overwrites those changes. Since code generation always defaults the size of INTERFACE_THREAD_STACK_SIZE to 350, I would hope that there would be a way to adjust it via CubeMX?
I am getting this error, while the setup in cubemx is for this chip... Using SW4STM32.Wrong device detected, check your project and the board(s) connected Open On-Chip Debugger 0.10.0+dev-00021-g524e8c8 (2019-04-12-08:48) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html none separate Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD adapter speed: 4000 kHz adapter_nsrst_delay: 100 Info : clock speed 4000 kHz Info : STLINK v3 JTAG v1 API v3 SWIM v1 VID 0x0483 PID 0x374F Info : using stlink api v3 Info : Target voltage: 3.309742 Info : Unable to match requested speed 4000 kHz, using 3300 kHz Info : Stlink adapter speed set to 3300 kHz Warn : UNEXPECTED idcode: 0x0bc11477 Error: expected 1 of 1: 0x2ba01477 in procedure 'program' in procedure 'init' called at file "embedded:startup.tcl",
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.