Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
This warning present since I started to using low layer driver, it was around 2 -3 months before.In file included from ../Core/Inc/main.h:70:0, from ../Core/Inc/gpio.h:58, from ..\Core\Src\gpio.c:51:../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_ll_exti.h:127:0: warning: "LL_EXTI_LINE_18" redefined #define LL_EXTI_LINE_18 EXTI_IMR1_IM18 /*!< Extended line 18 */In file included from ../Core/Inc/stm32l4xx_hal_conf.h:400:0, from ../Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h:46, from ../Core/Inc/main.h:61, from ../Core/Inc/gpio.h:58, from ..\Core\Src\gpio.c:51:../Drivers/STM32L4xx_HAL_Drive
Hello!I am trying to run an Ethernet on STM32F4DISCOVERY board (with 407VG MCU) using a ETH BOARD module from Waveshare.In the CubeMX, I added ETH with RMII, in the settings I entered the MAC and set the PHY Address to 1 (found in the datasheet for this module).After that I adeed LWIP, turned off DHCP and set the mask and gateway of the router and entered a free IP, turned on UDP.Next I generated a code for SystemWorkbench, added a gnetif structure to variables, and put functions (ethernetif_input and sys_check_timeouts) in a while(1).Then I tried ping a board, but it doesn't work. Also in router settings I can't find any new device with specified MAC.Already desperate, I still can not understand what the problem is ...There are screenshots with my settings.
I want to confimcan I use the cystal resonator for the IC, in STM32CubeMX toll, theHSE can be only set for Bypass clock source.HSE BR
..
After generation in the new version of CubeMx 5.2.1, the working code with tcp server is no longer detected on the network. The code is based on the tcp echo server recommended in STM32Cube_FW_F4_V1.21.0. The ethernet and lwip code and settings have not changed.
Hello, I am attempting to use all 4 sai ports as one large synchronous audio device.The I want SAI1A to be the master, and SAI1B, SAI2A, SAI2B, SAI3A, SAI3B, SAI4A, SAI4B to all be synchronous slaves to the SAI1A.I am able to configure them all, except for SAI4B, which says it's in conflict with SAI1B synchronous slave. I'm using the internal synchronous signals, all synchronous slaves are marked as, "Synchronous with other SAI, SAI1". But just 4B says it's in conflict. I assume if I configure it manually, it'll probably work fine...Thanks -Caleb
Hello,i am trying to get the 32F0-TOUCH-LIB to work, but so far i didn't succeed.Processor is an STM32F051C4Tx on a custom board, which works except for the touch functions. There is a touch button for Proximity sensing and two sliders for input.The project was created with STM32CubeMx (Version 5.2.1):TSC peripherial:Middleware: TouchsensingIs EnabledTSLPRM_TOTAL_TOUCHKEYS =1IO_TOUCHKEY1=G4_IO4The code is generated for Atollicstudio and compiles.And the following changes are made:tsl_user_Init() called after MX_TSC_Init() and MX_TOUCHSENSING_Init()In the infinite loop tsl_user_Exec() is calledThe tsl_user_Exec() always returns TSL_USER_STATUS_BUSY and no activity can be observed at the IO-Port with an oscilloscope.I compared the functions calls with the STMTouch Driver user manual and everything matches. I even checked the TSL_tim_ProcessIT() call in the Systick ISR. The TSC IRQ doesn't seem to be used in the libraries, because the IRQ-flag gets polled in the tsl_user_Exec().I be
Hi Guys,The latest version of STM32CubeMX allows me to use firmware packages for the F7 architecture versions 1.13.0 and 1.14.0. The latest version of the Keil STM32F7xx_DFP 2.11.0 (2018-09-05) says it uses firmware package version 1.12.0. Unfortunately I have projects using a range of firmware versions. Is there some sort of strategy or recommendation to managing this? This has arisen because Keil's networkInitialize causes a hardfault on DFP version 2.10.0 and 2.11.0, but works fine on 2.9.0. I was trying to make sure the code Cubemx was generating was 'as close to perfect' as possible. Any comments on this issue would also be appreciated.Cheers,Hamish.
Hello, all.I'm using the STM32F100RB , mounted on the STM32VL Discovery board.The clock confioguration, done in STM32CUBEMX is supplied at the end of the post.I wanted to use HAL_GetTick to get approximate millisecond resolution for the RTC.After some tests, I noticed clock skews, so I ran a test for 1000 RTC seconds. (during which I constattly polled HAL_RTC_GetTime and HAL_RTC_GetDate).These are the times I discovered:Actual Time: 1,009,129 msRTC Time: 1,000 sHAL_GetTick Time: 1,009,217 msSo while the HAL_GetTick was pretty close (but still has a sizeable skew of almost 100 ms after 1000 seconds, which is 8.6 seconds a day), The RTC was way off, accumulating a deficit of 9 seconds in that span. So, I have 3 questions:How do I fix the RTC clock skew?How do I fix the HAL_GetTick clock skew?IS there a better way to calculate milliseconds for RTC?The STM32CUBEMX Clock Configuration. is attached below.Thanks in advance!
Attached is the IOC file I am using. When I generate the project, the STM32F7xx_HAL_Driver directory has a few folders inside of it, but none of the HAL files, including the stm327xx_hal.h file which prevents compiling from working. I have the "Copy all used libraries into the project folder" option selected. Why are none of the HAL files copied into the project directory?
Using STMcubeIDE with Segger debug firmware on a Nucleo-144 429 board.Debug works fine, but clicking "disconnect" (small red broken connection icon, next to "stop debugging" icon) pops up scalability dialog and hangs IDE. The dialog and IDE are non-responsive except for "ding" when clicked. Need to kill IDE with task manager...
I think I've found a bug on CubeMX.When generating the code for STM32F072C8T6, the number of wait states is wrong.It seems that the code generator checks HCLK frequency instead of SYSCLK frequency.
We are using STM32F207ZG and while configuring it with the help of STM32IDE we are facing some conflicts like we have used USART1(Asynchronous mode with only Rx and Tx) . It is showing conflict if we use USART1_CTS and USART1_RTS pins as GPIO pins. The error showing is "Partly disabled conflict with use of GPIO pin". My doubt is that can we use them as GPIO if conflict is there or else its reserved.
Using STcubeIDE: To easily reproduce this problem, generate code from the attached IOC and try to compile. I think this fails due to multiple incorrectly generated include paths.PS: Attention @Markus GIRDLAND (ST Employee) @Imen DAHMEN (ST Employee)
Dear Members,Is it possible that I combine C language generated from STM32CubeMX with C++ library ?Any examples ?Thanks =)
Hello,I'm trying to do a project which involves using both UART and SPI to better understand these protocols as well as the HAL drivers.I have generated the project with the cubeMX and for the first step I'm trying to send some data via SPI2 in interrupt mode when I press a button.The code logic is like this: The program cyclicly checks in an endless while loop whether I press the user button or not. If I do it's going to start the process of sending some data via SPI in interrupt mode. I have configured my controller on the board(NUCLEO F401RE) in master full-duplex but I have not connected any cables to any other device/board yet as I just want to test the sending in interrupt mode first.I put some code which lights up the user LED in the 'SPI2_IRQHandler'(global interrupt that should be fired when transmission is completed if I understood corectly from the datasheet) if which in turn calls HAL function 'HAL_SPI_IRQHandler' which takes care of clearing flags etc.void SPI2_IRQHandler(
I built a simple project using CubeMX(V5.2.1) for an STM32F103C8 (Blue Pill) , and compiled with Keil uVision5.In CubeMX I enabled LSE and HSE, the SWD, and PA9 as a GPIO output. For everything else I used the CubeMX defaults.I added the following code to main(). /* USER CODE BEGIN 2 */volatile char ii=1;while(1){HAL_GPIO_WritePin (trigger_GPIO_Port, trigger_Pin, GPIO_PIN_SET);HAL_Delay(ii); HAL_GPIO_WritePin (trigger_GPIO_Port, trigger_Pin, GPIO_PIN_RESET); HAL_Delay(100); } /* USER CODE END 2 */In Operation, the output is set high, HAL_Delay(ii) is called, the output is set low and there is a delay of 100 milliseconds. Looking with a scope I always see an output pulse width of ii+1 milliseconds, for any ii. If I comment out the Hal_Delay(ii) line, the output pulse width drops to 2.5 usec, so its not the loop that's adding the extra millisecond.So what am I missing here? The HAL manual is pretty clear about HAL_Delay(x) producing a delay of x ms.Thanks for your help. Dave
Hello,I have been using STM32CubeMX on Windows until today. I just realized that there is a MAJOR bug in the existing release (don't know how long it has existed).This is the output I get on failure:Judging from the stack trace it seems to be a JAVA related bug. I did some digging around and it seems that a setting in the project I am loading affects this bug.ProjectManager.AskForMigrate=trueIf I save the project after this it sets this setting to false, but the next time I load it it will fail with the above errorlog.If anyone has any tips on how to resolve this I'd love to hear it. For the time being manually resetting the project setting is a work around.STM, please resolve this issue. If I can provide more information I will.Java : openjdk-8-jrejava version "1.8.0_211"Java(TM) SE Runtime Environment (build 1.8.0_211-b12)Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)uname:Linux spaceinvader-dev 4.18.0-22-generic #23~18.04.1-Ubuntu SMP Thu Jun 6 08:37:25 UTC 2019 x8
Good day,How do I use the fractional mode on the PLLs in STM32CubeIDE or STM32CubeMX?If I enter a number in the "fracnx" field there is a change but CubeMX still thinks the VOC frequency is to high due to the large DIVN value.Thanks,Charles
I created some simple project in CubeMX for testing timer6 functionality. I configured PSC (prescaler) and ARR (automatic reload) registers. For now the interrupt handler is running correctly (it is running at calculated period), however I needed to add some special code in the end of this handler:void TIM6_DAC_IRQHandler(void) { /* USER CODE BEGIN TIM6_DAC_IRQn 0 */ uint32_t z; static uint32_t y = 1; y ^= 1; set_gpio(y); htim6.Instance->SR = 0; z = htim6.Instance->SR; }to get it working properly.I mean - in the 10th line I'm trying to acknowledge the interrupt flag (clear it in SR status register ). It should work but it doesn't. I have to add the 11th line to get it work. As the proper work I mean that the blue led is blinking accordingly to the set period. Blinking led is done by set_gpio() procedure.The strange thing is that when there is no the 11th line the program doesn't work properly. I thought that zeroing the SR should acknowledge the inter
CubeMX 5.1.0 and STM32F302 every time a project is re-generated the STM32F302R8Tx_FLASH.ld file is empty.
In order to configure the STM32F446ZCT MCU, there are many un-explained parameters I'd like to know in order to set up it correctly before the code can be generated.
Hi,I'm trying to use my Nucleo-144 with the STM32F746ZG processor on STM32CubeMX and Keil MDK-ARM V5.26.2 and I'm getting the problem of arm_math.h and other DSP files not beeing copied to the project folder.I tried with some boards with STM32F4 Discovery and STM32F1 that I got here and they work OK just after generating the project files with STM32CubeMX, but the STM32F746, doesn't.I copied manually the arm_math.h library to the path: project_name\Drivers\CMSIS\Include, and then Keil doesn't error me. But why STM32CubeMX doesn't copy this library for STM32F7 ??Is this a know bug? How can I make this work?
STM32F042K6T6 Cannot start after reset button press or IWDG reset。The same circuit, replaced with Stm32F030K6T6, no problem.
When I opened my projects, The menu "Docs & Resources" is gray, and can't be clicked. I tried "Refresh Data", it didn't help. What should I do? Thank you.
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.