Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I just updated CubeIDE to the newest (1.9 ?) version.Because under Pinout & Configuration, Pinout menu -> List pin compatible MCUs (or similar),it was stuck at 31% with a CubeIDE version from some months ago with then no CPU load anymore on CubeIDE while it was 99% before I call it "stuck".The output one could already see, with the old verison, seemed reasonable, though.Now with the newest version, I am at 50% progress bar for half an hour or so, still high CPU load (but oscillating around 50%, not 99), it shows already around 80'000 devices and most of them with clearly a useless package.Yes, I did search for "Packages: all" - because I want to get not only exactly the same package, but also different formats with the same number & functions of pins, or perhaps even some with more pins.But this "at 50% and seemingly not getting forward" view shows a lot of 20-pin MCUs for my project with a 48-pin MCU where every single usable pin is assigned a function.The "Comment" on thos
Hello together, I'm working with the CubeMX for the first time and unfortunately I haven't found a reason why in the category "Project Manager" the dropdown menu "Toolchain/IDE" some choices are grayed out and can't be selected. I would like to use the option "Other Toolchains (GPDSC)" (see attached picture)I noticed that the option is not always grayed out and depends on which Evalboard I selected at the beginning.E.g. the option is available for the Nucleo64 boards. But with the H7 DISCO boards the option is gray again. Does anyone know what it depends on when the option is available?I would be glad about an answer. Thank you.
I continually get the error "The ST intranet updater server is unknown: mcucrossselector.codex.cro.st.com"Is there a way to dispel this error, or is it intentional?Occurs on all project generations or updates.Occurs on EWARM V7, EWARM V8, and STMCubeIDEFirmware Package used: 1.5.0 and upSTM32CubeMX Version: 6.4.0. and up
STM32CubeIDE Version: 1.9.0 Multi channel ADC with DMA cannot use on HAL library.The HAL does not set DMA CCR prorery. MINC, PSIZE and MSIZE are not set any value, (Their all value 0). Can I set them at application program ?
Is there a way in STM32CubeMX for STM32H7 DualCore projects to choose where to generate IRQ Handler for DMA in MEM2MEM mode?My use case is as follows:Regarding performance I stay only at D2 domain side (M4's side).I don't want to use D1->D2 or D2->D1 bridges, so at the moment, my main application is at M4's side.I use:STM32CubeIDE in Version: 1.7.0that embeds STM32CubeMX in Version: 6.3.0-RC5 Build: 20210714-1111 (UTC)When I activate DMA in MEM2MEM mode, there is no way to tell the STM32CubeMX tool that I want it's IRQ Handler to be generated on M4 side - like for every other periphery.It always generates it at M7's side no matter if I choose to show all interrupts at the following picture and tick one that I want at M4's side.
Under linux ubuntu 22.04: Cycling between IDE and CubeMX. When I start the CubeMX from the IDE (via the .ioc file) and change anything in the MX / save it; it trashes the whole project. (Include paths) This works OK in windows, so this is a BUG.Additionally, all my changes are always overwritten when I edit the MX. I am not sure if this is a way it supposed to be or I am doing something wrong.Please help. Error from Console: ake: *** [Drivers/BSP/Components/subdir.mk:65: Drivers/BSP/Components/S2LP_Fifo.o] Error 1In file included from /home/peterglen/STM32CubeIDE/workspace_1.9.0/x-cube-subg2/Drivers/BSP/S2868A2/s2868a2.c:20:/home/peterglen/STM32CubeIDE/workspace_1.9.0/x-cube-subg2/Drivers/BSP/S2868A2/s2868a2.h:30:10: fatal error: s2lp.h: No such file or directory 30 | #include "s2lp.h"
Moved a design from STM32F745Z to STM32H743Z (rev Y as thats the only thing ever available you know) with the help of CubeMX's "List Pinout compatible MCUs" and for the most part that went dandy except when trying to using PortC!It took me a while to figure this out but PC2 and PC3 (which worked fine in F745Z) did NOT pulse or correctly (or read values) when setting those pin as Digital GPIO on H743ZBacktracked a bit and noticed changes in the way PC2 (PC2_C) and PC3 (PC3_C) are described from TT_a and Analog only functions to a bunch of things in later revs of the datasheets.My #1 request for a future build of CubeMX is to be able to quickly show which pins are FT_x and TT_x. THIS IS CRUCIAL FOR SYSTEM DESING and is NOT something that CubeMX knows at ALL.We need a way to highlight all FT pins, all TT pins, etc. Especially if a pin was FT_x and it changed to TT_x in a subsequent MCU - this is NOT pinout compatible!But back to my question, is there any way to salvage my boards and
I'm using STM32CUBEIDE with macOS. I do not know why I cannot click the button there.Are there any solutions for this issue?There is no this kind of problem in the Windows system. Thanks
STM32CubeIDE Version: 1.9.0Hal MCU : v1.5.1Chip: STM32G061C8U6 If you enable USART1 in asynchronous mode for pins PA9 and PA10 the auto generated code incorrectly sets the port to AF0 when it should be AF1 see datasheet table 13 or port.png.When set to the correct port it transmits but at very low amplitude of a few mv. See scpoe.pngSetting the pins to PB7 and PB8 UART works fine.How to get it working for pins PA9 and PA10?
I configured ADC Channel 9 on STM32L4-Nuceo board its working but If change the ADC channel to 10 Or 13 its not working.Please find the below ADC Configuration./* Definition for ADCx clock resources */#define ADCx ADC1#define ADCx_CLK_ENABLE() __HAL_RCC_ADC_CLK_ENABLE()#define ADCx_CHANNEL_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()#define ADCx_FORCE_RESET() __HAL_RCC_ADC_FORCE_RESET()#define ADCx_RELEASE_RESET() __HAL_RCC_ADC_RELEASE_RESET()/* Definition for ADCx Channel Pin */#define ADCx_CHANNEL_PIN GPIO_PIN_4#define ADCx_CHANNEL_GPIO_PORT GPIOA/* Definition for ADCx's Channel */#define ADCx_CHANNEL ADC_CHANNEL_VBAT//ADC_CHANNEL_9#define SA
Hi, Is there anyway to use a global variable to change the USART interface configuration such as the BaudRate :static void MX_USART1_UART_Init(void){If(A = 1){huart1.Init.BaudRate = 38400;}If(A = 2){huart1.Init.BaudRate = 9600;}}Not sure if this is possible?
Hello,My design does not produce interrupts and I'm not sure why.Goal:SPI6 gets a 2MHz clock (external). For each clock the BDMA should take one 1 byte from a buffer (SRAM4, D3) and put it to the MISO. The BDMA runs double buffered => it should cycle M0/M1.void MX_SPI6_Init(void) { /* USER CODE BEGIN SPI6_Init 0 */ /* USER CODE END SPI6_Init 0 */ /* USER CODE BEGIN SPI6_Init 1 */ /* USER CODE END SPI6_Init 1 */ hspi6.Instance = SPI6; hspi6.Init.Mode = SPI_MODE_SLAVE; hspi6.Init.Direction = SPI_DIRECTION_2LINES; hspi6.Init.DataSize = SPI_DATASIZE_8BIT; hspi6.Init.CLKPolarity = SPI_POLARITY_LOW; hspi6.Init.CLKPhase = SPI_PHASE_1EDGE; hspi6.Init.NSS = SPI_NSS_SOFT; hspi6.Init.FirstBit = SPI_FIRSTBIT_MSB; hspi6.Init.TIMode = SPI_TIMODE_DISABLE; hspi6.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE; hspi6.Init.CRCPolynomial = 0x0; hspi6.Init.NSSPMode = SPI_NSS_PULSE_DISABLE; hspi6.Init.NSSPolarity = SPI_NSS_POLARITY_LOW; hspi6.Init.FifoThres
I am using STM32G070RBTX micro configured for ADC with DMA. My project works well configured with CubeIDE version 1.8.0. However after I updated to 1.9.0, the ADC Continuous Conversion Mode cannot be Enabled from CubeMX. It force to use Discontinuous mode, which cannot be Disabled!Please see the attached picture.
Dear @Khouloud ZEMMELI Please review my below request. The STM32CubeMX generated code does not mark functions present with the Interrupt Related C file as __weak.https://github.com/STMicroelectronics/STM32CubeH7/issues/175Please help fix the issue.Thanks,Rajeev
I have mapped inputs to multiple channels of ADC1 and ADC2 in the pinout of my STM32F103RCTx MCU with CubeMX. However, while I am able to configure DMA for ADC1, the "DMA settings" tab for ADC2 does not appear when I open the ADC2 configuration in CubeMX. Is DMA unavailable for ADC2 in this MCU? Or is there a way to enable it? I could not find any mention of this in the datasheet, so any help would be appreciated.
Hello All,I have updated to CubeMX 6.5 and STM32F4 1.27 and now thinks are failing in my project.I could reproduce this using NucleoF429 board.When I create example from example selector LwIP_HTTP_Server_Netconn_RTOSit activates ethernetI can ping the boardwhen I create example from the board selector nucleo429 and preset all peripherals to default it failsI add LwIPassign BSP driver LAN8742TCP protocols are workingICMP ping results in timeout on PCMy investigation shows:a ping response is sentthe ping response has ICMP CRC set to 0(zero) and fails CRC check on pCeven I manually set ICMP CRC before sending via HAL driver, the driver modifies this CRC to 0(zero) ??????also: I have to comment some stupid regression errors in the lwipopts.h/*----- Default Value for H7 devices: 0x30044000 -----*/ // #define LWIP_RAM_HEAP_POINTER 0x30044000 /*----- Value supported for H7 devices: 1 -----*/ // #define LWIP_SUPPORT_CUSTOM_PBUF 1you see this is very STM32F7 specificI compared the working RTOS
Hello all, I want to interface my STM32f407vgtx microcontroller with ILI9325 lcd and for this I have initialized FSMC as per my requirements. But to properly communicate with ILI9325 LCD , I want to read/write pins named NOE, NWE, CS , Cmd/Data .Can we have some APIs available to do this. Please help.
I am using the example project GPIO_IOToggle_TrustZone for NUCLEO-U575ZI-Q and added Timer3 for Non-secure application via CubeMx with Interrupts enabled. When this Timer is started with HAL_TIM_Base_Start_IT the application runs into SecureFault_Handler. Something seems to be not correctly configured by CubeMx.
..
Hello There,I'm working on IAP app and need to relocate vector table and came across NVIC_SetVectorTable().But I'm not able to find this API. I'm using CubeIDE and did generate the initial code with inbuilt cube mx. Any help is appreciated.Regards,Keshav Aggarwal
I am currently working on a project that would require me to access a STM32 microcontroller from Simulink. I am going to be using the STM32L476RG momentarily and STM32F722ZE in the future. I have tried using the STM32-Mat file, but it doesn't allow me to run the code through Simulink in real-time. I have tried using the L476RG board with the STM32 Embedded Code Support, but there are no options to add a configuration file from CubeMX. Are there any ways to do so? Thank you.
I'm try to read acceleration from KX132 accelerometer with a STM32F446ZE through I2C with DMA. I create a project with STMCubeMX and enable DMA and interruptions.The accelerometer has six register each one of 1 byte where save acceleration in this format: XOUT_L,XOUT_H, YOUT_L, YOUT_H, ZOUT_L, ZOUT_H.I want to read this registers continously with I2C DMA but I have a problem, only can read once time and never jump the complete transfer interruption again. I'll leave parts of my code so you can understand what i'm doing.This configuration it was create by STMCubeMX. I choose DMA_CIRCULAR mode to repeat reading by DMA but doesn't work.i2c.c/* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "i2c.h" /* USER CODE BEGIN 0 */ /* USER CODE END 0 */ I2C_HandleTypeDef hi2c2; DMA_HandleTypeDef hdma_i2c2_rx; DMA_HandleTypeDef hdma_i2c2_tx; /* I2C2 init function */ void MX_I2C2_Init(void) { /* USER C
I am trying to use I2C DMA on 2 STM32H7B3I-DKs. After the message is sent to the slave device using HAL_I2C_Master_Transmit_DMA(), the slave seems to receive the message as HAL_I2C_Slave_Receive_DMA() returns HAL_OK but HAL_I2C_SlaveRxCpltCallback() fails to execute afterwards.Master config:static void MX_I2C4_Init(void) { hi2c4.Instance = I2C4; hi2c4.Init.Timing = 0x00303D5B; hi2c4.Init.OwnAddress1 = 0; hi2c4.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT; hi2c4.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE; hi2c4.Init.OwnAddress2 = 0; hi2c4.Init.OwnAddress2Masks = I2C_OA2_NOMASK; hi2c4.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE; hi2c4.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE; if (HAL_I2C_Init(&hi2c4) != HAL_OK) { Error_Handler(); } /** Configure Analogue filter */ if (HAL_I2CEx_ConfigAnalogFilter(&hi2c4, I2C_ANALOGFILTER_ENABLE) != HAL_OK) { Error_Handler(); } /** Configure Digital filter */ if (HAL_I2CEx_ConfigDigitalFilter(&hi2c
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.