Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I want my project to ignore the stm32h7xx_it.c file, but CubeMX auto-generates this every time. Is there a way I can ignore certain files from compiling in the extSettings before it generates a uvision/cubeide project?
I'm trying to create a very simple baseline project for an STM32L552CCTx MCU: FDCAN1, USB (device), SWD and a LED. No HSE / LSE clocks present. The 'Clock Configuration' tab works well and a proper clock is found, but in the 'RCC' configuration the project is stuck. "MSI Auto Calibration" shows as "enabled" and with an error indicator. The dropdown only shows a greyed out "enabled" option, so no way to change it.If I disable the USB support the option becomes "disabled", but the RCC still shows an error icon (but no longer at a specific parameter).I'm using STM32L5 MCU Package v1.3.1In an unrelated (?) issue it seems not possible to generate code with a Makefile for this MCU?
I have a board that has a connector. Another board is mounted on top of it. This additional board may require either GPIO, or UART, or SPI on the same signals. But I need to change peripherals and work with pins without recompiling the code, without changing the firmware. It is required to do this at run-time (dynamically). The question is how to achieve this using STM32CubeMX and HAL/LL code? Are there any AppNotes? (I can achieve this by programming registers, no problem, I'm interested in how this is done within the framework of the CubeMx / HAL / LL paradigm).
When I attempt to generate code in the Device Configuration Tool, the firmware updater starts automatically and fails to install. I tried to force the Off line mode in firmware updater but it ignores that and always tries to download and install. I have a local copy of the firmware and put that path in the Firmware installation repo dialog. How do I configure Cube to stop trying to download and use the local copy? running latest version - 1.12.1
I'm completely lost in ADC working modes. And it happens EACH time I start a new project with internal ADC. So it ends up taking a lot of time to get the ADC do what I want.I need the following behaviour: 2 channels of single adc runs forever.By my requests I collect N last saved conversions for each channel.Again for example, I press the button and collect last 16 conversions for both channels.Intervals for that conversions are defined by timer or it would be fine if they are running at whatever rate.I guess it's free-running-scan-continious-forever modeIf someone can help with settings in CubeMX and code to set this up it would be great!
1. The HRTIM FAULT function can only be triggered once, and reset by software after triggering. So is there any use of hardware periodic triggering (that is, reset immediately after triggering, similar to TripZone in C2000)? I want to use it as a cycle-by-cycle protection function.2. CUBEMX enables Blanking by default when initializing HRTIM. I think it will cause misunderstanding?
Hello!I have my custom board with STM32F767 and external SDRAM (MT48LC4M32B2 - 128MBit) on it.Basically the connection between them works fine, because I'm able to write and to readout the data. The problem is, that if I try to access an address above the half of my external SDRAM, the the program crash... Here is the connection between the MCU and SDRAM:My settings in CubeIDE:When I read the datasheet of the STM32F7x then it says, that the starting address for the external SDRAM connection shall be the 0xC000 0000: So I have used this as the starting address for my SDRAM. By this I shall have a maximum address space of 0xC000 0000 - 0xCFFF FFFF.The connected SDRAM has 4 banks with 4096 rows x 256 columns x 32Bit cell width.So one bank shall have 1.048.576 cells x 32Bit = 4.194.304Byte and so = 4.194.304 addresses.This also means that one bank has an address space of 0x0040 0000 (4.194.304Byte) and the whole SDRAM shall have an address space of 0x100 0000 (4 x bank addre
No PSSI DMA settings. Thought that the MCU does not support DMA, but the manual says that it does.Current STM32Cube MCU Package v1.2.0
When changing the HSE clock divider to 2 in STM32cubeMX the code:/** Enable the HSE Prescaler */ __HAL_RCC_HSE_DIV2_ENABLE();Is generated after the HAL_RCC_ClockConfig is called. causing the clock divider on the HSE not to be taken into account when calculation the peripheral clock dividers/periods.
I have a custom board with an STM32F417 MCU. It needs to communicate with a PC over Ethernet (UDP).I have used Cube MX 6.5.0 to set up my project and have enabled LWIP. The board is now sending/receiving UDP packets with the PC. However when the PC sends a UDP packet with a payload of 1007 bytes, the packet becomes truncated. Only 958 bytes of data appear in the pbuf in the udp_receive_callback . It appears that there is a problem reconstructing the packet payload from the pbuf chain. I am calling pbuf_copy_partial(p, buff, p->tot_len, 0) in the udp_receive_callback function. Any suggestions regarding this issue? Has anyone successfully received large UDP packets using a Cube MX 6.5.0 generated project?Thanks
Hello all,i am facing an issue with FDCAN2 on the eval board mentioned above. No data is transmitted before and after the transceiver. So the data is stuck in the Tx buffer and not sent out. With FDCAN1 everything works fine and I created a working sending simulation. Is there an issue in the internal mapping? Pins are PB5 and PB13 for correspondig RX and TX before transceiver. Resistor is applied correctly.Anyone knows there could be a firmware issue here? I check bus activity low level with Oszi and finished with Vector VN1630. If needed i can share code. But maybe not necessary if its known already.Thanks!Nils
Hello Guys, Last week I tried to add an SDCard Module on my STM32L476 project and i followed this tutorial: embetronicx.com/tutorials/microcontrollers/stm32/stm32-sd-card-interfacing-with-example/I can't read the SD in fact I get back FR_NOT_READY when I execute the f_mount method.Please Note that: The project already contains FREERTOS and it used TIM1 as a timebase source for SYS as it was recommanded so i had to add my timers function in the timer interruption call back like this:void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim){ /* USER CODE BEGIN Callback 0 */ if (htim->Instance == TIM1) { if(Timer1 > 0) Timer1--; if(Timer2 > 0) Timer2--; } /* USER CODE END Callback 0 */ if (htim->Instance == TIM1) { HAL_IncTick(); } /* USER CODE BEGIN Callback 1 */ if (htim->Instance == TIM2) { DebounceHWTimerHandle(&Joystick); } /* USER CODE END Callback 1 */}
I have a custom-designed STM32F427 board that works with the code generated with STM32Cube V1.0 (Version 4.14.0). The design was based on an ST's STM32F427 eval board that supports ethernet MII configuration with DP83848 PHY chip. The ethernet works correctly under FreeRTOS+LWIP options.To try Azure RTOS for my new project with the same board, I have installed STM32Cube 6.4 and the necessary libraries for the STM32F4xx processor. So far, all the porting works when using ThreadX, FileX, and UsbX. When trying to enable the ethernet (NetX) for MII mode, I encountered a problem in that the DHCP client was unable to obtain an IP address from my router. I search through all the NX (NetX) examples from STM32Cube 6.4 and 6.5 but was unable to find one that uses MII mode. In this design, we are using DP83848 PHY chip. When selecting MII mode in "ETH Mode and Configuration" window, it displays "DP83848_PHY_ADDRESS". under PHY option. But in the "Network Interface->Ethernet Phy Interface" unde
I configured ADC1 in CubeMX for a NUCLEO-U575ZI-Q board. When testing my application HAL_ADC_Enable(); returned error, RDYFLAG was not set after the timeout.When comparing my configuration to an example I discovered that HAL_PWREx_EnableVddA(); is not called in SystemPower_Config();. The issue got resolved with enabling vdda. I wonder if this is a code generation bug or I made some mistakes during configuration.
Hello, I am running STM32CubeIDE Version: 1.12.1 on Ubuntu 22.04. I am using a NUCLEO-H745ZI-Q board. Is it possible or reasonable to expect that I should be able to configure the Make tool chain using the STM32CubeIDE instead of the default STMCubeIDE tool chain? I also tried using STMCubeMX standalone but the Make options seem to be grayed out/inactive. I found AN5361 helpful for getting started but have not come across perhaps some deeper dive documents for Dual Core project setup.
I have a design with an STM32F415 MCU which has two I2C-peripherals: a CAT24AA16 serial EEPROM and a TSC2007 touch screen controller on the same I2C bus. I2C setup is standard as generated by CubeMX. I find that 90% of the time the system starts up OK with both peripherals working fine, but in the other 10% the system starts up with always both peripherals seemingly not working and HAL_I2C_IsDeviceReady giving HAL_ERROR as result on both peripherals. Usually giving one or more system resets on the MCU (without power-cycling the whole PCB) solves the problem which leads me to believe that it's not the peripherals that are in some wrong state but something within the MCU is. Giving the statistical nature of the problem, it could perhaps be a register or variable which is not initialised properly and has an undefined power-up state.Has anyone experienced this and/or has any tips where to look for a solution?
STM32CubeIDE/CLT 1.12.1 was released on st.com as well as an in-tool update patch. Aligned with STM32CubeMX v6.8.1 that is available for download .Caution: The in-tool update does not allow updating drivers and ST-LINK server tool. Full installer is required for this.Main issues fixed in this patch:This patch release fixes the issues related to the following cases:STM32CubeIDEIncorrect permission of lib jspawnhelper in jre packaged in STM3CubeIDE.STM32CubeIDE does not launch with Linux FedoraSTM32CubeCLT Variable path is removed when CubeCLT is installed.STM32CubeMXCubeMX project Cube IDE complication error on ETHUpdate to CubeMX 6.8 adds non-working VOSRDY flag check to SystemClock_Config() on STM32F7 using LL drivers.[X-CUBE-FREERTOS][v1.0.1] Can't select previous version with secure context[STM32CubeMX][MDMA] MDMA GUI crash causing issue with toolWhere do I obtain CubeIDE ,CLT 1.12.1 and CubeMX 6.8.1 ?For IDE 1.12.1 : https://www.st.com/stm
I created STM32CubeMX project (.ioc) on my old Windows 10 computer, GENERATE CODE worked without any issues, and after a certain time I copy .ioc file on my new Windows 11 computer (fresh install of STM32CubeMX). When I press GENERATE CODE, IDE is freezing in the stage: Copying libraries files... and the only way how I can close IDE is over Task Manager by End process.In the log file, this is the last records:2023-05-16 11:08:53,297 [INFO] ProjectBuilder:2996 - Time for Copy HAL[0] : 127mS.2023-05-16 11:08:53,308 [INFO] ProjectBuilder:4304 - Project Generator version: 3.19.22023-05-16 11:08:53,406 [INFO] ConfigFileManager:1483 - The Die is : DIE4622023-05-16 11:08:53,410 [INFO] ApiDbMcu:507 - Load IP Config File for TOUCHSENSING2023-05-16 11:08:53,621 [ERROR] GenerateProjectThread:93 - javax.xml.transform.TransformerException: java.io.FileNotFoundException: C:\ (The system cannot find the path specified)I have currently two projects and both behave the same.Patrik
Hi,I'm start to Develop a New Project system with eLearning programs. I would like to mainly use a single development tool: STM32 CubeIDE with an .ioc configure and C Firmware Source and Include code... 1) Is it possible to use only the CubeIDE almost exclusively, to create a project, add firmware, debug and program the board to micro STM32 ?? (Eventually use the Cube MX only to retrieve a project from a NUCLEO BOARD ??)2) Personal Workspace: is it recommended or possible to have a single Workspace, or to have Many, one for each project/board ?? (I would like to keep all my projects and firmware of my electronic Boards separate!)3) The "Repository" directory is unique ?? and is it outside from my main project ?? this folder not need backup ?? can it be recreated if i lost my PC ?? 4) To Save and backup my projects, is it enough to save all the root Project Explorer, or do I have to keep and save also the entire Workspace??Thank you very muchMichele
I was trying out CubeMX for an STM32H753 part and noticed in the Clock Configuration tab that the DIVP1 drop-down can not be set to 1. Shouldn't this be possible? According to the reference manual the DIVP1 field of the RCC_PLL1DIVR register should be possible to set to 0 meaning divide by 1. And in fact I have manually used this configuration in my project in order to get a 480 MHz output from PLL1 and it works fine to set this field to 0. Is this an oversight in CubeMX?
I'm configuring an STM32U575 within the STM32CubeMx tool where the HSE clock is being used. I'm trying to enable the CSS for the HSE clock via the Clock Configuration menu, however enabling/disabling the CSS via this tool doesn't seem to actually set the RCC->CSSON bit. I can configure this CSSON bit manually, but just wanted to check before doing so.
I tried to enable spi 1 and I get this, but everything seems to be configure?
I use STM32L476 MCU I configured SPI1 master full duplex with DMA for Rx .When I use the HAL function: HAL_SPI_Receive_DMA(&hspi1, &RawSig[0], SigBufLng));The IRQ is not calledvoid DMA1_Channel2_IRQHandler(void){ /* USER CODE BEGIN DMA1_Channel2_IRQn 0 */ /* USER CODE END DMA1_Channel2_IRQn 0 */ HAL_DMA_IRQHandler(&hdma_spi1_rx); /* USER CODE BEGIN DMA1_Channel2_IRQn 1 */ /* USER CODE END DMA1_Channel2_IRQn 1 */}Please advise
..
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.