Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hello everyone, I’ve recently acquired two STM32H747I-DISCO boards to experiment with USB High-Speed host functionality, specifically using the ux_host_hub_hid_msc example (v3.3.0) provided in the STM32CubeIDE. My goal is to test the Mass Storage Class (MSC) capability, specifically writing a file to a USB flash drive. However, after flashing the example to either board, the USB device is not detected when I insert the pen drive, and LED7 on the DISCO board turns on immediately. According to the reference manual, LED7 should light up green when the ULPI PHY detects a USB connection and the board is acting as a host. In my case, this LED turns on even before connecting any USB device. Also, this function writes a pin that is not set in the FW (GPIO Pin 5 Port H): /** * @brief Drive VBUS. * state : VBUS state * This parameter can be one of the these values: * 1 : VBUS Active * 0 : VBUS Inactive * @retval Status */ void USBH_DriverVBUS(uint8_t state) { /* USER CODE BEGIN 0 */ /* USER
Here is the board images I want to access onbord EMMC using usb cable on to my laptop to uplode some file in 4-GB EMMC storage.Kindly share step to access EMMC.
Hello Team,I'm using STM32H573I-DK for our application. I'm using MCUBoot application on Zephyr project directory to setup a secure boot and firmware update on this DK.I created a RSA key ( cd zephyrproject\\bootloader\\mcuboot, python ./scripts/imgtool.py keygen -k mykey.pem -t rsa-2048 ). I'm using this key in prj.conf of both the bootloader and application.In Application part I modified device tree to add partition to the flash memory. I'll share conf file, editted DTS below. chosen { zephyr,console = &usart1; zephyr,shell-uart = &usart1; zephyr,sram = &sram1; zephyr,flash = &flash0; zephyr,code-partition = &slot0_area; zephyr,canbus = &fdcan1; zephyr,display = &st7789v; };&flash0 { partitions {
There are a bunch of CVEs for ThreadX, NetX, and USBX dealing with remote code execution in versions below 6.2.1 (with some pretty scary vulnerability scores) and fixed in 6.3.The distribution in the STM32Cube system is 6.2.0 today, and I was wondering if the ThreadX support people have the latest distribution integration on their stack?Thanks,Andrei
I am trying to get USB High Speed running on my board, In the USB Core Soft Reset function, my code keeps on getting stuck in the do while loop that I have shown below. I have went through all the forum posts related to this and there has been no solution that has resolved this issue. The microcontroller series on this board is STM32U5A5RJT6. I would appreciate any guidance. Thank you! /* Core Soft Reset */ USBx->GRSTCTL |= USB_OTG_GRSTCTL_CSRST; do { count++; if (count > HAL_USB_TIMEOUT) { return HAL_TIMEOUT; } } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_CSRST) == USB_OTG_GRSTCTL_CSRST); return HAL_OK; }
I am trying to communicate to a e-paper display of waveshare 1.54inch v2 with B-WL5M-subg1. I have used the program file the company has provided but there is no respone in the module. I have tried using esp32 and the module works fine with it. both esp32and stm32 uses same program file while checking with logic analyzer both mcu show similar data format. But why isnt it working with stm32. I have attached the program for referense if there is any suggestions or solutions I would like to know.
Dear ST,I'm developing a project to send ADC data via USB high-speed to an external device (PC) with STM32H7S78-DK. I'm trying to establish communication via USB, but I'm having trouble with the CDC_Transmit_HS function, which always returns busy. Additionally, the callback CDC_TransmitCplt_HS() is never called, and the USBD_CDC_DataIn() function is not invoked. The hcdc->TxState = 0 is always different from 0. I don't understand why it is happening.The USB init, I think it is ok, because I can identify it at an external computer with the correct description and 480 Mbit/s of USB High speed.These are my configurations of USB:The Global Interrupt for USB is also available.This is the clock configuration: This is my code at the main, I just developed a code to send "hello" every second, and if it is Busy, it will print an increment value on the LCDThis is my USB init function:Do you know what the solution can be to the CDC transmission issue with USB high-speed d
Hello,I'm working with a RAK3172 based on STM32WLE5CC chip.I'm using Zephyr RTOS and trying to use the power management features.I've an uart communication, when CONFIG_PM=n, everything works well. When setting CONFIG_PM=y, I don't receive any data.I've configured, the lsi, hsi, pll and rcc in my dts file.I've tried a bunch of configuration, but impossible to get power management to work alongside uart.I just have the following code: int main(void) { while (1) { gpio_pin_toggle_dt(&gpio_led0); printk("Hello, World from main!\n"); k_msleep(1000); } return 0; }Thanks for the help
Hello,I just created a default project with the nucleo board template and with VCP initialized, how can I transmit data via UART using the VCP?
Having faced the same problem, ended up in this thread. This is the same for HAL_SPI_Receive_DMA() as well, because it internally calls the transmitReceive function. So, it made me enable tx dma interrupt as well rx. Why on earth I have to enable tx dma when I just need rx dma? It does not even call the tx complete callback. My workaround was to: 1-make tx dma interrupt priority higher than rx dma interrupt. 2-poll for tx dma complete in rx interrupt routine before proceeding to next transaction. void HAL_SPI_RxCpltCallback(SPI_HandleTypeDef *hspi) { handleXferCplt(hspi); } void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi) { handleXferCplt(hspi); } bool handleXferCplt(SPI_HandleTypeDef *hspi) { // stm hal forces to use both tx and rx dma becasue it calls tranmitReceive() internally for receive. // however, dma tx transfer complete interrupt comes after rx complete. So, tx dma busy flag is still set and queued // sessions cannot proceed. so wait for it to finish. this i
What should I pay attention to when I use stm32u5 FreeRtos stop2,When exiting stop2, do the relevant i2c spi adc uart peripherals need to be reinitialized?Is the value retained?Is there a routine for FreeRtos stop2?void Bsp_PowerManage_enter_stop_mode(void) { if ((device_state_info.stimulate_state) || (device_state_info.device_ota)) { return; } osKernelLock(); / while (__HAL_UART_GET_FLAG(&hlpuart1, USART_ISR_BUSY)); while (__HAL_UART_GET_FLAG(&hlpuart1, USART_ISR_REACK) == RESET); __HAL_RCC_LPUART1_CLKAM_ENABLE(); __HAL_RCC_LPTIM1_CLKAM_ENABLE(); HAL_UARTEx_EnableStopMode(&hlpuart1); device_lowpower_state.stop_mode_state = 1; HAL_SuspendTick(); // #if Bsp_IWDG if (HAL_LPTIM_TimeOut_Start_IT(&hlptim1, 61438) != HAL_OK) { Error_Handler(); } #endif HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI); SystemClock_Config(); HAL_InitTick(TICK_INT_PRIORITY) if (!__HAL_PWR_GET_FLAG(PWR_FLAG_STOPF)) Error_Handler(); __HAL_PWR_CLEAR_FLAG(PWR_FLAG_STOPF); if (__HAL_PWR_GET_FLAG(PWR_FLA
Hello,I’m using a CAT24C32-D EEPROM. It works on our STM32F446-based PCB, but I can’t get it to work on our STM32U5A5-based PCB. I’m encountering both write and read errors. I’m using the same driver/library on both MCUs, and the hardware is identical except for the MCU itself.What could be causing this? Why am I seeing these issues on the STM32U5A5 while the STM32F446 works fine? Any help would be appreciated.
HelloI have a few questionsSituation Summary:Development board: STM32F411RESensor: VL53L4CD TOF sensorPrevious successful case: On the STM32F401RE board, setting the BOOT0 pin to 1 → uploading the BIN file via STM32CubeProgrammer → sensor operation verified successfully via GUI.Current issue (STM32F411RE board):Setting BOOT0 the same way as on the F401 → STM32CubeProgrammer connection is lost.Using the adjacent JP1 pin (instead of the originally used one) → BIN file download succeeds.Running the GUI program → board and COM port not detected.Running "FLASH FW" in the GUI → port is detected, but the sensor shows a "not detected" message.Note: Both the F401RE and F411RE boards use the JP1 pin next to the board’s power pins as the BOOT pin.Question: What is the recommended method to make the sensor work properly with the GUI on the STM32F411RE board? I would appreciate any guidance you could provide on this issue.Please find my email address below.thanks email : whtndhks@it
SVD version 1.2, vs RM0468 Rev 3TIM1 CCR6 register is mislabeled as CRR6 in the SVD file
SVD version 1.2, vs RM0468 Rev 3SVD file lists DMAMUX2 as DMAMUX3 in multiple places
Hi, I'm using STM32H743 with STM32Cube FW_H7 V1.12.1 library package.I'm using LwIP without RTOS and our application is working well. In order to improve performance we would like to use the transmission in interrupt for the etherrnet interface instead the polling transmission.I saw that in the ethernet_link_check_state function in ethernetif.c file it is used the HAL_ETH_Start_IT(&heth), but in the low_level_output used to transmit data is used HAL_ETH_Transmit() insted of HAL_ETH_Transmit_IT().Is it possible to use the HAL_ETH_Transmit_IT() in order to improve performance?What we need to modify in order to use the HAL_ETH_Transmit_IT() insted of HAL_ETH_Transmit()?Thanks in advance.Regards
SVD version 1.2, vs RM0468 Rev 3The SVD file is missing the following IRQ numbers OTG_HS_EP1_OUT_IRQn = 74, OTG_HS_EP1_IN_IRQn = 75, OTG_HS_WKUP_IRQn = 76, OTG_HS_IRQn = 77, RNG_IRQn = 80, BDMA_Channel0_IRQn = 129, BDMA_Channel1_IRQn = 130, BDMA_Channel2_IRQn = 131, BDMA_Channel3_IRQn = 132, BDMA_Channel4_IRQn = 133, BDMA_Channel5_IRQn = 134, BDMA_Channel6_IRQn = 135, BDMA_Channel7_IRQn = 136, ECC_IRQn = 145, DTS_IRQn &n
SVD version 1.2, vs RM0468 Rev 3SVD file is missing registersDBGMCU_APB1HFZ1DBGMCU_PIDR4DBGMCU_PIDR0DBGMCU_PIDR1DBGMCU_PIDR2DBGMCU_PIDR3DBGMCU_CIDR0DBGMCU_CIDR1DBGMCU_CIDR2DBGMCU_CIDR3SVD list reserved memory sections as registersDBGMCU_APB3FZ2DBGMCU_APB1LFZ2DBGMCU_APB2FZ2DBGMCU_APB4FZ2
SVD version 1.2, vs RM0468 Rev 3RCC PLLxDIVR has errorsRCC->PLL2DIVR, DIVN1 should be DIVN2RCC->PLL2DIVR, DIVP1 should be DIVP2RCC->PLL2DIVR, DIVQ1 should be DIVQ2RCC->PLL2DIVR, DIVR1 should be DIVR2
SVD version 1.2, vs RM0468 Rev 3SVD file contains references to a second usb module that doesn't exist.OTG2_HS_DEVICEOTG2_HS_HOSTOTG2_HS_PWRCLK
..
Hello,I wanted to create a firmware to communicate first between my laptop and one stm32n6 using the ethernet communication protocol.Then enable communication between two stm32n6 (as client and server)How do i configure the GPIOs and such on the .ioc file to make that happenAnd what is the most basic code that can work in that sense. Thank you for your response.
So I am currently trying out SPI connections for the ILI9341 on the 747I-Discovery board connections are as follows #define SPI_RES_Pin GPIO_PIN_1 #define SPI_RES_GPIO_Port GPIOK #define SPI_DC_Pin GPIO_PIN_6 #define SPI_DC_GPIO_Port GPIOJ #define SPI_CS_Pin GPIO_PIN_5 #define SPI_CS_GPIO_Port GPIOJ hspi5.Instance = SPI5; hspi5.Init.Mode = SPI_MODE_MASTER; hspi5.Init.Direction = SPI_DIRECTION_2LINES_TXONLY; hspi5.Init.DataSize = SPI_DATASIZE_8BIT; hspi5.Init.CLKPolarity = SPI_POLARITY_LOW; hspi5.Init.CLKPhase = SPI_PHASE_1EDGE; hspi5.Init.NSS = SPI_NSS_SOFT; hspi5.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_16; hspi5.Init.FirstBit = SPI_FIRSTBIT_MSB; hspi5.Init.TIMode = SPI_TIMODE_DISABLE; hspi5.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE; hspi5.Init.CRCPolynomial = 0x0; hspi5.Init.NSSPMode = SPI_NSS_PULSE_ENABLE; hspi5.Init.NSSPolarity = SPI_NSS_POLARITY_LOW; hspi5.Init.FifoThreshold = SPI_FIFO_THRESHOLD_01DATA; hspi5.Init.TxCRCInitializationPattern = SPI_CRC_INITIALIZATION_A
I'm building a high-speed two-stage data pipeline on the STM32H735G-DK and encountering issues with corrupted signal output in external memory.Setup:ADC1 + ADC2 in dual interleaved mode sampling a single direct channel at 12-bit resolutionTriggered via TIM2 TRGO at 5.5 MHz (effective 11 MSPS)DMA1_Stream0 in double buffer circular mode, writing to RAM_EXEC (bufferA and bufferB)MDMA in circular linked list mode, triggered by DMA TC flag, alternately transfers bufferA/B to external HyperRAM (mapped at 0x70000000 via OCTOSPI2)Problem:ADC data is correctly written to internal RAM, but the signal in HyperRAM is choppy, discontinuous, and out of phase when reconstructing a clean 10 kHz sine wave during post-processing.Suspicions:MDMA may be pulling stale buffer data due to desync with DMA toggleLinked list nodes may be misalignedMemory attribute or caching problems (all regions currently non-cacheable)What I’ve Tried:Slowing down sampling and verifying CT bit toggling confirms ping-pong behav
I have set up a DMA on an I2S device with an STM32H503CBU6. The idea is, that the DMA runs continuously on a single bufferaddress (one word, containing the left and right channels for the external I2S-DAC). When the DMA transfer of that 1 word is complete it should start over again by itself.At present the goal is not achieved with the following setup:uint16_t ram_loc[2] = {0,0}; int main(void) { /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* Configure the system clock */ SystemClock_Config(); /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_GPDMA1_Init(); MX_ICACHE_Init(); MX_I2C1_Init(); MX_I2S2_Init(); MX_TIM1_Init(); HAL_I2S_Transmit_DMA(&hi2s2, ram_loc,1); // since circular is configured, // am I right that the DMA keeps alive itself? /* USER CODE END 2 */ /* Infinite loop */ while (1) { // for testi
ST Community highlights – April to June 2026
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.