Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
please find the attachment of clock configuration snapshot.i'm trying to use external clock source for RTC application. [i.e, HSE or LSE]But the RTC too faster than the normal time. is it requires any other configuration? orhow to fix this issue?
I'm trying to do a simple read/write on the MT25TL01G flash that's present on the STM32H757I-EVAL evaluation board. However, when I'm using BSP_QSPI_Read, I'm missing the first 6 bytes of data. Reading via memory mapped mode works as expected.Here's my initialization code. The QSPI clock should be running at 200MHz, according to CubeMX. /* QUADSPI parameter configuration*/ hqspi.Instance = QUADSPI; hqspi.Init.ClockPrescaler = 3; hqspi.Init.FifoThreshold = 1; hqspi.Init.SampleShifting = QSPI_SAMPLE_SHIFTING_NONE; hqspi.Init.FlashSize = 26; hqspi.Init.ChipSelectHighTime = QSPI_CS_HIGH_TIME_4_CYCLE; hqspi.Init.ClockMode = QSPI_CLOCK_MODE_0; hqspi.Init.DualFlash = QSPI_DUALFLASH_ENABLE; if (HAL_QSPI_Init(&hqspi) != HAL_OK) { Error_Handler(); } /* USER CODE BEGIN QUADSPI_Init 2 */ BSP_QSPI_DeInit(0); BSP_QSPI_Init_t init ; init.InterfaceMode = MT25TL01G_QPI_MODE; init.TransferRate = MT25TL01G_DTR_TRANSFER; init.DualFlashMode = MT25TL01G_DUALFLASH_ENABLE;
I imported a project into STM32CubeIDE (from Atollic).The Release configuration was deleted (bug), but otherwise the project looked OK.Double-clicked on project's IOC file to start CubeMX (bug, IDE doesn't find this and otherwise CubeMX perspective comes up blank).IOC was converted to latest version without any errors.BUG: Generate Code wiped out all of my sources in the imported project!Yikes.Is there a stable release coming any time soon?Meanwhile we'll need to stick with Atollic.Thanks,Best Regards, Dave
HiI am using an STM32L496GTx with a HAL from Cube MX and it just jumps to the "thread #1" whenever I try to single step through the code in main. I don't even get to the other parts, I'm just trying to init the HAL (I don't get to the systemclock, any of the peripherals, nothing) and when I single step through the C code I get kicked to something and my only option is to view disassembly around the HAL_MspInit() call within the init. I really have no idea what's going on and I thought it might be this MCU but I swapped it for a fresh MCU today and this brand new MCU is doing the exact same thing. I'm feeding the 3.3V directly with a DC supply so the other peripherals on the system should be pretty isolated.I'm using STM32CubeIDE and using a JLINK for the MCU connection. I don't have a scope for the power rails but I'm hoping it's clean enough. I have external oscillators on this board but they aren't configured. I really am not sure what else to check out.Thanks
On the project we are using LPUART1, more out of pinout convenience than low power, but STM32cubeMX 6.30 and STMCube_FW_H7 V1.9.0 miss placing the HAL_DMA handler for LPUART1 in the BDMA handler.Is there a better place to report STM32CubeMX and FW/HAL bugs?Below is my simple fix.
..
Posted on May 23, 2018 at 12:53Hello guy. I' upgrade my CubeMX software to V.4.25.1 every thing is clear no problem. But when we try to generate MDK project CubeMX show an project generate problem ( see in attach pic.) Please tellme how to fix it Thank youEDIT!!:: TrueStudio has the same problem.#cubemx-4.25 #mdk-arm
The calls to MX_DMA_Init and MX_USART2_UART_Init are generated in the wrong order. The DMA must be initialized first or the UART initialization silently fails to apply the proper configuration. There is no error but the UART doesn't work. STM32CubeIDE 7.0Nucleo F401REI configured the board for USART2 DMA operations as in the UART_Hyperterminal_DMA example. The generated code called MX_USART2_UART_Init followed by MX_DMA_Init but this ordering does not work. The calls to set the DMA CR did not have any effect leaving the DMA configured improperly. Switching the order of the Init calls fixed the problem. I am attaching the configuration file that generated the incorrect code.
Posted on June 11, 2018 at 20:22Hi,In the Advanced Parameters of the ETH configuration, there is only the LAN8742A external PHY configuration. Is it possible to use an other external PHY (like 8720A) using CubeMX?I tried with the user PHY, but I don't know where I can find the configs for the PHY 8720A. I tried the datasheet, but there's nothing like Read TimeOut or Write TimeOut.Did anyone already created a project with PHY 8720A on CubeMx and can tell me about the configs or where I can find them?Thank you very much.#ethernet-stm32f7 #cubemx-4.25 #phy-8720a #external-phy #ethernet-phy
i'm using STM32F730 and trying to use CAN in LOOPBACK mode.i'm using HAL_CAN for programming and STM32MXcube for configuration purpose.The transmission is successful (TXOK0=1 and RQCP0=1) but i'm unable to observe any activity in receiver FIFO. i have attached my code.i have not configured any filters till now, as i'dont want to use them. is it necessary to configure them for receiver purpose. plz guide me where i'm wrong. is there any problem with my bit timing. i have used 120ohm resistor at transreciever end. if i switch to normal mode it results in TXOK0=0 and TERR0=1 and acknowledgement error code (03). plz guide me, i'm stuck here with no breakthrough.
Nucleo F334R8. I setup HRTIM Timer A to generate 2 pulses per HRTIM cycle with Compare 1,2, 3 and 4 registers and this generates the expected outputs. However HRTIM_TIMxDIER is left at 0 by the cube MX code.Under NVIC settings for HRTIM1 I have ticked "HRTIM timer A global interrupt" Under Timer A settings I have "Interrupt Requests Sources Selection" set to 1 and "1st Interrupt Request Source" set to "Timer Compare 4 interupt enable"Compare 4 register is set to a value which controls the reset condition for the output and this works fine. The HR timer generates PWM outputs as expected, just the interrupts are not generated. I start the timer with "HAL_HRTIM_SimpleOCStart_IT"If I manually set HRTIM_TIMxDIER to value 0x0008 then the interrupt works as expected..IOC file attached.Am I missing something ?Thanks,Oliver
Right now I am having to manually alter the code after each generateI would expect it here But all I see is What am I missing?Many thanks,Thomas
CubeMXIDE 1.3.00, CubeMX 6.2.0project with Truestudio (CubeMX) or CubeMXIDE. FreeRTOSFMC using SDRAM bank 1, LCD display on first SRAM bank.GPIO outputs, I2C, SPI.FREERTOS CMSIS V1 or V2 does not matter.STM32F767ZIT Nucleo BoardUnder <project>/drivers/CMSIS/Device/ST/STM32F7xx/Source/Templates it creates system_stm32f7xx.c, which contains duplicate definitions of at least..AHBPrescTable, SystemCoreCLockUpdate, SystemInit and whatever else seems to be definined in this file.Other, and earlier, versions of CubeMX (rev 6.2) seem to not generate this file.Deleting this file seems to eliminate the multiple definitions, but this appears to be a bug.A further bug is that the little red "error" flags on the files seem to never want to go away.Any one else seeing this?I suspect that if FreeRTOS is not used, this may not happen. It seems to happen regardless of the version of the interface.
The function SCB_CleanDCache_by_Addr needs to be able to handle address that are not 32 byte aligned, but expanding the data cache flushing region to conforming addresses that included the requested region.netXduo calls the function regardless of regions and does not expand the region to the 32 byte alignment.Thus current our mitigation is completely turn off data caching on the part.STM please fix. As of 2021.10.23 using the latest H7 pack and STM32cubeMX.
Hi,We're using STM32H753 (2 nos.) and STPMS2L in new product development. I'm looking for PT100 thermometer DFSDM example code generation using STM32CubeMx. Any example code available on PT100 voltage & current sensing on 2-channels?
I generate code for stm32f767. I use software package 1.16.0 I want to use UART5 in auto baud mode via 0x55 symbol. And USART3 the same. Why code is different?static void MX_UART5_Init(void){ /* USER CODE BEGIN UART5_Init 0 */ /* USER CODE END UART5_Init 0 */ /* USER CODE BEGIN UART5_Init 1 */ /* USER CODE END UART5_Init 1 */ huart5.Instance = UART5; huart5.Init.BaudRate = 115200; huart5.Init.WordLength = UART_WORDLENGTH_9B; huart5.Init.StopBits = UART_STOPBITS_1; huart5.Init.Parity = UART_PARITY_EVEN; huart5.Init.Mode = UART_MODE_TX_RX; huart5.Init.HwFlowCtl = UART_HWCONTROL_NONE; huart5.Init.OverSampling = UART_OVERSAMPLING_16; huart5.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; huart5.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;//wtf? ABRMOD0 and ABRMOD1 and ABREN will be 0 huart5.AdvancedInit.AutoBaudRateMode = UART_ADVFEATURE_AUTOBAUDRATE_ON0X55FRAME; if (HAL_UART_Init(&huart5) != HAL_OK){ Error_Handler(); } /* USER CODE BEGIN U
STM32CubeIDEVersion: 1.7.0Build: 10852_20210715_0634 (UTC)In AL_ADC_MspInit an erroneos line is generated after a recent update of STM32CubeIDE and has to be commented out:PeriphClkInit.AdcClockSelection = ADCCLockSelection;The following error message is generated../Core/Src/stm32l4xx_hal_msp.c: In function 'HAL_ADC_MspInit':../Core/Src/stm32l4xx_hal_msp.c:107:18: error: 'RCC_PeriphCLKInitTypeDef' {aka 'struct <anonymous>'} has no member named 'AdcClockSelection'; did you mean 'I2c1ClockSelection'? 107 | PeriphClkInit.AdcClockSelection = ADCCLockSelection; | ^~~~~~~~~~~~~~~~~ | I2c1ClockSelection../Core/Src/stm32l4xx_hal_msp.c:107:38: error: 'ADCCLockSelection' undeclared (first use in this function); did you mean 'SdioClockSelection'? 107 | PeriphClkInit.AdcClockSelection = ADCCLockSelection;
I just updated STM32CubeMX from version 6.2.0 to 6.3.0 which configured the adc.c file by inserting the line of code highlighted in the figure. The compiler gives an error recognizing that the 'ADCClockSelection' parameter does not exist. How can this error be corrected?
Hi,In Cubemx configuration, there is no option in NVIC2 (which is an interrupt controller for M4 core) for enabling or disabling DMA global interrupt. There is an option for only the M7 core in NVIC1. Are there any ways to use DMA transfer complete or half transfer complete ırq handlers in M4 core? Thank you.
Even in case of not using interrupts the Function ETH_Prepare_Tx_Descriptors() line 2993 of stm32h7xx_hal_eth.c does globally enable interrupts before it exits. I would suggest using a conditional interrupt handling there (check if enabled e.g. if needed ta all). Since it is within a HAL Driver any change there will be overwritten with the next code-generation.The interrupt handling was not needed in previous version e.g. v1.7.0Since it only protects one line of code (which could be shortened to one register access), I would really like to know the reason for it.How does the BuffersInUse work anyway? I only see it in that one place.
I am using the H730, with the USB High Speed enabled on my own PCB setup. On some occasions, the USB will work as expected. However, most of of the time, it would enter the Error_Handler Loop. I used the CUBEIDE and ioc gui to enable the usb hsThe trace of the function call leading up to the error: MX_USB_DEVICE_Init();if (USBD_Init(&hUsbDeviceHS, &HS_Desc, DEVICE_HS) != USBD_OK)ret = USBD_LL_Init(pdev);HAL_PCD_Init(&hpcd_USB_OTG_HS) != HAL_OKError_Handler();I could not constantly recreate this issue on why the USB would sometimes work. With literally the same setup, it would throw the handler error 5 seconds later. I am using a valid external USB Phy that is proven to work, but I just don't understand how its entering this state constantly. Thank you!
The STM32F105RBT6 manual shows that there are 1 control endpoint, 3 IN endpoints, 3 OUT endpoints, but the USB driver code generated by CubeMX now shows hpcd_USB_OTG_FS.Init.dev_endpoints = 4; are these 3 IN and OUT endpoints shared? 4 endpoints and 1 is the control endpoint for user-defined use, only 3 are not enough and they are less than the lower-end STM32F103
I recently upgraded to STM32CubeMX 6.3.0 (from 6.0.1) so that I can make a change to an existing .ioc file. This is on Windows 10.When I opened the .ioc file, everything seemed fine (after migrating) but the clock configuration tab claims that the clock setup in the .ioc file, which (as far as I can tell) has been working just fine for half a year, was invalid.Thinking I had somehow screwed up the .ioc file, I tried opening a previous version of it, that was generated using Cube 5.6.1, but it won't open. If I double-click the .ioc file, the initial CubeMX window appears but blank aside from the File/Window/Help menus, and one CPU core is pegged at 100% (A similar case seems to be at https://community.st.com/s/question/0D53W00000uWYu6SAG/cubeide-hangs-when-starting-configurator). If I open CubeMX, wait a minute or two, then open the .ioc file using File->Open, it still hangs, but without a CPU core being pegged. I tried another old (but previously valid) .ioc file with the same resul
While developing my application I ran into the problem that the state of my timers working in "One pulse mode" (configured used STM32CubeMX with HAL libraries) where getting locked in the "HAL_TIM_STATE_BUSY" state after the "HAL_TIM_PeriodElapsedCallback" was executed. Trying to start the timer(s) again to generate a pulse once again didn't work anymore because the "HAL_TIM_Base_Start_IT" returns "HAL_ERROR". I was able to solve this by removing the check and setting of the state as shownin the screenshot in attachment. Is this a known issue and is there a better/correct way to solve this?Thanks in advance.
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.