Ask questions on STM32CubeMX. Discuss code generation and configuration challenges, among other topics.
Most recent activity
Hello,I have some problems in the 2nd part of the above mentioned exercise (see also STM32CubeIDE basics - 10 ADC DMA TIM HAL lab - YouTube).I am not able to convert the output of the ADC in temperature values.Building does not give any error but while debugging the converted values are all zero. The debug seems to stop at if(1==flag) but I can't figure out whyAttached the slides of the exercise and my code.
Hi�?I want to import cellular software expansion by package creator. However, it shows that JAVA FX is missing in the run time environment. Even, I have re-installed STM32 MX again. Any solution to solve this issue?
Hello,I have installed STM32CubeIDE v1.7 and I am using STM32F746 - Discovery Board. Also I have installed the STM32F7 package v1.16.0 & 1.16.1.When I create a new project I configure my mcu parameters from STM32CubeMX which is located in the STM32CubeIDE and generate the initialization code, it seems like FreeRTOS files are missing (in the created project). I have never faced the same issue with v1.5.1. Do anybody know what I am doing wrong?
Is there any register or flag to check whether Dma interrupt or only global interrupt is enabled in Cubemx?ı am writing an uart driver and ı would like for driver to be arranged automatically according to selections in cubemx.For example, if uart5 dma is selected, this driver uses dma_start function or if global interrupt is selected for uart7, the driver uses hal receive uart it function.I searched datasheet and hal library. But can not find any register or flag inside code to be able to check which way the uart used, dma or interrupt.
RTC was set in Cube MX. (0y/0M/0d 0h:0m:0s)A backup register is used to store the date and time.For example, if you press the reset button at 0/0/0 0:1:1, RTC is activated from 1m 1s.But when I turn off the power and turn on the power again, it goes back to 0/0/0 0:0:0.And the backup register value is cleared.I checked that HAL_RTCEx_BKUPWrite() is executed again.I think it should work from the time the power is turned off.Does RTC backup return to Cube MX settings when power is turned off?Is the backup register value also deleted?static void MX_RTC_Init(void){ /* USER CODE BEGIN RTC_Init 0 */ __HAL_RCC_RTC_ENABLE(); __HAL_RCC_RTCAPB_CLK_ENABLE(); /* USER CODE END RTC_Init 0 */ RTC_TimeTypeDef sTime = {0}; RTC_DateTypeDef sDate = {0}; /* USER CODE BEGIN RTC_Init 1 */ /*&n
I am using STM32CubeMX 6.2.1 with STM32H7 package 1.9.0.Some IOs are configured as EXTI, and I have configured CubeMX to use LL for GPIO.The generated code per IO is: LL_SYSCFG_SetEXTISource(LL_SYSCFG_EXTI_PORTG, LL_SYSCFG_EXTI_LINE12); /**/ EXTI_InitStruct.Line_0_31 = LL_EXTI_LINE_12; EXTI_InitStruct.Line_32_63 = LL_EXTI_LINE_NONE; EXTI_InitStruct.Line_64_95 = LL_EXTI_LINE_NONE; EXTI_InitStruct.LineCommand = ENABLE; EXTI_InitStruct.Mode = LL_EXTI_MODE_IT; EXTI_InitStruct.Trigger = LL_EXTI_TRIGGER_RISING_FALLING; LL_EXTI_Init(&EXTI_InitStruct); /**/ LL_GPIO_SetPinPull(...);Note that there is no LL_GPIO_Init() call, as would be the case with non-EXTI GPIOs.Because that call is missing, the GPIOx_MODER setting is remaining at the default, which for H7 appears to be 0b11 (analog). This appears to be a
..
As in the FYI note STM32CubeMX on Raspberry Pi 4 the Oracle Java is needed. But seems that Oracle java 1.8.x is only operative for Windows x64 or x86, not for ARM. Any alternatives? Thanks
Hello @Khouloud ZEMMELI Please refer to attachment.After I installed and used the latest STM32CubeMX version 6.3.0, I am observing an issue. The PIN names that I had used in the IOC file, are now no longer present as macros in the generated code. Without the macro I no longer know the use of the PIN and have to refer to Schematics. The STM32CubeH7 MCU package version in use is unchanged and is 1.9.0Please suggest a fix.Thanks,Rajeev
Hi,I'm using the STM32CubeIDE v1.6.1 and using FW.F2.1.9.3 firmware package with are both currently the lastest up to date versions.Setting up an STM32CubeMX project for low layer library to be able to use RTC, the code generator is not working properly.Here is how to generates the code:/** Initialize RTC and set the Time and Date */ RTC_InitStruct.HourFormat = LL_RTC_HOURFORMAT_24HOUR; RTC_InitStruct.AsynchPrescaler = 127; RTC_InitStruct.SynchPrescaler = 255; LL_RTC_Init(RTC, &RTC_InitStruct); LL_RTC_SetAsynchPrescaler(RTC, 127); LL_RTC_SetSynchPrescaler(RTC, 255); /** Initialize RTC and set the Time and Date */ if(LL_RTC_BAK_GetRegister(RTC, LL_RTC_BKP_DR0) != 0x32F2){ RTC_TimeStruct.Hours = 0; RTC_TimeStruct.Minutes = 50; RTC_TimeStruct.Seconds = 0; LL_RTC_TIME_Init(RTC, LL_RTC_FORMAT_BCD, &RTC_TimeStruct); RTC_DateStruct.WeekDay = LL_RTC_WEEKDAY_TUESDAY; RTC_DateStruct.Month = LL_RTC_MONTH_JULY; RTC_DateStruct.Year = 21; LL_RTC_DATE_Init(RTC, LL_RTC
Hi,I hope this is the right topic to ask this question.I'm new to embedded, and I'm experimenting with stm32l496ag discovery and sending/receiving uart form the connected pc using interrupts.I configured USART2 in CubeMX, enabling "global interrupt" in NVIC Settings tab, and setting the baud rate to 9600.I'm using GPIO "PA2" and "PD6".My problem is that while in debugging, HAL_UART_RxCpltCallback is called and acts as expected, sending back the "Test123" message seen below.On the other hand, when running without debugging I get no message back. I tried setting a LED on when receiving, which as well works in debug but not outside of it.What could cause this? I'm at a loss.Any help would be appreciated!These are the relevant code snippets (to my limited knowledge, I'll happily supply more): /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_CRC_Init(); MX_I2C2_Init(); MX_DMA2D_Init(); MX_QUADSPI_Init(); MX_FMC_Init(); MX_UART4_Init(); MX_USART2_UART_Init(); MX_TouchG
Hi Am getting Proxy error connection while trying to open STM32 Cube MX 5.0.0 version.
I want to install STM32Cube MCU Package for STM32F4 Series.When I install ver 1.26.2, "stm32cube_fw_f4_v1260.zip" is installed and unzipped at first.In "stm32cube_fw_f4_v1260.zip", the folder "STM32Cube_FW_F4_V1.26.0" is included.Then, "stm32cube_fw_f4_v1262.zip" is installed and unzipped.But, as the folder "STM32Cube_FW_F4_V1.26.0" is also included in "stm32cube_fw_f4_v1262.zip" and the folder name is overlapped, the error occurs every time.I'm looking forward to answering this question.
Specifically, settings for the "Timing configuration" and "Slave Features". The MCU is an STM32L476, Pins are PC0, PC1, PC2, PC3, and PA0 for the SCL, SDA, XL2 INT, XL1 INT, and MAG INT respectively, if that mattters.
In STM32CubeIDE I can't find the setting under SystemCore->NVIC or I just don't know the name?I have two input capture channels on TIM3. The global interrupt for TIM3 is disabled.In particular I want to set it higher than a "EXTI line interrupt".
This is a bit nit-picky, but it's confusing. For a USB experiment on an STM32F103, I'm seeing an odd clock setting that isn't used and wondering why it is this way. The USB application uses an 8MHz HSE crystal as per usual. RCC_OscInitTypeDef RCC_OscInitStruct = {0}; /** Initializes the RCC Oscillators according to the specified parameters * in the RCC_OscInitTypeDef structure. */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; RCC_OscInitStruct.HSEState = RCC_HSE_ON; RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1; RCC_OscInitStruct.HSIState = RCC_HSI_ON; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL9; if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) : etcWhy is the below line included at all? In stepping through the code, I don't see it being relevant: RCC_OscInitStruct.HSIState = RCC_HSI_ON;Following the flow, since the clock type is HSE,
I want to use TLS protocole on raw api with lwip, how can I start ? I couldnt find any source with raw api. Is this possible or not ? On the cubemx , I couldnt select lwip+tls without freertos
I do n’t know why MX_DMA_Init () is behind other peripheral initialization functions, so all DMA channel initialization fails.stm32cubemx version: 5.6.0
STM32L4Q5VGTxP I use the board I made.FUNC 1) HAL_SPI_Transmit(ILI9341_SPI_Handle,&data,1,100);The output waveform is observed with SCLK / MOSI PIN.FUNC 2) HAL_SPI_Transmit_DMA(ILI9341_SPI_Handle,&data,1);Output waveform does not appear with SCLK / MOSI PIN.After executing HAL_SPI_Transmit_DMA once(check function)HAL_SPI_StateTypeDef err;err = HAL_SPI_GetState(ILI9341_SPI_Handle);while(err != HAL_SPI_STATE_READY){err = HAL_SPI_GetState(&hspi1);}The result continues to return err (HAL_SPI_STATE_BUSY_TX).Below is a picture of CUMEMX setup. //======================== PSHAL_ADC_Start_DMA(&hadc1,&adc_dma_buffer[0], 4);Also, it doesn't work.What did I miss, where did I go wrong?
Hello,I am working on STM32F746ZG and I am trying to interfacing a display using FMC peripheral.But actually I can't get it work... My display seems to receive some commands but I can't successfully send color.First of all I used CubeMX to configure my HW interface :respecting A"N2790 TFT LCD interfacing with the high-density STM32F10xxx FSMC"The generated code configured my FMC as :SRAM_HandleTypeDef hsram1; /** * @brief Initializes LCD IO. */ void MX_FMC_Init(void) { /* FMC initialization function */ /* USER CODE BEGIN FMC_Init 0 */ /* USER CODE END FMC_Init 0 */ FMC_NORSRAM_TimingTypeDef Timing = {0}; /* USER CODE BEGIN FMC_Init 1 */ /* USER CODE END FMC_Init 1 */ /** Perform the SRAM1 memory initialization sequence */ hsram1.Instance = FMC_NORSRAM_DEVICE; hsram1.Extended = FMC_NORSRAM_EXTENDED_DEVICE; /* hsram1.Init */ hsram1.Init.NSBank = FMC_NORSRAM_BANK1; hsram1.Init.DataAddressMux = FMC_DATA_ADDRESS_MUX_DISABLE;
for SPI.
Here is the warning....../Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_sd.c:2760:29: warning: 'Init.ClockDiv' may be used uninitialized in this function [-Wmaybe-uninitialized] 2760 | if ((sdmmc_clk / (Init.ClockDiv + 2U)) > SD_NORMAL_SPEED_FREQ)
I've migrated to a new custom board, which uses a STM32F746IE and a new SDRAM model, NDS36PT5-20ET by Insignis. And although I could make a MT48LC16M16A2 by Micron work in the previous board, I have no luck with the Insignis SDRAM.The Insignis SDRAM is rated for 200 MHz. I'm using a system clock of 200 MHz, so the SDRAM is clocked at 100 MHz. Based on the timings in the datasheet, I configured CubeMX like this:Each FMC cycle is 10 ns, so I divided the datasheet time by 10 ns and rounded up. The Write recovery time would be 1 cycle, but CubeMX sets this to 2. I also chose a CL of 3, since the datasheet doesn't list any Clock cycle time for CL 2.Similarly, I initialize the SDRAM with this function in main():static void SDRAM_Init() { FMC_SDRAM_CommandTypeDef Command; __IO uint32_t tmpmrd =0; /* Step 3: Configure a clock configuration enable command */ Command.CommandMode = FMC_SDRAM_CMD_CLK_ENABLE; Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK1; Command.AutoRefreshNumber
We created a new project with STM32L552 using STM3CubeMX V. 6.3.0 and HAL Version 1.4.0. We activated Middleware USB CDC and used the identical software add-ons as in the last project for the same processor. The last project was done using HAL V. 1.2.0. and worked perfectly. Now with the new release we can not get the CFC to work.After all initialisations are done, the USB port state is set to "Suspended".The PC can not connect to the USB device via VCP. (USB Device was not detected) The error message on the PC appears as soon as USB_DevConnect(hpcd->Instance);is called in HAL_PCD_Start().Has anybody an idea what could be the reason?
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.