Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
I've found a variety of posts talking about issues (mainly from a few years ago) with Eclipse and CubeMX/CubeIDE.Eclipse (and STM32CubeIDE) displays just fine for me at this point. I believe it's the nested launch of STM32CubeMX that doesn't render properly.I assume there is a simple change to a .ini file somewhere that would fix this, but I haven't found the right incantation or the correct file to add it to.I know I can zoom the pinout panel, it's the configuration (left) side and tabs (along the top) that aren't usable for these aging eyes.Any help would be greatly appreciated!STM32CubeIDEVersion: 1.2.0Build: 5034_20200108_0926 (UTC)System Details$> lsb_release -aDistributor ID: UbuntuDescription: Ubuntu 19.10Release: 19.10Codename: eoanResolution$> xdpyinfo | grep dimensionsdimensions: 3840x2160 pixels (1016x571 millimeters)HardwareDell Inspiron 7000 2-in-1 (purchased
Hello:There is a significant amount of time between calls to the ADC peripheral and to save power I would like to shut it down. It does not seem the same as setting it up as it has issues running after.The order it initializes:MX_ADC1_Init();HAL_ADCEx_Calibration_Start(&hadc1, ADC_SINGLE_ENDED); HAL_ADC_Start_DMA(&hadc1, (uint32_t*)adcDMABuffer, DMA_SIZE); What I am doing to "deinitialize and stop" is the same order going back:HAL_ADC_Stop_DMA( &hadc1 );HAL_ADC_Stop( &hadc1 ); HAL_ADC_MspDeInit(&hadc1);Then, to get it going again, I perform the iinitialize. However, the interrupt does not run/function. Is this not the correct way to accomplish what I am trying to do? It seems not, I am hoping someone could let me know.Thanks!
STM32L011F4I have upgraded CubeMX and the latest firmware does not run on some hardware boards that were OK with older firmware. I have tracked it down to the SystemClock_Config() failing and causing a HardFault_Handler() The latest HAL version has timeouts defined in stm32l0xx_hal_rcc.h as #define MSI_TIMEOUT_VALUE (2U) /* 2 ms (minimum Tick + 1) */#define HSI_TIMEOUT_VALUE (2U) /* 2 ms (minimum Tick + 1) */#define LSI_TIMEOUT_VALUE (2U) /* 2 ms (minimum Tick + 1) */#define PLL_TIMEOUT_VALUE (2U) /* 2 ms (minimum Tick + 1) */I'm using the 16MHz HSI and PLL set for x3 div 3 for an output of 16MHz and all clocks set for 16MHz. VCC is 3.3 Volt, 4 layer PCB and supply clean etc.If I increase the timeout #defines to 100mS, all boards work OK with no problems. I cannot find any information on how long the PLL
Hi(edit: added working project - search FINDME to see notes on changes to get it working)I have a project which works (and has been working for a year) but to get it working I had to work out an initialisation sequence that worked. I'm trying to tidy up and decided to start with a clean CubeMX project.CubeMX and relevant schematic pages attached.Problem is I need to SystemInit the SDRAM so that the project statics can go in there as they are too large for the on-chip RAM. To achieve this I use DATA_IN_ExtSDRAM (set as a Keil define) and, in Keil, enabled RAM1 as default (0xC100 0000 size 0x300 0000). I do not check NoInit. I edit the startup to move the stack to onchip to avoid Keil moving it to RAM1.I find that the generated code causes Hard Fault when branching to _mainAnyone have any idea why? It is a pretty basic example. Am I missing a setting in Cube?I can fix the problem by initialising the clock before SystemInit_ExtMemCtl (). However, I do this by calling SystemClock_Config()
I am using stm32f103c8t6 and performing ADC sampling of voltage input 50 Hz from the mains. I have all hardware and PCB prepared. I am achieving 60 samples/cycle using DMA mode in ADC conversion. Now I would like to know the RMS calculation algorithm to be performed on it. Like exactly how to use timers with the ADC in order to get the full /half cycle rms. my sampling time is 252ms. I tried using one TIM3 as a time base generator and kept ADC . I am new to this coding in C. Please help me out as i am stuck in my ongoing project./* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * <h2><center>&copy; Copyright (c) 2019 STMicroelectronics. * All rights reserved.</center></h2> * * This software component is licensed by ST under BSD 3-Clause license,
ADCy_AWDx_OUT signal do not work correct for single regular channel, when more channels are sampled in regular sequence. ADC5 AWD1 of STM32G474 . Hello ST community, I use ADC5 of STM32G474 for sampling 2 internal channels in regular sequence, VOPAMP4 and 5 and store data over DMA.I use ADC5 AWD1 configured for single regular channel VOPAMP5 (tried change to VOPAMP4).I use ADC5_AWD1_OUT as HRTIM capture trigger reacting on rising edge . Awaiting behavior to capture time when ADC VOPAMP5 captured signal got out of watchdog window.Problem is that ADC5_AWD1_OUT go low when ADC finish conversion of another channel (wrong behavior), like AWD1 is configured for all regular channels, but it's configured for single regular channel. When ADC sampling same channel regularly or same channel in regular sequence, then ADC5_AWD1_OUT stay high for as long as signal is out of watchdog window (correct behavior). I do check ADC SFR registers in debug mode, all lo
Hi,I'm working on NUCLEO-H743ZI board, using the STM32CubeMX 5.4.0 tool.When i'm generating code for SPI using DMA - It seems that it doesn't work.I tried to generate the same code for another device (STM32F411 Discovery Board) and i sow that there is a difference between this two components in the initialization order:STM32F411MX_DMA_Init();MX_SPI1_Init();NUCLEO-H743ZIMX_SPI1_Init();MX_DMA_Init();When I switched between these two functions it seems that the problem solved.is it a bug in the IDE?
Hi,i used stmcubemx to configure spi in dma mode for stm32h743zi. I used spi 1 as master and spi2 as slave in dma receive mode i am not able to receive data.the same dma initialization is working fine for stm32f767.Any suggestions to be made in initialization in stmcubemx is highly appreciated.Regards,krishna.
Hello i want to use dsp in my project in Keil IDE for that i have to include arm_math.h.In that case i am getting 30 errors C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(1183): error: #79: expected a type specifier __STATIC_FORCEINLINE int32_t __SMMLA(C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(1183): error: #101: "int32_t" has already been declared in the current scope __STATIC_FORCEINLINE int32_t __SMMLA(C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(1183): error: #141-D: unnamed prototyped parameters not allowed when body is present __STATIC_FORCEINLINE int32_t __SMMLA(C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(1188): error: #20: identifier "sum" is undefined return (sum + (int32_t) (((int64_t) x * y) >> 32));C:\Keil_v5\ARM\PACK\ARM\CMSIS\5.6.0\CMSIS\DSP\Include\arm_math.h(1188): error: #20: identifier "x" is undefined
Hi friends,I am trying to make me USB HID work on STM32 blue pill (STM32F103C8T6).I generated project from STM32CubeMX, Device should be connected like mouse device ,but after i connected blue pill to pc, it showed error message. In device manager->state of device was error state "A request for the USB device descriptor failed."I have three Blue pill modules and all of them have same problem. I tried add 1K8 ohm rezistor between pins PA12 and 3,3. This modules have problem with wrong value of rezistor R10, but that didnt help. Did somebody have same problem. What causes this problem?
Micro: STM32F030RCTx.Compiler: GCC 9.2.1Package: FW_F0 V1.11.0When USE_FULL_ASSERT is enabled, STM32CubeMX generates this function in main.c:void assert_failed(char *file, uint32_t line) { ... }however the prototype in stm32f0xx_hal_conf.h has been changed to this:void assert_failed(uint8_t* file, uint32_t line);This causes a compile error from GCC "error: conflicting types for 'assert_failed'"Easy fix, so I hope it makes it for the next release :)CheersDavid
Hello,When you associate a "user label" with a GPIO (for example DEBUG1 associated with PB11), the associated constants are sometimes not defined in the main.h file (but sometimes yes). When it is not, the associated initialization of the port is also not done in MX_GPIO_Init (). In the same project, some GPIOs are well defined and initialized and others are not.In my case, this problem arises with STM32H7xx. I had no problem so far with user labels; I did not check if the problem now arises with old projects with other processors ...I have the impression that it depends on the history of modification of the pins, on whether the project was made from template or not, and I don't know what ...Otherwise, in the case of dual core processor (STM32H745), one core has the constants associated with the GPIO user labels in its main.h file (but not always), the other does not, which is annoying because a priori the two cores are likely to access ports ...This problem is in addition to other pro
Hi All,When LWIP_NETIF_LINK_CALLBACK is enable in the STM32CubeMX LWIP middleware, it generates the following code from the FW_H7 V1.6.0 package:/* Set the link callback function, this function is called on change of link status*/ netif_set_link_callback(&gnetif, ethernet_link_status_updated); /* Create the Ethernet link handler thread */ memset(&attributes, 0x0, sizeof(osThreadAttr_t)); attributes.name = "EthLink"; attributes.stack_size = INTERFACE_THREAD_STACK_SIZE; attributes.priority = osPriorityRealtime; osThreadNew(ethernetif_input, &gnetif, &attributes);The thread function it is starting is ethernetif_input instead of ethernet_link_thread.I think it's obviously a bug, so I'm not going to wait for confirmation and just log it as a defect. However, if I'm missing something please let me know.CheersDavid
I have been given a board with a STM32L4 MCU on it. Basic features are USB connectionUSART QSPI bus connection to flash memory.I have managed to get a bare bones App working using CUBEMX.Eventually this should look like a memory stick from the USB perspective. So hooking up the flash memory device on the QSPI bus to the USB MSD class is on the work plan.However, before that, as part of debug and development I would like to hook the USART up to the USB port, essentially have the device act as a USB-Serial converter.Can anyone point me to relevant application notes or datasheets for this? Surely one of the many example projects must do something along these lines?
Up till now (v1.6.0) there is no support for PTP in MAC Ethernet driver. WHen will it be added?
I am using an STM32G4 and working in STM32CubeIDE with the MX interface.The software is great about assigning pins to allow for all of my functionality but I do not see a way to specify this. I am using TIM 1,3,4,8 for encoder counting with CH1&2 on each. I want to be able to handle 5V and 3.3V quadrature encoders on these encoder counting timers. They all have 5V tolerant (FT) pin options but the default selections are not always the FT option. Any ideas on how to have the software do the pin selection in this way would be appreciated!Thanks :)
Hello there, i chose Desktop as the location of my program then generated the code. The code saved well in my desktop but all the desktop files and folders were deleted!!! Even the ones in my Mac desktop although I am using CubeMx in windows 10. now I have nothing in my desktop but stm files the rest were gone. I even couldn’t find it at the recycle folder. how to solve this s****y problem and restore my desktop as it was? I use the las version of CubeMX thanks
Hi guys i was trying to get the FATFS + DMA + FreeRTOS on STM32F446 working and you have a small error in your code. In order to get the SD Card to work, the HAL_SD_TxCpltCallback and HAL_SD_RxCpltCallback functions in bsp_driver_sd.c should not have the __weak macro on them. The linker linked with the default callback functions in the stm32F4xx_hal_sd.c file. They are just placeholder functions and dont do anything. Once i removed the __weak from the functions in the bsp_driver_sd.c, it all worked fine. Could you please update it in a next revision of CubeMX and CubeIDE.
Hi,I use STM32CubeMX and SW4STM32 on my Macs. When I generate a project using CubeMx on my Mac running MacOSX 10.14 it loads fine into SW4STM32 and builds into a valid .bin. However, project files generated on my Mac running OSX10.15 does not compile correctly. It appears to be missing a target definition and the linker is missing the .ld file. There may be more issues, but these are two things I have noticed. This results in an error:/var/folders/hd/hgdpnl61555c2brf3034c8_80000gn/T//ccCxPncq.s: Assembler messages: /var/folders/hd/hgdpnl61555c2brf3034c8_80000gn/T//ccCxPncq.s:211: Error: selected processor does not support `dsb 0xF' in Thumb mode /var/folders/hd/hgdpnl61555c2brf3034c8_80000gn/T//ccCxPncq.s:222: Error: selected processor does not support `isb 0xF' in Thumb mode /var/folders/hd/hgdpnl61555c2brf3034c8_80000gn/T//ccCxPncq.s:266: Error: selected processor does not support `dsb 0xF' in Thumb mode /var/folders/hd/hgdpnl61555c2brf3034c8_80000gn/T//ccCxPncq.s:281: Error: selecte
I have created new project with STM32CubeMX for my STM32F091RC. I have noticed that when allocating memory it ends very fast. Do I need to change any settings to use all of the available 32Kb of memory?In "startup_stm32f091xc.s" I find these values:Stack_Size EQU 0x400Heap_Size EQU 0x200Should they be much bigger? Why default project does not use max available memory? What maximum values I can use?
Hi Community, I'm using CubeMX 5.5.0 to setup my STM32G431KBU application, with these parameters: SYSCLK = 100MHz APB2 peripheral clock = 100MHz SPI1 mode = Full-Duplex Master Clock Parameters -> Prescaler (for Baud Rate) = 2then I receive an "Parameter Error" message box: With this Prescaler value and APB2 Clock Frequency (100.0MHz), Baud Rate is more than: 40.0 MBits/s. Please set Prescaler more than 4.And with Prescaler=4, I get the Baud Rate=25.0 MBits/sBut according to the manual, the max SPI clock frequency is 75MHz for Master mode, and 50MHz for Master transmitter mode. I want to set Prescaler = 2, to get a 50MHz SPI clock frequency.Is this a bug of CubeMX?
Ive been using the stand alone version but when I try to import any project into eclipse with the plugin version (5.0-latest) it fails telling me to check for updates. Thanks, Dale
I recently attempted to migrate from CMSIS V1 to CMSIS V2 to take advantage of additional features and found that function definitions are missing for functions prefaced by osMemoryPool...(...). as found here: https://github.com/ARM-software/CMSIS-FreeRTOS/blob/0c140fa5b650c4275a40c4a09fe2a34947e6cd22/CMSIS/RTOS2/FreeRTOS/Source/cmsis_os2.c
Hi all,I am trying to create simple makefile project in CubeMX for stm32g431. After executing makefile I get error:/home/pawel/STM32Cube/Repository/STM32Cube_FW_G4_V1.1.0/Drivers/CMSIS/Include/cmsis_gcc.h: In function '__get_CONTROL': /home/pawel/STM32Cube/Repository/STM32Cube_FW_G4_V1.1.0/Drivers/CMSIS/Include/cmsis_gcc.h:152:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI { ^I suspect it has something to do with this:# float-abiFLOAT-ABI = -mfloat-abi=hardIs it something to do with compiler? At the moment I am using gcc-arm-none-eabi-7-2017-q4-major .I have to mention that I didn't have any problems with other sm32f and stm32l.Regards,Pawel
According to STMCube, one may use channels 1,2 as encoder, and channels 3,4 as PWM output simultaneously.I doubt that.The moment the SMCR register bit 0 is activated, PWM disappeaars.This makes sense, as there is only one counter register.Best RegardsJohan Smit
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.