Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I have problem when I generation code , my computer hangs.only alt+control+del is work :) ,what can i do ?I thought is the installation of java problem, reinstall not helped, after that reinstall cube and this not helps what can I do now I don't know?
In stm32f4xx_hall_rcc_ex.cis using a HSE_VALUE that does not reflect the settings in STM32CubeMXit uses the default 25Mhz in stm32f4xx_ll_rcc.h instead of the one in hal_confthis problem did not occur in a previous stm32cubemx fw release.the result is off the roof frequencies and potentially unexpected behavior.pay me a beer.
Hi,I am generating the basic initialization of my projects code with CubeMX. As far as I understood it, the user can insert "USER CODE" sections to prevent the automatic code generator from overwriting these code blocks.In my case, I want to prevent the RTC from being initialized, in case it has already been initialized before.CubeMX generates this code (pseudo code)RTC.Time.Hours = 0; RTC.Time.Minutes = 0; RTC.Time.Seconds = 0; RTC_Set_Time(RTC); RTC.Date.Year = 2018; RTC.Date.Month = 10; RTC.Date.Day = 1; RTC_Set_Date(RTC);I Implemented the following check:/* USER CODE BEGIN RTC_CheckInit 0 */ if(RTC not configured yet) { /* USER CODE END RTC_CheckInit 0 */ RTC.Time.Hours = 0; RTC.Time.Minutes = 0; RTC.Time.Seconds = 0; RTC_Set_Time(RTC); RTC.Date.Year = 2018; RTC.Date.Month = 10; RTC.Date.Day = 1; RTC_Set_Date(RTC); /* USER CODE BEGIN RTC_CheckInit 1 */ } /* USER CODE END RTC_CheckInit 1 */But when I regenerate the code via CubeMX, my user code sections are getting del
I am developing firmware for the STM32F413 that uses FreeRTOS, and I need to create a queue set. Thus far, I have been unable to find a way to enable queue sets in CubeMX. Obviously I can manually go into FreeRTOS.h and change the configuration constant defined there (#define configUSE_QUEUE_SETS 1), but every time I regenerate my code from CubeMX, it changes it back to 0.Does CubeMX allow me to enable FreeRTOS queue sets? Or is there some way to keep CubeMX from overwriting that change when I regenerate the rest of my code?
Hi,for my current project, I like to use the FatFS library to read/write data to an SD card, connected to a STM32F429 through SDIO interface. This generally works and I can create/read/write files on the SD card.In addition, I like to use USB mass storage mode to expose the SD card to a Host system (PC) as mass storage. This generally works as well. The PC detects the SD card with the correct size and shows up the file contents.Now there is the problem, that a FAT file system must not have more than one "masters", which would obviousely apply to my case, as both the STM as well as the host PC try to be the master over the FAT file system.It would be totally ok, if the STM looses his "master" role, while the controller is connected to an USB host PC. But I could not get this working so far. I even tried this scheme "Link FS to SDIO, mount drive, modifie file, unmount drive, unlink FS from SDIO" on every single file access. But it does not work, as I can still produce file system corrupt
This has been posted in the "Community" space but actually belongs here. -- pahttps://community.st.com/s/feed/0D50X00009nLfs2SAC
Posted on July 09, 2018 at 08:59Hey,stm32f3xx_ll_exti.c is added to C_SOURCES twice in the Makefile. It fails to build. The ioc is attached.Morty#stm32cube---bug-report #bug #stmcube-bug
Posted on November 09, 2015 at 11:52When generating MX_Device.h with CubeMX for a STM32F407 device, the following pin names are illegal, because there is minus sign in the name:/* Pin PA13 */&sharpdefine MX_SYS_JTMS-SWDIO_Pin PA13/* Pin PA14 */&sharpdefine MX_SYS_JTCK-SWCLK_Pin PA14/* Pin PB3 */&sharpdefine MX_SYS_JTDO-SWO_Pin PB3Please update the STM32F4xx_DPF to correct this issue. (For your information: In the SoftPack for the STM32F7xxx_DFP this error is already corrected.) #stm32cube-bug-mx_device.h
I use the latest STM32F4CubeMX and latest TrueStudio and updated firmware library. I have chosen in the Project Settings "code generator" option "Keep User Code when re-generating" but it does not. User code is strictly within the USER CODE labeled areas but it gets removed. Why?
Hello,can ADC3 be programmed in independant mode if ADC1 and ADC2 are programmed in Dual regular simultaneous mode ?(in CubeMX with STM32F205 , the menu independant mode can't be selected for ADC3 if the menu Dual regular simultaneous mode is selected for ADC1 and ADC2)thanksbest regards
Hello, everybody.I'm trying to implement USB FS on STM32H734 eval board. I'm using CubeMX to generate code, the version is up to date and i'm using the latest firmware libraries (which is 1.3.0). I generated a standard project and configured a VCP on USB FS in Cube, when i load the code into mcu and connect CN18 to PC nothing happened. Then I found that there is a function HAL_PWREx_EnableUSBVoltageDetector(); that needed to be added to USB initialization. Which i did and PC sees the board but can't find a driver for it (code 28) and locate it under unknown devices. I found that when cube generates code in main it generates function with name MX_USB_OTG_HS_PCD_Init(); but in settings (in Cube) FS confuguration is chosen. (And vice versa, MX_USB_OTG_FS_PCD_Init(); if HS configuration is chosen as VCP). I think it's some sort of bug. Could it be the source of a problem? Maybe someone else also encountered such a problem?
I am using a STM32H7 ADC in multimode. When I generate the source code with STM32CUBEMX 4.26.1 and STM32CubeH7 Firmware Package V1.3.0 / 04-July-2018, i noticed that inside MX_ADC1_Init() in main.c, the following line of code is written:multimode.DualModeData = ADC_DMAACCESSMODE_DISABLED;which is throwing compile time exception.As I understand it should bemultimode.DualModeData = ADC_DUALMODEDATAFORMAT_DISABLED;Also I noticed that STM32CubeMX IDE is showing "DMA Access Mode" on the second line in ADCs_Common_Settings which is probably is root cause of this issue
How can I find communication functions of udp protocol ?
The latest version of the STM32CubeMX 4.27.0 deletes empty folders in my project structure during project generation.This is a nice feature if it deletes only previously generated folders that are not used any longer, but it also deletes folders that I created and some other tools need those folders!Especially this is a problem with externals from SVN. If I e.g. add modules in a subfolder of Src via the "externals" feature of SVN this creates an ".svn" folder inside which has also empty folders that are needed by SVN!Please could this feature be limited to generated folders only!?
I have a project which is using an 11.0592MHz external TTL oscillator, PLL'd up to 66MHz HCLK.CPU is an STM32F303RET6 on a Nucleo-64 F303 board.IDE is Atollic TrueSTUDIO STM32 Edition.I found the System Tick timer was ticking at ~700us. After single stepping through the init code, I found that HAL_RCC_ClockConfig() had incorrectly calculated the CPU core clock: /* Update the SystemCoreClock global variable */ SystemCoreClock = HAL_RCC_GetSysClockFreq() >> AHBPrescTable[(RCC->CFGR & RCC_CFGR_HPRE)>> RCC_CFGR_HPRE_BITNUMBER]; /* Configure the source of time base considering new system clocks settings*/ HAL_InitTick (TICK_INT_PRIORITY);At this point, SystemCoreClock was 48000000, which given a PLL of 6x suggests that the HAL is set up for an 8MHz HSE clock.Indeed, HSE_VALUE is 8000000.Defining HSE_VALUE=11059200 in the project options fixed this.My question is -- given that STM32CubeMX knew my HSE clock was 11.0592MHz, why did it not include the required setti
for example:“/* USER CODE BEGIN Includes */ ..../* USER CODE END Includes *//* USER CODE BEGIN 0 */.../* USER CODE END 0 */�?I found that these keywords only work for this definition in the generated code, but after I added them in the original location without these keywords,Will still cover my own code when generating with STM32CubeMX,I hope to improve these small problems and increase the ease of use of the Cube library.
Hello I have generated a workspace using STM32CubeMX V4.27 for STM32H743ZI.-With IAR v8.3 when I try to download the firmware I always get an error at the beginning ''Do you want to perform mass erase to unlock the device'' when I press okay another warning comes ''write failed (CPU data abort) at Memory address 0x2004FD98'' then it halts and I have to cancel it.I still can press debug without download but when the debug session starts and I press next statement nothing moves-With Keil uV5 I can download the firmware and it works fine on the NUCLEO board but I can't debug, the same happens as with IAR debugger.I attached the generated codes.Thanks in advance.
I am Working on interrupt with gpio where Rising edge to be detected..i think i have Configured the Interrupt properly but it is not working ,,,I am Making pC13 as gpio because it is connected to a button,when i press the button interrupt should come..please let me know the issue
We are using STM32F030K6T6 PA9, PA10 for UART TX and RX. The BSP is generated using CubeMX, we can see the PA9 does not transmit, if we enable reversal in the BSP, then we can see that PA10 transmits but PA9 does not receive.If we use PA2, PA10 for TX and RX the same transmit and receive code works.Note that the user code is the same along, changes have been done only in CubeMX interface( UART is not in interrupt mode)Is PA9 unusable for UART , is it a bug in the CubeMX BSP or the Chip itself?
Hello,i want to use 3 ADC :-ADC1 et ADC2 in Dual regular simultaneous mode + trigger on timer +DMA-ADC3 on its own in continuous mode + DMA.According to reference manuel,for DMA : -ADC1 can use channel0 + stream0 -ADC2 can use channel1 + stream2-ADC3 can use channel2 + stream1Is it mandatory to program explicitely the DMA ? (cubemx doesn't call HAL_DMA_Init function)Do i need to do the following initialization :g_DmaHandleADC1.Instance = DMA2_Stream0; g_DmaHandleADC1.Init.Channel = DMA_CHANNEL_0; g_DmaHandleADC1.Init.Direction = DMA_PERIPH_TO_MEMORY; g_DmaHandleADC1.Init.PeriphInc = DMA_PINC_DISABLE; g_DmaHandleADC1.Init.MemInc = DMA_MINC_ENABLE; g_DmaHandleADC1.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD; g_DmaHandleADC1.Init.MemDataAlignment = DMA_MDATAALIGN_WORD; g_DmaHandleADC1.Init.Mode = DMA_NORMAL; //DMA_CIRCULAR; g_DmaHandleADC1.Init.Priority = DMA_PRIORITY_HIGH; g_DmaHandleADC1.Init.FIFOMode = DMA_FIFOMODE_DISABLE;&nbs
I have F303RE.The pin config are:The ADC config is:The Adc init code is generated as well the Analog Gpios. That is not a problem.I want to read one after each other. I added a function to select to config, but I dont know what SHould I pass the rank or the channel (or both). Here is the Adc select channel or rank function.void select_adc(uint32_t rank_or_channel) { ADC_ChannelConfTypeDef sConfig; sConfig.Channel = rank_or_chammel; // ADC_CHANNEL_1; sConfig.Rank = rank_or_chammel; // ADC_REGULAR_RANK_1; sConfig.SingleDiff = ADC_SINGLE_ENDED; sConfig.SamplingTime = ADC_SAMPLETIME_1CYCLE_5; sConfig.OffsetNumber = ADC_OFFSET_NONE; sConfig.Offset = 0; if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK) { _Error_Handler(__FILE__, __LINE__); } } And here is how do I call it. int RORC=1; // PA0=1 PA1=2 PA2=3 while ( 1 ) { HAL_ADC_Start(&hadc1); select_adc(RORC ); if(HAL_ADC_PollForConversion(&hadc1, 1000) == HAL_OK) {
Why does STMCubeMX (version 4.27) not provide I2S configuration for STM32F3xx parts?I have inspected the underlying F3 firmware source (current version) and all the I2S registers for SPI2 and SPI3 are present however the HAL driver source is hard coded to force any SPI interfac with I2S support to always be in SPI mode.Is there an issue with STMCubeMX or is the I2S feature in STM32F3xx series MCU's broken and STM is preventing us from using it?... Robert Rath
I have found a serious problem in CubeMX 4.27 where cancelling the configurationof a module containing DMA and interrupt settings will reset any configured interruptpriority back to zero.Step to duplicate the issue as follows.Create an IOC file which has some module configured for DMA interrupts.In System NVIC, set the DMA's interrupt with a non-zero preemption priority.Open the module containing the DMA configuration and close again using 'OK'.In System NVIC, check interrupt priority is still correct.Open the module containing the DMA configuration and close again using 'Cancel'.In System NVIC, check interrupt priority has been reset to zero.
Hi. Can you help me to get last version cube mx under Windows XP. Thank you.
Hello Team,I am a beginner in STM32 . Trying to implement a program which takes 0-3.3V on ADC pin and giving out PWM on a GPIO pin.I tried implementing the Example of ADC_RegularConversion_Polling ,But the problem facaed is on debug window it says target not found , error reading value on the variable .Please guide with the steps. I am building the program using MX cube and Atolic True Studio.Kind Regards,Jesal
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.