Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Posted on June 20, 2015 at 13:27Version: STM32F1_Cube v1.0.0Microcontroller: STM32F103c8 (64KB Flash, 20KB SRAM, 72MHz Cortex-M3)I think there might be several issues here.In the file ...STM32Cube_FW_F1_V1.0.0/Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/system_stm32f1xx.c... the comment for SystemInit() promises the following:''Setup the microcontroller system. Initialize the Embedded Flash Interface, the PLL and update the SystemCoreClock variable.''-However, SystemCoreClockUpdate is not called and the SystemCoreClock variable is either set to 24000000 or 72000000 in advance.On my bare-metal board, I have an 8 MHz external crystal, thus HSE_VALUE would be 8 MHz; HSI_VALUE would also be 8 MHz.However, when I run a LED-blinker, SystemInit is called, but when looking at the values using the debugger, the microcontroller seems to run at HSI_VALUE (eg. all values appear to be set to the ''reset value'' mentioned in RM0008.My timing-tests also suggests that the microcontro
Posted on July 06, 2015 at 10:05STM32f407VG diskovery ?an somebody give an example of DAC without using DMA generated in CubeMX? #stm32 #cube #dac #stlink #stm32cubemx
Posted on January 07, 2015 at 19:34Is there any planed linux version of the STM32CubeMX program? The clock generation module is not working under wine so this is not yet a solution. Are you ST guys working to port the STMCube on other platforms? #stm32cubemx-linux
Posted on June 29, 2015 at 15:22Hello We have a custom board with a STM32F429ZG MCU and CubeMX 4.7 FW Lib 1.5 generated libraries. The board is a redesign of a board a STM32F103ZG MCU with Wiznet W5300 Ethernet Coprocessor. The old FW is based on the non-HAL/CubeMx libraries V3.5.0 (SPL?). Used Libraries (new board): FreeRTOS 8.1.2 FatFS R0.10b LwIP: Self-modified to handle data transfers with 64k per tcp_write (exchanged several u16 with u32 for snd_buf and like variables) Zero Copy ethernetif + stm32f4xx_hal_eth driver in send and receive direction sdio.c implementation has two independent DMA for send and receives (like found in this forum) With the new board we are facing some strange data corruption: Reading larger binary files (2MB+) in chunks of SD-Card page sizes (64k, but occurs also with smaller chunks): Requesting a buffer of 64k from a custom LWIP mempool (memp_malloc())Read from SD Card to SDRAM 1 via DMA2_Stream3 Channel 4.Posting a pbuf to a FreeRTOS queue which is read
Posted on May 21, 2015 at 10:59In the CubeMX software, its impossible to configure 13 Bits for address lines (Row bit number). Although the define is existing in the FW library. #fmc #stm32f4 #cubemx #sdram
Posted on June 25, 2015 at 10:58I use the STM32CubeMX 4.8 version and update the firmware package for Family STM32F4 1.6.0. However, the source code of the library is 1.3.1. I also use the STM32CubeF4 1.6.0 but it is the same version of STM32CubeMX 4.8. The STM32F4 DSP and standard peripherals library is currently 1.5.1. Why the difference is occured between the libraries? Moreover, the STM32CubeF4 1.6.0 library has clock configuration bug. I hope this problem would be solved as soon as possible. #config #clock #bug #stm32cubemx #stm32cubef4
Posted on June 24, 2015 at 20:44Hi GuysI'm trying out setting up a project and implementing hardware abstraction on my STM32F051C6T6 for university work, using the STM32CubeMX tool. Really enjoying the ease of setting up pins with the tool, however, there it seems to be a few missing peripherals for the above mcu. I haven't check them all, but the ones that I came across that were missing were I2C2 and SPI2.Obviously, I could go and edit the generated code for these peripherals, but that sort of defeats the purpose. What should I do?I see that the release schedule for the cube firmware from ST isn't the most frequent, but is there somewhere I can report the missing peripherals?CheersSean #stm32cube #stm32 #stm32cubemx
Posted on June 17, 2015 at 14:36Every time i move the scroolbar up or down, or left/right to resize the window, my project is closed, and i return to the startup page of the CubeMx! #bug #cubemx
Posted on June 11, 2015 at 05:04Hi, I'm evaluating using Cube + MX for a commercial project. Seems like public opinion is pretty negative about this tool and ecosystem however. Has anyone had a positive experience in using Cube for a commercial project?These are my main concerns:* Buggy HAL libraries* Code generation tool producing messy code, have to carefully place user code between sections* No way to add user code to header files #cube #stm32cubemx
Posted on June 10, 2015 at 02:26Dear I have tested the STM32F030R8 Nucleo board using STM32CubeMX 4.8.0 and keil 5.14. using the samples in the (STM32Cube_FW_F0_V1.2.0-sample/Projects/STM32F030R8-Nucleo/Examples/) I tried to add both (UART\UART_TwoBoards_ComIT) and (ADC\ADC_DMA_Transfer). but like attached images, the compiling error was happened. about Undefined symbol, so I included the file such as ''stm32f0xx_hal_adc.h'',''stm32f0xx_hal_adc.c'' ''stm32f0xx_hal_adc_ex.h'' ''stm32f0xx_hal_adc_ex.c'' Would you help me? #cubemx #stm32f03 #undefined-symbol
Posted on June 04, 2015 at 11:08I generated init code using STM32CubeMX and it turned out I wanted to map some IOs differently. I modified the settings and clicked the generate source code button and it of course it didn't just update my project files but rather generated a new project so I had to do a lot of re-work. Is there (I hope there is!) a way to modify settings and just update the project files without doing additional modifications so I won't have to do a lot of fixing up each time? #cubemx
Posted on April 30, 2015 at 01:40After upgrading to Subj, the Keil uVision STLink Debugger Trace options are reset each time STM32CubeMX generates code.To reproduce;using Keil uVision 5.14.0.0 (the current version), open ''Options for Target XXX'' -> Debug -> STLink Debugger/Settings -> Trace.Select ''Trace Enable'' and modify some other settings (such as the Core Clock and ITM Stimulus Port, for example).Save, restart Keil uVision to make sure the new options stay in place.Use STM32CubeMX to generate code again, open the project uVision, bring up Debug Trace options, see the specified options gone (reset to default).It looks like the newly release 4.7.1 version of Cube removes the following section from the <TargetDriverDllRegistry/> element from the project.uvoptx XML file.The problem did not exist in STM32CubeMX 4.7.0. #stm32cubemx #stlink #cube
Posted on April 29, 2015 at 20:36 Hey, i encountered a problem using the CubeMX Eclipse plugin. When I made some changes to the startup code using the eclipse plugin and generate the Project code, opening braces are removed. Maybe this is a known problem and fixed in the standalone version. Unfortunatly I'm not able to find out which version of CubeMX is integrated in eclipse plugin. Code like this if (...) { ..... } is changed to if (...) ... } Has anybody a workarround? Edit: I'm creating a ''True Studio'' project with CubeMX project settings. Regards, Sebastian #cubemx-braces-problem
Posted on May 26, 2015 at 04:35Hi All,I have generated code for a USB HID device, but it does not do anything, I mean my PC does not recognize anything. I have not changed anything in the code because I was assuming that it should at least get detected by the PC when I insert the USB cable.I think the problem is with the DISC at PC11 or CNTRL on PC10 port/pins. I did not find any code generated by CubeMX in this regard.I also want to have HID Descriptor according tohttp://www.usb.org/developers/hidpage/ but I don't know where to put this in the code.Can you suggest me any fix/solution please?Please let me know if you need more details. Thanks. #usb #cubemx #stm32f
Posted on May 10, 2015 at 15:24Hello, I decided to start a new thread just to inform an issue I have just found out. I am not the only one who is getting a bunch of errors when trying to compile with Keil a code whose template has been generated via STM32CubeMX. The explanation can be found here: http://www.keil.com/appnotes/files/apnt_266.pdf The problem occurs when you have the latest updates installed, and the solution is to install the packages shown in the pdf above. For some reason, the latest keil packs are not supported by STM32 devices, according to the pdf. I started getting theese errors a month ago. I looked for help but none could give a solution, so I gave up and used waijung blockset instead. Now someone suggested me upgrading STM32CubeMX to the latest version (released 2 weeks ago) and I saw the errors I got were different. This is how I found that explanation by Keil. So I have to let this information here as I think it is hard to find and more people are having the
Posted on May 22, 2015 at 05:56//-------------------------------------------------------------------------------------------------------------- /* USER CODE BEGIN USART2_MspInit 0 */ /* USER CODE END USART2_MspInit 0 */ /* Peripheral clock enable */ __USART2_CLK_ENABLE(); /**USART2 GPIO Configuration PD5 ------> USART2_TX PD6 ------> USART2_RX */ GPIO_InitStruct.Pin = GPIO_PIN_5; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Speed = GPIO_SPEED_LOW; HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); GPIO_InitStruct.Pin = GPIO_PIN_6; GPIO_InitStruct.Mode = GPIO_MODE_INPUT; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); __HAL_AFIO_REMAP_USART2_ENABLE(); // here STM32F103ZE run error!&
Posted on May 07, 2015 at 12:54Hello,Has anyone tried to use the temperature sensor on STM32L1 devices with the latest CubeMX and library?It's giving me bogus results (-2C on my desk), while on older versions it worked normally.Chip is STM32L151RCT6 and the compiler IAR 7.40.The project is a test project containing only CubeMX generated code for the GPIO and ADC and the temperature calculations from AN3964.Tried Vref channel on a separate project and it measures the correct VCC (3V3).Thanks!George #cubemx #temperature #stm32l1
Posted on May 03, 2015 at 19:53Hello, I have an olimex E407 board featuring stm32f407zgt. I create a simple application using cubeMX and want to ping. The board receives packets (I can see this using LWIP_DEBUG functionality) but the TX does not work. In xxx_hal_eth.c in the function HAL_ETH_TransmitFrame: Tx DMA seems blocked and the code runs into this section: /* When Tx Buffer unavailable flag is set: clear it and resume transmission */ if (((heth->Instance)->DMASR & ETH_DMASR_TBUS) != (uint32_t)RESET) { /* Clear TBUS ETHERNET DMA flag */ (heth->Instance)->DMASR = ETH_DMASR_TBUS; /* Resume DMA transmission*/ (heth->Instance)->DMATPDR = 0; } I do not see any ETH frame being transmitted. Any hints? Regards, Adib. -- #cubemx #stm32f4 #ethernet
Posted on May 02, 2015 at 05:30I am using the STM32F1DISCOVERY and generating a project for IAR from STM32CUBEMX. I have changed the configureation to use timers and added a toggle LED command in each of the default task and timer methods, however no LEDs blink. When I break I'm in the for loop below osKernelStart() that the code should never get to.... Looking deeper into this in vTaskStartScheduler() (tasks.c) it makes it all the way to the bottom where there is following comment and code /* This line will only be reached if the kernel could not be started, because there was not enough FreeRTOS heap to create the idle task or the timer task. */ configASSERT( xReturn ); I increased the configTOTAL_HEAP_SIZE in FreeRTOSConfig.h from 2000 to 4000 but this didn't amke a difference. Thoughts anyone? #stm32cubemx #stm32f1 #freertos
Posted on April 16, 2015 at 13:25Dear all,I have many problems using STM32CubeMX and Keil MDK5. I'm trying to start defining all the peripherals with the STM32Cube (is intended for this), then I run code generation for Keil MDK5 and finally I open the project... all ok at this point..BUT!!!...When I'm trying to use any RTE of Keil like Network, Filesystem, etc.. Keil need to load also the Device drivers to resolve any dependencies and Keil add to the project the HAL driver and a configuration file called ''RTE_Devices.h''. At this point I have two problems:1- The device drivers are duplicated, STM32Cube generated a group called ''Drivers/STM32....'' with all the xxx_hal.c drivers and also Keil generated a new component class called ''Device'' with the same xxx_hal.c drivers (but older version of course)2- I have to edit the file ''RTE_Devices.h'' to enable and configure all the peripherals and pinout... it have no sense, I've done it with STM32Cube!!!!!Can't understand how to use STM3
Posted on August 28, 2014 at 15:57Hello, currently I'm porting a STM32F103ZG / Wiznet W5300 Ethernet and SPL based to a STM32F429ZG / STM32CubeMX / LwIP based application. Both versions using FreeRTOS. In both cases its a custom board. I'm struggling on a quite low performance of the Ethernet part. The application transmits a large amount of data from the SD Card to a remote PC using the TCP RAW API of LwIP. The transmit rate is about 20 kB/s. Currently, I guess the biggest berformance gain would be optimizing the low level Ethernet device driver. low_level_output() needs about 25 us for 60 bytes and 200us for 1524 bytes. This indicates a limitation to ~45 MBit/s just by writing data to the output. And then, the device would had no time to do anything else. low_level_output() uses memcpy() to copy the data. Is this an actual DMA transfer or CPU bound work? In my case, the copy wouldn't necessary at all. With LwIP, all the data is statically in the RAM, as long as the package ha
Posted on March 25, 2015 at 20:45Hello,I'm using an STM32F415 and CubeMx. I've got the HAL_SPI_TxRxCpltCallback() working in that it gets called after the proper number of bytes have been clocked out of the SPI Slave, however, when I prep for another transfer using HAL_SPI_TransmitReceive_DMA inside that first callback, it breaks.I've traced the issue down to the SPI2 TX DMA stream being ''locked'' in the HAL.I think I have a workaround where I call both HAL_DMA IRQ handlers for DMA1_Stream3_IRQHandler() and DMA1_Stream4_IRQHandler(). Eg: HAL_DMA_IRQHandler(&hdma_spi2_tx); HAL_DMA_IRQHandler(&hdma_spi2_rx);Is this the suggested implementation? #cubemx #dma #spi #irq
Posted on May 04, 2015 at 15:38Hello,I have a custom board with STM32F303CCT6, firmware generated by CubeMX, compiled on IAR 7.4.Everything runs correctly in debug mode, when attached on Segger JLink and IAR.When I disconnect the debugger and power reset the board, it doesn't reboot, it just stays idle.I have also programmed it with J-Flash (.bin and .hex) on 0x800 0000 and it still stays idle. BOOT0 is low and NRESET is high. The MCU is powered externally (not from jLink) with 3V3.Any ideas on what I should check are greatly appreciated.George #debug #cubemx #printf #assert
Posted on March 28, 2015 at 09:27 I have a Nucleo F103RB board that I'm trying to get setup in eclipse with the ARM launchpad toolchain (GNU Tools for ARM Embedded Processors) . So far I've got something working using the launchpad toolchain (blinking an LED) from the project template that's packaged with Liviu's GNU ARM eclipse plug-in. I use the mbed online IDE, but for me at least, it's not always practical, and I do the bulk of my electronics/embbedded work in eclipse or VS anyway. What I really want though is to have the portability and directory structure that you get with the STM32CubeFx packages (in eclipse, because that's where the rest of my projects are), so that the project is portable and scalable between STM32 micro-controllers and maintains compatibility with the HAL Library and middleware in STM32CubeF1 (rather than using the stdperiph library). I thought that the STM32CubeMX would be able to help me here, so I got the eclipse plug-in g
Posted on April 28, 2015 at 09:34Hello,I use STM32F407 MCU in combination withSTM32CubeMX. I want to configure 3 ADCs. Fisrt two i want to run in ''Dual regular simultaneous mode only'' without DMA the third one in independent mode with DMA. In my custom code this configuration works very well, but there is no possibility to configure it with Cube. I can't change the mode for ADC3 and get the information from the program: ''*This parameter could be modified only from themaster ADC1.'' Is it the bug of Cube?I also noticed another problem: if I activate ADC interrupt, the ADC_IRQHandler puts automatically ''HAL_ADC_IRQHandler(&hadc)'' code into it, but the default implementation is quite big and has a lot of overhead, in may case it takes too long, to execute this code. I comented it out and the code works well, but since it auto generated it regenerates every time, I make some changes in cube. Is there any possibility to disable the insertion of HAL_ADC_IRQHandler into AD
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.