Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hello,I start the development on a STM32F446MEY but I meet a problem on the USB part.I use STM32CubeMX to set my board in device mode (CDC) but when I load the program, it does not appear in my device manager while the initialization proceeds without worry.I tried the solutions found on various forums but none worked.Would you have a solution to my problem?I use:Windows 10ST Link V2 (Nucleo-F401RE)The kit : https://www.st.com/en/evaluation-tools/steval-bcnkt01v1.htmlAtollic 9.3.0STM32CubeMX 5.2.1Firmware : STM32Cube_FW_F4_V1.24.1Antoine
Hi,I'm trying to get working system using NUCLEO-L053R8 and X-NUCLEO-IKS01A1.I need to print sensor data on UART and later on I want to use FreeRTOS on that system.I'm using STM32CubeMX v5.0 to generate initialization code and Atollic TrueSTudio v9.1.0. for development.Firstly, I've tried to generate code _just for device_ STM32L053R8T6 but then whole integration process looked cumbersome because BSP calls in all examples.To stay on safe side I've decided to generate code fo NUCLEO-L053R8 board.I've set pins as in example project "DataLogger" for NUCLEO-L401RE.For additional software I've selected: X-CUBE-MEMS1 v5.2.1 - Board extension: IKS01A2, X-CUBE-MEMS1 - Application: IKS01A2_DataLogTerminalI'm using I2C1 and UART2 which are selected as interfaces for BSP software.I'm using BSP for IKS01A2 because there is no IKS01A1 with idea that I will manually change files with those from X-CUBE-XT1.For start, project builds successfully.I want to use printf() and there are _write() and __io_p
..
Receiving this message:"This project has been created with CubeMX version 5.1.0The Firmware Package (STM2Cube FW_F4_V1.24.0) required by the Project is not the latest version available in your STM32CubeMX Repository.You can continue with this Firmware Package,or you can migrate the project and work with the latest version of the Firmware Package.Warning: some parameters may be modified during migration to be compliant with latest Firmware versionContinue now or Migrate Project?| Continue | Migrate | Cancel | "I select "Continue" and the mouse pointer spins like it's trying to open the project, but nothing actually happens.I've tried several previous commits to make sure my project file isn't corrupt, same result with all previous projects.Ubuntu 18.04, CubeMX 5.2.1
I'm working with the STM32F429ZI (Nucleo) board. STM32CubeMX v5.2.0, generating code for TrueSTUDIO.I've created a basic CubeMX project with just LWIP enabled, which responds fine out of the box to pings, and I've successfully implemented the echo server examples, so I'm rather sure the hardware is working.Naturally, I'd rather tie lwIP to an OS if I could.I've created a new project in CubeMX with FreeRTOS and LWIP. I've set a static IP address, and otherwise kept default settings. The SYS timebase is set to TIM1.The code seems to be running, but I cannot ping my dev board. Wireshark shows traffic when the board starts up, but I'm not an expert in debugging it. I have had a look at various example projects with netconn, but it appears they use older/different files/function calls than those generated by the latest version of CubeMX, and I haven't been successful in porting them. I know that without FreeRTOS the main loop requires calls to MX_LWI
I downloaded the project (using CubeMx) from GITHUB, which was already made.But I do not know what version of CubeMx this project was made with. (eg Version 5.1.0)I also do not know what version of the firmware package it is.(eg STM32Cube FW_F1 V1.3.1)This project is a project made four months ago.Is there anyone who can answer these two questions?Currently, I am using the latest version of CubeMx.Thank you. ^^
Hello,I use a STM32F777 configuration with LwIP stack and multitasking FreeRTOS, generated with CubeMX. By default there will be assigned a thread priority of 3 for LwIP threads (TCPIP_THREAD_PRIO, DEFAULT_THREAD_PRIO and SLIPIF_THREAD_PRIO). But a value of 3 will be interpreted as osPriorityRealtime (= +3) and assigned to an absolute priority value of 6 (highest priority level)!So these threads are in immediate concurrence with the ethernet input thread ethernetif_input() and causing synchronization problems in preemptive multitasking OS:Sometimes ethernetif_input() is interrupt in function HAL_ETH_GetReceivedFrame_IT() and OS is switching to tcpip_thread, that try to send a frame with function HAL_ETH_TransmitFrame() in low_level_output(). That fails because ethernet ressource is locked by the receiving function of other thread ethernet_input() in this moment (HAL_BUSY). Unfortunately the return code of HAL_ETH_TransmitFrame() is not evaluated, so this failure is very hard to find. T
Generating code for "Other Toolchain" with a Middleware Enabled in MX generates the code as expected.Then, if you disable the Middleware in MX and generate again, the files that were generated previously are not Deleted from the Inc and Src folder.In my case, some #include directives are not removed neither.
I have generated code from CubeMX for STM32L462CE controller for using the RTOS but it is not working as expected. I attached the CubeMX file. Is there any setting missed in CubemX? Please help me.
I have just installed CubeMX 5.2.0, and opened an saved Cube .ioc file. When I go to Project Manager the path to "Project Location" seems to be fixed to <Cube Project dir>/<Project name>I've uninstalled Cube, deleted all directories and files related to Cube, gone thru registry to make sure no entries are remaining. And then installed Cube again.But when I open the Cube .ioc file I get no chance to change the Project Location.Do I have to start all over again and define all pins and so forth just to be able to change Project Location??? Isn't there a quicker way ?
I've my LCD backlight control on STM32F429 pin PB4, and as a digital output it was fine. I chose this pin because it can be configured as a PWM output.I've set up TIM3 Ch1 in CubeMX. I just want a free-running PWM with a dynamically configurable duty cycle, so I can set my backlight to 'bright', 'medium' or 'dim' settings.I'm getting no signal on PB4, it is just sitting high.Did I miss something? Is there an 'enable' or 'start' instruction I need to add?
hi.When I try to open the project file, it does not respond and it does not go any further.Perhaps this is happening since the update.attaching debug information, please confirm.
The version CubeIDE calls only produces HAL code whereas 1.4.0 produces LL code and I'd like to keep the projects all together in the one system.Edit : I've now found where CubeIDE calls CubeMX and it says it's 1.4.0, but the Project Manager->Advanced Settings still only offers me HAL options on all the peripherals. Any ideas how to make it offer LL ?
We have been having issued with printf redirection on more recent Cube versions, so I got out on eval board and built a Hello World project.I created it with CubeMX 4.27, got it working (seems ?default? libraries at some point, as I had to change __io_putchar to _write() to get the io to display)To test the HAL and hardware I manually wrote to UART3, which had to work before I could redirect anything useful...I then opened the IOC project with Cube 5.2 and regenerated code.Reopened the workspace, reimported the project, built and ran the code.I still got the output from HAL_UART_Transmit(&huart3, buf, strlen(buf), 0xFFFF);but the printf caused a hardfault in puts_rI have attached both projects, did the libraries change again?Tom
Hello,I test the CDC with my STM32F407VgTx in an up-to-date environment: Windows 10 / STM32CubeMx v5.20 / SW4STM32 / System WorkBench for STM32/ST-LINK V2The VCP v 1.50 driver for windows 10 has been installed normally and declared active.The source of the CDC program used is:\ STM32Cube_FW_F4_V1.24.0 \ STM32Cube_FW_F4_V1.24.0 \ Middleware \ ST \ STM32_USB_Device_Library \ Class \ CDCWhen running the program, when init the USB, I get Windows Error 43. Unknown USB Device (descriptor request failure).Can you help me solve this problem?In advance thank youRobert
I wanted to test event groups to replace a bin semaphore and as the title says, i can't enable xEventGroupSetBitFromISR on CMSISv1 nor CMSISv2 wrappers.Is there another way to enable that function? Maybe in a unofficial way?Regards,Carlos
Hi to everybody, I am a total mcu beginner and I cannot compile a project. I did not write a single line of code, just tried to build. When I tried to do it I had 12 identical errors.What can I do? I have a STM32 F446RE Nucleo 64 board, Cube MX 5.1.0 and OpenSTM32 System Workbench 2.9.
on the win10, the stm32cubemx generated project does not work, i do not know what's the errorint main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_USB_DEVICE_Init(); /* USER CODE BEGIN 2 */ /* USER CODE END 2 */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ } /* USER CODE END 3 */ }
Coming from a short odyssey with CubeMX and System Workbench, I just installed STM32CubeIDE. I decided so 'cause I had quite some issues in copying projects from the examples provided in the CubeMX installation and thought STM32CubeIDE would be a completely different thing. Now I discovered that it basically is "just" a bundle of System Workbench and CubeMX. Plus, i now cannot find any example projects, which were previously available with the CubeMX package. Aren't they included anymore with the installation (although ir's a smashing 2 GB on the HD)? If not included, what would i need to install to get the examples again (I guess i don't want to install CubeMX again since that functionality right now is integrated in CubeIDE). Once i have an example library, how would i copy an example (in order to keep the original untouched) to a new project that i can freely modify?I'm not at all a newcomer to MCU development, but with this step I failed miserably with SW.Many thanks in advance,--
I dont know which chip to select for STML443C6 on StcubeMX.Thank you.
Hi all, I am trying to use internal temperature sensor on Nucleo L011K4 and using macro from LL library (__LL_ADC_CALC_TEMPERATURE_TYP_PARAMS) I get complete garbage. STM32Cube_FW_L0_V1.11.2STM32CubeMx 5.0.1LL libraries used, no HALADC is running in DMA mode with HW oversampling by 8, 12.5 clock S&H time (should be enough for TEMP sensor) and each ADC EOS this value again averaged in SW.When I looked closely to datasheet and reference manual I wrote my code without this macro and I still getting nonsense data out of it. I found that TS_CAL2 value from Factory Option bytes is far different than expected value, so when I used 670 constant instead - and I got something real temperature finally.Question 1: why at production calibration value is like 1.5 times bigger than supposed to be?Question 2: Is there a bug in LL macro? It looks like there one unnecessary multiply by 1000Question 3: Do I need to recalibrate temp sensor at 130C or can use different temperature?Question 4: Can I sto
Is there any workaround that I can use to solve the issue regarding the super tiny font size with the ioc editor. It is actually quite difficult to work with at the moment given my laptop screen resolution is 3000x2000.
I use windows 10 and stm32cubemx and when i try to start a project by choosing a board selection it shows me errors downloading *.json files (mcusdocs.json, ...)I deleted the .stmcufinder .stmcube .stm32cubemx directories but no effect!
Hello There,I am using CubeMX 4.26.1.I have noticed the following bug: Apart from that each time I regenerate the project in CubeMX, my truestudio project's optimization flag gets reset (this bug exist for years now), I have just noticed recently that my post build script entry gets reset, to the state before regeneration as well.Each regeneration there are always weird little changes with spacec and etc. in the project... But that doesn't interfere much. The worst problem is the one above. Using kdiff I compared the .cproject files before and after regenaration, the differences are there:I can provide further information if needed, can anyone confirm?@Imen DAHMEN @Nawres GHARBI
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.