Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
In version CubeMX 5.0.0 I did not get how to Generate Code with keyboard. Previously it was Ctrl-Shift-G combination.How to set this keyboard shortcut to be something easy to press blindly ... like F8? ... because it is the MOST frequently used activity I think ... it is same frequently used as "compile" in any IDE!
Posted on May 10, 2017 at 10:44Hithe TSC library built in cubeMX repositories is not consitent.Where do I find the evry latest release?in STM32Cube_FW_L4_V1.7.0/ this version is used: V2.2.0 / 01-February-2016in STM32Cube_FW_L0_V1.9.0/ this version is used: V2.0.0 / 22-April-2014see release notes underSTM32Cube/Repository/********Middlewares/ST/STM32_TouchSensing_Library/Release_Notes.html#tsc #stm32-cubemx
using HAL or LL libraries, its mandatory to set the size message in the receive function. I want to receive messaege with undefined size. whats the best way to implment it! help please.
..
i buy something like this https://www.ebay.co.uk/itm/RGB-LED-Display-Music-Spectrum-Analyzer-Amplifier-Sound-Audio-Level-VU-Meter/163244651198?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649and after update i get some strange problem with display i attach firmware what i upload to this device. Please give some advice.
I use the CMSIS wrapper for FreeRTOS generated by CubeMX. This Project was generated about 4 month ago with the current version at that time. I didn't find this bug in forums so I'll ask here.In *osPoolAlloc() the array of pool entries will be search for a free spot. If it's found in the markers-array, the corresponding memory pointer is returned. I think to speed up sucessive allocations, a currentIndex is saved. If I interpreted the code right, the search should start at currentIndex and wrap around the markers-array.E.g. is the length is 5 (0, ..., 4) and currentIndex is 2, the order should be 2, 3, 4, 0 and finally 1.The generated code looks like this:for (i = 0; i < pool_id->pool_sz; i++) { index = pool_id->currentIndex + i; if (index >= pool_id->pool_sz) { index = 0; } // actual logic }What happens is instead of wrapping the index, it will be set to 0. In the example the sequence 2, 3, 4, 0, 0 will be generated. This fixes the behaviour:for (i = 0; i < pool
Working in CubeMX for STM32F4, we created a design for the Ethernet, and found this bug in the tool, and now the MAC interface is not working in our board. Can someone confirm if the dataspec or CubeMX is wrong?
What are the CAN bit segment 1 and 2?CAN specification doesn't use those names.Are they PROP_SEG and PHASE_SEG1 or PHASE_SEG1 and PHASE_SEG2?All three are programmable by the CAN spec, but PHASE_SEG2 should be max. of PHASE_SEG1 and INFORMATION PROCESSING TIME which is "less than or equal to 2 time quanta".I would guess that bit segment 1 = PROP_SEG and bit segment 2 = PHASE_SEG1. PHASE_SEG2 is then probably equal to PHASE_SEG1.Is that right?I also realized that in STM32F427 data sheets it says that CAN can work upto 1Mbps.I wonder how? Is there Cube restriction or why it seems impossible?With "full speed" (APB1@45MHz) I tried to set prescaler to 5, bit segment1 to 2 and bit segment2 to 3, but CubeMX says they are too small values.I'd think that it would mean:Tq=111.11 ns,SYNC_SEG = 1TqPROP_SEG = 2TqPHASE_SEG1=3TqPHASE_SEG2=3TqTotal 9Tq/bit = 999.99ns
Hello,evenSTM32Cube_FW_L0_V1.1.0/Drivers/CMSIS/Device/ST/STM32L0xx/Include/stm32l061xx.hhas a header for a STM32L061 device, but the website does not know a STM32L061. The header should be removed.
I was trying to write a code to integrate a input signal, triggering the ADC with a timer, and print the information every 0.5 s with the systick. I don't understand why After the first saturation of the timer, the code doesn't enter in the systik handler anymore.
Hello,I'm using CubeMx in command line mode which is a VERY usefull feature.I'm using it through a continuous integration system.My concern is that CubeMx sometimes generates dialog box for "migrate" or "unavaible lib". Because the process is running under another user session or simply a distant server, the dialog does not appear and the process never ends. And more, there's nothing in the log file telling why.I think that CubeMx should follow the standards when running in command line mode : It should never show any dialog box, fail is something is wrong and give a clue about what's wrong.For today, I'm unable to imagine what is happening. The process stops after:2018-12-11 17:21:07,870 [INFO] ThirdPartyDb:263 - Close Third Party DataBase File (C:/Windows/system32/config/systemprofile/.stm32cubemx/plugins/thirdparty/db/thirdparties_db.xml) 2018-12-11 17:21:07,877 [INFO] IntegrityCheckThread:94 - End integrity checks thread 2018-12-11 17:21:08,345 [INFO] ApiDbMcu:310 - Load IP Config
It would be best if functions intended to be used to check status from within interrupt handlers are optimal. STM32CubeMX generates many utility functions which check whether a single bit is equal to that bit. It would probably be more efficient to simply check that the bit is non-zero.For example:__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ADDR(I2C_TypeDef *I2Cx){ return (READ_BIT(I2Cx->ISR, I2C_ISR_ADDR) == (I2C_ISR_ADDR));}would become:__STATIC_INLINE uint32_t LL_I2C_IsActiveFlag_ADDR(I2C_TypeDef *I2Cx){ return (READ_BIT(I2Cx->ISR, I2C_ISR_ADDR) != 0);}
I was searching for smaller and cheaper MCU with CAN network. I have chosen the STM32F042F4P6 trough CubeMX but now when I try to enable CAN in CubeMX I cannot because it's grayed. What am I doing wrong?
Hello all,I have a NUCLEO-L073RZ with SX1272MB2DAS LoRa RF Expansion board and I’m not being able to run the firmware “End_Node�? provided in I-CUBE-LRWAN (1.2.0).The problem comes when “SystemClock_Config�? is called in main:void SystemClock_Config( void ){ RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; RCC_OscInitTypeDef RCC_OscInitStruct = {0}; /* Enable HSE Oscillator and Activate PLL with HSE as source */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; RCC_OscInitStruct.HSEState = RCC_HSE_OFF; RCC_OscInitStruct.HSIState = RCC_HSI_ON; RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_H
Dear friend,I've got two threads running on a STM32F107RCt6 MCU; One is a Modbus TCP Server thread with the stack size of 256 words and the other is a Modbus RTU thread with the same stack size.When there is no client connected to the Modbus tcp server, the RTU task works correctly and runs without any errors permanently but when a client is connected and reads/writes the Modbus registers, after 2 or 3 hours or more (less than 12 hours) , the Modbus RTU thread stops working in a way that you could say the TCP task terminates the Modbus RTU task.Could any one help me to find out why this happens and after working hours, the RTU taks stops?Is there any way to find out the current state of Modbus RTU task within the TCP task and if it was terminated, it restart it?I am using the latest version of CubeMX and HAL drivers.I use lwIP netconn APIs with freeRTOS and I config them on CubeMX.The total heap size of freeRTOS is 10KB.The priority of both tasks are the same.The client is a Monitoring
Hey everyone,I've got an SPI line setup on my stm32f722ze.Cache is not enabled. It worked and I'm not sure whether the code was changed, but it receives junk now. The DMA is triggered which shows that when I send data, it is receiving it, but not the correct data.I Have verified the data that's being sent via an oscilloscope.The stm's spi line is coupled to a esp32. The esp32 is the master and the stm is running as slaveHere's the relevant code for the stm32:Hal_msp.c:void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi) { GPIO_InitTypeDef GPIO_InitStruct; if(hspi->Instance==SPI1) { /* USER CODE BEGIN SPI1_MspInit 0 */ /* USER CODE END SPI1_MspInit 0 */ /* Peripheral clock enable */ __HAL_RCC_SPI1_CLK_ENABLE(); /**SPI1 GPIO Configuration PA4 ------> SPI1_NSS PA5 ------> SPI1_SCK PA6 ------> SPI1_MISO PA7 ------> SPI1_MOSI */ GPIO_InitStruct.Pin = GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStr
I have a STM32F746 Discovery. I work on AC6, CubeMX, emWin. I'm generating WindowDLG.c. I add a further code to WindowDLG.c. After closing CubeMx and trying to reload WindowDLG.c, "Error reading widgets" is reported. So I can not develop the file in GUIBuilder any more. How to deal with this?
Just upgraded to STCubeMX v5 which appeared to successfully open a project I just started. After agreeing to the annoying "Project has been changed, do you want to save" pop-up, Atollic became non-responsive. Is this a known bug? You have coded a race condition between the timer pop-up and the main GUI thread...PS: "Update" from previous version of STcubeMX failed (lots of downloading and thrashing, error message flashed quickly onscreen, no installation). I had to deinstall the plug-in and then install the new version after manually downloading from ST site.PPS: Restarting Atollic, STCubeMX seems functional...PPS: Just repeated this problem. I was working in SPI configuration when annoying question popped up, I clicked "Save", and Atollic IDE went non-responsive. There's a race condition bug between the pop-up and editing...
HelloAn F4 project with a timer in output compare mode generates in main.c a call to HAL_TIM_MspPostInit(&htim1);This function is implemented in stm32f4xx_hal_msp.c but is declared in main.c file.If I change main.c to main.cpp. It does not link.My opinion is that CubeMx should generate a stm32f4xx_hal_msp.h file containing the public functions declarations within an extern "C". Something like this :#ifndef STM32F4XX_HAL_MSP_H_ #define STM32F4XX_HAL_MSP_H_ #ifdef __cplusplus extern "C" { #endif void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim); #ifdef __cplusplus } #endif #endif /* STM32F4XX_HAL_MSP_H_ */The main.c file should include it.My 2 cents.Julien
The pc is win10-64bit, I do not have this problem in win7-64. The STM32cubeMX GUI can only be closed in Task Manager where java JRE is reported as "Suspended". Windows java application logs indicate "hangup", timestamped to when I do the clicking. JRE 1.8.181-64bit is installed.Any advice would be appreciated.
Posted on September 09, 2017 at 06:39Update: As the below error appeared when I tried to make a Low Layer project for Nucleo L152RE board using STM32CubeMX in generating a code for a Makefile project, and, it was solved by an update to both STM32CubeMX and LL driver, the generated code remains unusable so, I chose a more appropriate title.Original topic:- undefined reference to `LL_RCC_GetSystemClocksFreq'This function is referenced inside LL_I2C_Init function. I am using the last version of STM32CubeMX and I'm writing code for Nucleo L152RE board using Low Layer drivers.I generated code for using the I2C1 peripheral, and I did a compilation without adding my own code. And it trows the error specified in the title at linker time. I also use the last version of ARM gcc compiler from the gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 archive under Linux Fedora 26. I attached the project archive.#stm32cubemx #i2c #timer #incomplete-code #undeleted-temporary-files #missin
I'm using an STM32F030K6 and I need to measure the time between the rising edge of 2 signals.The 2 signals (square wave) are not in phase and intended to use TIM1 to:* rising edge of signal 1, make timer start (internaly clocked);* rising edge of signal 2, capture the timer and trigger the DMA;* automatically stop at the timer to wait for the rising edge of signal 1 again.I find some information in sections 13.3.17 and 13.3.18, but not enough to understand the process and how I can prepare the setup using CubeMX.Could you please explain the process and recommend some specific reading on this example?Thank you
Dear Community,is it possible to download older versions of STM32CubeMX (4.X)? Unfortunately there are no links to archive downloads on the ST website. Thank you very much.Best regards,Emin Yagmahan
I am using stm32f429zi Nucleo board for Ethernet communication and using LWIP libraries.using this as an example "LwIP_TCP_Echo_Server", I am able to receive data from Hercules software and send back the received data to Hercules software, is there any option only to send data.
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.