Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
When generate code for STM32H562 with active ADC + GPDMA1, I can't see code for configuration of GPDMA1. I see only this :static void MX_GPDMA1_Init(void){ /* USER CODE BEGIN GPDMA1_Init 0 */ /* USER CODE END GPDMA1_Init 0 */ /* Peripheral clock enable */__HAL_RCC_GPDMA1_CLK_ENABLE(); /* GPDMA1 interrupt Init */HAL_NVIC_SetPriority(GPDMA1_Channel0_IRQn, 0, 0);HAL_NVIC_EnableIRQ(GPDMA1_Channel0_IRQn); /* USER CODE BEGIN GPDMA1_Init 1 */ /* USER CODE END GPDMA1_Init 1 *//* USER CODE BEGIN GPDMA1_Init 2 */ /* USER CODE END GPDMA1_Init 2 */ }This is error or I don't know where to find it ?
Hello, I have a NUCLEO-H745ZI-Q I am using it to self study a bit more at the assembly level of the CM4/CM7. I used STM32CubeMX to create a Make Project for the MCU only i.e. not the BSP / Nucleo board. I did this so I could poke around at the CM4/CM7 generated files and a few questions have come to mind:Is there an existing example of a bare minimum Dual Core project?I am thinking Linker Scripts for CM4/CM7 and any startup code/vector tables/ assembler/ gcc command line/Markfile etc? I will probably strip down the CubeMx generated stuff but just in case that already exist somewhere? When I examine the CubeMX generated CM4 Makefile I notice that CPU=-mcpu=cortex-m7Should this not be CPU=-mcpu=cortex-m4?When I use Advanced Settings to change the settings from HAL to LL CubeMX still generates/adds the HAL files into the Project/Drivers/STM32H7xx_HAL_Driver/Src directory. Is this expected ? If I deleted them I would expect that is OK
When does a version of STM32CubeMX or STM32CubeG0 and specifically the associated drivers become Unsupported? Where is this info published? Or does the latest version automatically render the previous version Unsupported.
Hello engineers, I am working on a GUI interface with touchgfx. After a long period of exploration, I am now able to burn the official touchgfx sample to the development board, and now I am running into a few new problems.Question 1: I have burned the official simple example: The Button Example shows how to handle clicks of a Button using interactions. It also shows how to interact with the nresenter A bit of logic to enable and disable buttons is done by the presenter. Through this example, I want to click the button to send data and cooperate with mobdus devices to achieve serial communication function. However, the difficulty is that I do not know how to configure usart/uart serial port through STM32cubeMX to achieve serial communication function with mobdus devices. RS232 or RS485 serial port is not found in the development board.Question 2: Is the fan-out board (MB1280) used? If so, how should I use it? If you can use it, please give me some related circuit diagrams and use tutori
Hi,After updating STM32CubeMX to version 6.11.1, while configuring the ADC for the STM32H743, the oversampling settings now only allow pre-defined options. The generated code consequently employs pre-defined macros. However, the macro is not defined in , leading to a missing macro definition error during compilation.ADC_VER_V5_V90stm32h743xx.h
This reference is got from errata sheet of stm32h7. here they said some reason for related to my problem . and they given problem description and workaround . but in code(cubeMX generated code for ethernet udp socket programming) where i should apply these conditions i did not understand . so plz can anybody write (modify the hal functions) and share me the links or images of your modified code . thanks,,,,,, *---> Subsequent packets are not transmitted when the transmit queue is flushed during packettransmissionDescription===========:When the transmit queue is flushed, the MTL layer completes the ongoing packet transmission and waits for astatus from the MAC layer. This status is provided to the application by updating the FF bit of the TDES0 transmitdescriptor word0. The MTL layer provides a dummy status with the FF bit set for every packet flushed in thetransmit queue. After the transmit queue flush operation is complete, the transmission restarts for packe
Somewhere between CubeMX 6.9 and 6.11 a bug has been introduced that reports the PLLQ can only be less than 33MHz. It is not honouring the Voltage scale set in the RCC parameters.I have set the voltage scale to "Scale 1" but it still reports the PLLQ to be limited to 32MHz which is actually "Scale 2"
Hi,I am attempting bare-metal programming for UART data transmission and reception on the STM32L476RG microcontroller. After transmitting data, observed that the debug terminal is only receiving NULL characters. Please help. Here is the code: void SystemInit(void);void USART2_Init(void);void USART2_TransmitChar(char data); uint32_t SystemCoreClock = 80000000;void USART2_Init(void) { RCC->APB1ENR1 |= RCC_APB1ENR1_USART2EN;RCC->AHB2ENR |= RCC_AHB2ENR_GPIOAEN; GPIOA->MODER &= ~(GPIO_MODER_MODE2 | GPIO_MODER_MODE3);GPIOA->MODER |= GPIO_MODER_MODE2_1 | GPIO_MODER_MODE3_1;GPIOA->AFR[0] |= (7U << (4 * 2)) | (7U << (4 * 3)); USART2->BRR = (uint16_t)(SystemCoreClock / 115200);USART2->CR1 = USART_CR1_TE | USART_CR1_RE | USART_CR1_UE; NVIC_EnableIRQ(USART2_IRQn);} void USART2_Transmitdata(char data) { while (!(USART2->ISR & USART_ISR_TXE_Msk));USART2->TDR = data;} void USART2_IR
in stm32h7431----> Im trying to write only one byte in this address 0x8100000 . but it is writing 32 bytes in the memory . so why not support to write only one byte in internal flash memory.2-----> And im trying to start writing some data from these addresess ..ex . (0x8100000 or 0x8100020 , 0x8100040,0x8100060....... (theses addresess are base addreses where im start to writing ) ) like multiple of 32 . so my data is susccessfully writing in the internal flash memeory . But if i try to start the writing on not multiple of 32 addresess ..ex (0x8100001, 0x8100002, 0x8100002A, 0x8100210......... ( similarly theses addresess are base addreses where im start to writing ) ) . so my data is not writing in the memory and all the byte are become 0xFF in that sector . ------ > this is the function im using for write data into internal flash memory HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypePro
I have question. Unable to download STM32CubeMX, any solutions? thanks :)
Hello,I'm having trouble with ADC2 and ADC3 on my NUCLEO-L010RB board. I've utilized all 16 ADCs on the microcontroller, and the code is functioning correctly except for these two ADCs. I am using LPUART.In this image, I obtained a reading of 40 from all the sensors connected to ADCs, corresponding to the ASCII character "(". However, ADC2 and ADC3 consistently display the same value, even when I modify the input to any value other than 40. These two ADCs persist with this issue.This is the configuration.
Hi everyone, I am wondering about multi ADC blocks(ADC1, ADC2).I don't give you a delay at the moment.When they start, must i give some delay to them?If so, how long must i give some delay?ex)HAL_ADC_Start_IT(&hadc1);Delay_us(2);HAL_ADC_Start_IT(&hadc2); My current code :void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim){if((htim->Instance == TIM5) && (htim->Channel == HAL_TIM_ACTIVE_CHANNEL_1)){HAL_ADC_Start_IT(&hadc1);HAL_ADC_Start_IT(&hadc2);}}void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef *hadc){if(hadc->Instance == ADC1) {internal_adc_value[0] = HAL_ADC_GetValue(&hadc1);}else if(hadc->Instance == ADC2) {internal_adc_value[1] = HAL_ADC_GetValue(&hadc2);}} My ADC Init :static void MX_ADC1_Init(void){/* USER CODE BEGIN ADC1_Init 0 *//* USER CODE END ADC1_Init 0 */ADC_MultiModeTypeDef multimode = {0};ADC_ChannelConfTypeDef sConfig = {0};/* USER CODE BEGIN ADC1_Init 1 *//* USER CODE END ADC1_Init 1 *//** Com
I WANT TO WRITE IN INTERNAL FLASH MEMORY IN WRITE [45] DATA WRITE BUT ACTUAL HAL_FLASH_Program(FLASH_TYPEPROGRAM_FLASHWORD, FLASH_ADDRESS, (uint32_t) WRITE )==HAL_OK){}ONLY WRITE A 32 BYTES AT A ONE TIME HOW TO MORE DATA WRITE IN INTERNAL FLASH MEMORY
The image below shows how Cube MX allows us to control the visibility of some functions.Uncheking a prototype moves it from main.c (private) to main.h (public). When unchecking for SystemClock_Config, its prototype is still generated on main.c, only the static keyword is removed.It is a bug or for some reason is intented do not calll SystemClock_Config outside main()?
Hello, I am using st CUBE to configure my board to read a single digital mems microphone. From reading RM0433 Table 429 and also AN5027 figure 52 I try to set the clk to SAI1 to be 2.048 but i get an issue that its not possible and can only be set to 3.2 MHz. the table says it must be a multiple of the values there but I cant set it to that. Also after just moving on with the configuration I cant see the clk signal on the oscilloscope. Does anyone know how to fix this?
The description of the ThreadX Application Queue Message Size in CubeIDE/CubeMX is vague.The queue size is specified in "words". The C language doesn't define how large a word is, it's not even processor implementation specific (I even read that Microsoft specifies a word to be 16-bits on their 64-bit processors for backwards compatibility). ThreadX refers to a 32-bit word in their user manual, even though ThreadX runs on x86.Could the queue message size description (behind the (i) button) be augmented to mention 32-bit?(apologies, I should have posted this in the CubeIDE or CubeMX section)Thanks,Andrei
STM32CubeIDE, Version: 1.13.1, Build: 17479_20230728_0839 (UTC)STM32Cube MCU Package for STM32U5 Series, Version: 1.3.0I am using USBX with enabled USB Device FS and AUDIO Device Class FS.I found following problems and issues:USBX/App/ux_device_descriptors.h: Even when AUDIO Device Class is enabled, the CLASS_TYPE_AUDIO enum entry is not added into USBD_CompositeClassTypeDef enum definition. Since there are not USER CODE blocks, I cannot add this enum entry, without it being removed every IOC regeneration.USBX/App/ux_device_descriptors.c: Even when AUDIO Device Class is enabled, the CLASS_TYPE_AUDIO enum entry is not added into UserClassInstance array. Since there are not USER CODE blocks, I cannot add this enum entry, without it being removed every IOC regeneration.USBX/App/ux_device_descriptors.c: The user code block USER CODE FrameWork_AddToConfDesc_1 doesn't work properly (during IOC regeneration, the code inside of this block is always removed). This happens probably because the c
I need cubemx 5.0.6 version for custom HID HS in STM32H743iit6.I also checked new version cubemx 6.11 but its not working. Because i am using ULPI USB3300 for high speed (HS) USB , it require PLL clock 480MHz. But newer cubemx not supported 480MHz instead it limit the PLL clock source to 66MHz. NOTE: Example's code's generated in the cumemx 5.0.6
i am using stm32h735g-dk board,trying to interface servo motor with it by using timer5 channel1.please give me step by step explination to set prescalar and arr value
I am trying to send data with an STM32F105RB microcontroller. I have configured it using STM32CubeMX with USB_Device as CDC (Virtual COM Port) and USB_OTG_FS in Device_Only mode. I have not activated SOF or VBUS. Here is the code I am using: while (1) {HAL_Delay(150);sprintf(buf_tx,"hello luxae 2\r\n");CDC_Transmit_FS((uint8_t*)buf_tx, strlen(buf_tx));HAL_Delay(150);}This code works correctly on a USB where the VBUS pin is connected to 5V, but it does not work on another USB where the VBUS is not connected. The configuration is the same in both cases.Any idea what could be going on? How can I make the USB work without being connected to the 5 volts of the board or the microcontroller VBUS?Any help or suggestions would be greatly appreciated! Thanks in advance!
I have a project that is created by Cube for the Keil compiler.The MCU is the STM32L486VG family.The default optimization level in that project is set to -O3 but I'd like it to be -O0.I cannot see where the default value gets set. I am assuming that it is in Cube as it reverts to O3 whenever I regenerate the project.Can anybody enlighten me please ??.Thanks,Andy
How to choose stm32G431 BOOT modeCan you use stm32cubemx to configure BOOT mode? If you cannot use stm32cubemx how to configure.May I ask if it is configured to boot from user flash memory.
CubeMX: 6.11.1Im trying to implement USB dual role on STM35U5G9 When I tick "Device Controllers HS" for host and device and generate code it sends a warning I checked the Platform Settings tab and there are no options I can Change for "Hardware IP"
Hi everyone.I am selecting in CubeMX STM32F030xC MCU.I see on the screen case where STM32F030CCTx LQFP48 is written.Then I open Datasheet. There is Table 1. Device summary.STM32F030xC corresponds to STM32F030CC and STM32F030RC.Ok. Then I look at pinout.There is PA2 (pin 12). It is WKUP4 (5).At (5) there is: For STM32F030xC devices onlyBut in CubeMX there is no WAKEUP for PA2 (pin 12) when I open pin properties.What I am missing? I have another question related to WAKEUP pin configuration in CubeMX.Wakeup triggers on rising edge so normally it must be pulled down.But when I set available WAKEUP pins I can't select pull down explicitly in CubeMX menu.Maybe CubeMX does that implicitly?Thanks
Ops!!! The latest firmware does support internal channel selection on ADC3.I verified that the previous firmware V1.11.1 gives visibility to the ADC3 internal channels for VBat, Temperature, and RBUF. But if the firmware is migrated to V1.11.2 those selections disappear.Screen shot from V1.11.2: After migration.Before migration (V1.11.1): I have also verified that starting a new project from scratch using any STM32H743 automatically applies V1.11.2 to start and once this happens, the internal channels are no longer available if if you change the firmware back to V1.11.1.
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.