Developer support experience survey - We value your feedback
Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hii’m triyng to use USBX audio class on nucleo-h563zi. i have succed to make PC to recognise the board like a controller audio but windows have problem to start the device (error code 10), problem 0xA status: 0xC0440027i’m stuck at this fase unfortunately also i think there are some missing files in the middleware directory, in the example provided by ST UX_Device_Audio2.0_Playback (not sure is related to the error to start device)there is this code: VOID USBD_AUDIO_PlaybackStreamChange(UX_DEVICE_CLASS_AUDIO_STREAM *audio_play_stream, ULONG alternate_setting){ /* USER CODE BEGIN USBD_AUDIO_PlaybackStreamChange */ /* Do nothing if alternate setting is 0 (stream closed). */ if (alternate_setting == 0) { return; } BufferCtl.state = PLAY_BUFFER_OFFSET_UNKNOWN; /* Start reception (stream opened). */ ux_device_class_audio_reception_start(audio_play_stream); /* USER CODE END USBD_AUDIO_PlaybackStreamChange */ return;}the function ux_device_c
I’m trying to bring up a simple application on a dual-core STM32H755 Nucleo board. Requirements are Ethernet (fixed IP address) and FreeRTOS, using the M7 core (the M4 core can thumb-twiddle, it’s not needed yet).I have tried configuring a bare-minimum project with these parameters in fully-updated STM32CubeMX and opening it in STM32CubeIDE, but surprise! It won’t build. No custom code, just the ST-created framework.First issue is that ethernetif.c’s low_level_init() function is trying to initialize a nonexistent TxConfig variable. (I commented that out.)Second issue is that the linker now throws 97 errors, starting with many errors of the form “Unknown destination type (ARM/Thumb) in ...”, followed by a flock of “dangerous relocation: unsupported relocation” errors. It should NOT be this hard to get a dead-simple program skeleton for a bog-standard use case to build on a current ST dev board using ST tools. None of the example code I can find on the ST Web site addresses the dual-core
Hello everyone,I am using an STM32H755ZI-Q Nucleo board and I am trying to run a small test project using an Ethernet connection between my board and my computer.The goal is to set up a simple HTTP server with two buttons (ON/OFF) that allow me to turn LED3 on and off remotely through a web browser.However, I am experiencing an inconsistent connection issue. The project only works approximately 1 out of 5 times. Whenever I disconnect the board from my computer and run the code again, the Ethernet connection seems to take too long to establish, preventing the HTTP server from starting properly.The strange thing is that the exact same code can work perfectly one moment, and then fail a few minutes later after simply disconnecting and reconnecting the board. No changes are made to the code.Has anyone experienced a similar issue or have any idea what could be causing this behavior?Any help or suggestions would be greatly appreciated!Thank you in advance!
HiThe documentation and the SVD files give a different value for the address offset for the MACARPAR register.The documentation lists 0x0210:https://www.st.com/resource/en/reference_manual/rm0433-stm32h742-stm32h743753-and-stm32h750-value-line-advanced-armbased-32bit-mcus-stmicroelectronics.pdfpage 2990https://www.st.com/resource/en/reference_manual/rm0399-stm32h745755-and-stm32h747757-advanced-armbased-32bit-mcus-stmicroelectronics.pdfpage 3146https://www.st.com/resource/en/reference_manual/rm0477-stm32h7rx7sx-armbased-32bit-mcus-stmicroelectronics.pdfpage 3469In the svd files (https://www.st.com/en/microcontrollers-microprocessors/stm32h723-733.html#cad-resources)❯ grep -A3 'MACARPAR</name>' *.svd | grep addressOffsetSTM32H723.svd- <addressOffset>0xAE0</addressOffset>STM32H725.svd- <addressOffset>0xAE0</addressOffset>STM32H730.svd- <addressOffset>0xAE0</addressOffset>STM32H733.svd- <addressOffset>0xAE
Introduction:Hello ST Team and Community, Following a recent architectural discussion on the Zephyr RTOS project (recommended by @erwango to be shared here), I would like to submit feedback and a feature proposal regarding how the Flexible Memory Controller (FMC) master controller enable gate is handled in the STM32Cube HAL/LL drivers.Background: On newer STM32 architectures (STM32H7, STM32U5, STM32H5, STM32H7RS, STM32N6, STM32MP1/2), the FMC block contains a master peripheral gate bit (FMC_BCR1_FMCEN or FMC_CFGR_FMCEN) which must be asserted for external bus transactions to occur. Currently in the STM32Cube firmware:There is no standalone HAL_FMC_Init() or public LL_FMC_Enable() API.The master gate is only asserted via the private macro __FMC_ENABLE() inside: HAL_SRAM_Init() HAL_SDRAM_Init() HAL_NOR_Init() Inversion of responsibility: While this chip-centric approach works seamlessly in standard STM32CubeMX bare-metal projects with discrete SRAM/SDRAM chips, it creates architectu
I’m trying to set up flashing firmware and initializing the RTC clock on a blank or chip erased STM32H747Xi using the STM32Cube CLT package that contains the STM32_Programmer_CLI.exe command line tool. I can’t seem to write to the critical registers for RTC. Is there a procedure to set the RTC? If so, can you list the steps needed to do so?Thanks,Johnas
The STM32 sends an HTTP GET with the AT command AT#XHTTPCREQ. The modem answers with the HTTP header, a #XHTTPCRSP:<len>,<state> line and the body. The complete response is about 4432 bytes. I start reception with:HAL_UART_AbortReceive(&huart1);while (HAL_UART_GetState(&huart1) != HAL_UART_STATE_READY);HAL_UARTEx_ReceiveToIdle_DMA(&huart1, (uint8_t*)rx_buffer, 4500); // buffer is 4500 bytesProblemHAL_UARTEx_RxEventCallback is called with huart->RxEventType == HAL_UART_RXEVENT_IDLE and Size = 256, and the reception ends. The value is always exactly 256, and the rest of the response is not received!!Setup:MCU: STM32WB5MMGH IDE / CubeMX / HAL package version 6.15.0 Peer device: nRF9160 running Serial LTE Modem (AT commands over UART)Cube configuration:USART1: asynchronous, 115200 baud, 8N1, oversampling 16, FIFO mode disabled, hardware flow control disabled, overrun enabled, DMA on RX error enabled USART1_RX: DMA1 Channel 3, peripheral to memory, Normal mode,
Hello everyone,I used to work with U5 family microcontrollers. Recently I migrate to C5 families, and to MX2 UI.When I wanted to create interruptions for DMA UART events, normally I worked with RxEventCallback (classic). However, seems I´m not capable to find this same __weak function anywhere inside the hal_uart.c file. Am I missing something? I´m working with STM32C562R mcu, in CubeIDE 2.2Thank you everyone.
Hello everyone,I am a student member of Team VITAKSH at VIT Bhopal University, India. We are developing a scientific payload called OSAD (Open Spectral Atmosphere Dataset) for a high-altitude balloon mission.Our objective is to measure solar spectral variations at different altitudes and correlate them with atmospheric and environmental parameters.We have procured the STM32 NUCLEO-F722ZE and are beginning firmware development. Before integrating all our sensors, we want to establish a reliable firmware architecture rather than simply implementing each sensor independently.Our payload involves multiple sensors communicating over I²C, SPI and UART. We expect to acquire measurements periodically, timestamp them, process the incoming data and store them reliably for post-flight analysis.We are currently trying to understand a few architectural decisions:1. Firmware structure: What would be a good way to organise a multi-sensor acquisition system using STM32CubeIDE and HAL? Would a modular,
I’m having an issue where I get no output when trying to do PWM with DMA using Timer 3, Channel 1 on an STM32F401RET6.I am using PB4 for my Timer 3, Channel 1 pin.Regular PWM output works perfectly on this channel and pin.But if I try and do DMA transfers, there is no PWM output (voltage stays at 0).I’ve confirmed that I can do PWM DMA on another timer, Timer 2 Channel 1; this works perfectly. But when I switch to Timer 3, Channel 1, there is no output.My timer setup:/* TIM2 init function */void MX_TIM2_Init(void){ /* USER CODE BEGIN TIM2_Init 0 */ /* USER CODE END TIM2_Init 0 */ TIM_ClockConfigTypeDef sClockSourceConfig = {0}; TIM_MasterConfigTypeDef sMasterConfig = {0}; TIM_OC_InitTypeDef sConfigOC = {0}; /* USER CODE BEGIN TIM2_Init 1 */ /* USER CODE END TIM2_Init 1 */ htim2.Instance = TIM2; htim2.Init.Prescaler = 0; htim2.Init.CounterMode = TIM_COUNTERMODE_UP; htim2.Init.Period = 90-1; htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim2.Init.AutoReloadPreload = TI
I want to download the code from the demo of STM32N6570-DK that comes flashed onto the board out of the box to be able to re-flash it. On another forum it was already answered that this only comes in binary. But I have not been able to find this binary file.
Hello everyone,I am having an issue with EEPROM Emulation initialization in my STM32 project.I am currently trying to implement the EEPROM Emulation utility using STM32CubeMX2 v1.1.0.The program starts with mx_system_init(), which initializes the peripherals and other required modules such as FLASH, RCC, etc. After that, I call mx_eeprom_emulation_init(). During this initialization, the MCU enters a HardFault.Detailed informationThe call hierarchy is:main() → mx_eeprom_emulation_init() → EE_Init() → EE_FLITF_Init() → Page_GetState() → EE_ITF_FLASH_ReadData()Inside EE_ITF_FLASH_ReadData(), the code tries to access address:0x09000018and immediately enters a HardFault.I also analyzed the fault using the Fault Analyzer in STM32CubeProgrammer. The results are:SCB_BFAR: 0x09000018 BusFault: Precise data access error (PRECISERR) The BusFault is escalated to a HardFault (FORCED)I also checked the EDATA_EN option bit in STM32CubeProgrammer, and it appears to be enabled correctly.At this point,
This post was edited by an ST moderator to comply with the ST Community’s code-sharing rules. STM32H743BIT6 Custom Ethernet Bootloader – Firmware Update and CRC Verification Successful, but Application Does Not Start (TouchGFX Display Remains Blank)Hello STM32 Community,I am developing a custom Ethernet bootloader for the STM32H743BIT6 microcontroller. The bootloader successfully receives firmware over Ethernet, programs the internal Flash and external QSPI Flash, and verifies the received firmware using CRC32.However, after completing the firmware update and attempting to launch the application, the TouchGFX display remains blank. The application does not appear to start correctly.I would appreciate your guidance on the application launch procedure, memory configuration, and recommended firmware update architecture for a custom STM32H7 bootloader.1. Hardware Configuration Microcontroller: STM32H743BIT6 Ethernet PHY: LAN8742A-CZ-TR Ethernet Interface: RMII External QSPI Flash: W
Hi,On STM32U575CGU3, calling MX_ADC1_Init() once increases the device current by about +200 µA. After that, even if I run HAL_ADC_DeInit(), reset ADC1, and disable VddA, the extra +200 µA current does not disappear.Here is the minimal code:cint main(void){ HAL_Init(); SystemClock_Config(); MX_GPIO_Init(); MX_GPDMA1_Init(); MX_ADC1_Init(); // <-- Base +200uA increase MX_OCTOSPI1_Init(); MX_SPI1_Init(); MX_USB_OTG_FS_PCD_Init(); MX_USART1_UART_Init(); MX_ICACHE_Init(); // ADC Disable HAL_ADC_DeInit(&hadc1); // <-- This does NOT reduce the +200uA __HAL_RCC_ADC1_FORCE_RESET(); __HAL_RCC_ADC1_RELEASE_RESET(); HAL_PWREx_DisableVddA(); while (1) { __NOP(); }}QuestionDoes ADC_Init enable an internal analog bias that cannot be fully disabled by ADC_DeInit, ADC reset, or VddA OFF? Is there any complete shutdown procedure to fully power down ADC/VREFBUF after initialization?Thanks.
Hello,I am debugging SPI3 communication between two STM32H755 boards: UC1 = SPI master UC2 = SPI slave SPI3, full-duplex DMA used for TX/RX FreeRTOS STM32H755 The problem is that the first SPI transaction can be completed correctly, but the following transaction does not behave as expected.Before starting the SPI data exchange, I also perform a handshake/synchronization sequence between the two boards to ensure that both sides are ready. The handshake itself is implemented before the SPI test, but adding this synchronization does not resolve the issue.The intended sequence is:UC1 (Master) UC2 (Slave)SYNC ----------------> receive SYNC <---------------- OKPING ----------------> receive PING <---------------- PONGPING ----------------> receive PING <---------------- PONGIn the actual test, the first exchange can be received correctly, but the slave does not continue responding correctly on
Hello,I am facing some issues with NetXDuo, where i see traffic on the RGMII RX lines, but RX DMA does not process any frames / no interrupts fire. I have the following setup:I am using a custom board based on the STM32N657 with an ADIN1300 Gigabit Ethernet PHY connected over RGMII.Software stack:STM32Cube FW_N6 V1.3.0 ThreadX NetXDuo Static IPv4 configuration Secure only application Caches disabledThe PHY is configured over MDIO and link comes up successfully. The resolved PHY speed matches with what is seen on the host side and with the MAC speed configuration.What is working:The PHY side appears to be working correctly. For example, when forcing 10Mbps, i can clearly probe the RGMII lines and see:RX_CLK present RX_CTL activiy for each incoming ARP/ping RXD0..3 activity during the frameThis confirms that Ethernet frames are being received by the PHY and forwarded onto the RGMII interface toward the MCU.The following have also been checked/tried:RGMII pin mux tried disabling broadcast
Hi there, I tried to build NetXDuo stack with IPV6 and SLAAC version on H563ZI Nucleo boardHowever compilation of system libraries failed due to not linked symbols, it happened in all 3 ways of generations form CubeMX (copy all files, copy only required files, reference libraries).I.e. linker complained about lack of symbol _nx_nd_cache_add_entry and I noted filed is nx_nd_cache_add_entry.c is not compiled nor copied to project sources.
Board: STM32N6570-DK Sensor: Sony IMX219 (Raspberry Pi Camera Module 2 / NoIR), custom driver, connected via a 15-pin-to-22-pin adapter cable into the board's camera connector (normally used for the MB1854/IMX335 module)SummaryI've written a from-scratch IMX219 driver (I2C register map transcribed from the Linux kernel's imx219.c) as an additive sensor option alongside the working IMX335 path. I2C control, power sequencing, and CSI-2 D-PHY link all come up healthy. DCMIPP's own status registers report that PIPE1 is continuously and successfully capturing new frames. But the actual pixel data written to memory is frozen — bit-for-bit identical — and does not respond to real scene changes. I'm looking for insight into what could produce this specific disconnect.Configuration2 CSI-2 lanes, D-PHY bitrate bucket DCMIPP_CSI_PHY_BT_900 (900 Mbps bucket, closest available to the computed 912 Mbps for this PLL config) Sensor PLL: VTPXCK_DIV=5, PREPLLCK_VT_DIV=3, PLL_VT_MPY=57, OPSYCK_DIV=1, PRE
Split from this post. Hi @massimogPVS , Please let me check and confirm whether your assumption about missing updates in RM0454 compared to RM0444 is correct. I have submitted an internal ticket on this topic: 227689 (this is an internal tracking number and is not accessible or usable by customers). -Amel Hello,I am also using STM32G0B0 and running into hardfaults when attempting to modify flash in the second bank. Can ST please provide an update?
I am having issues with transmitting more than 8 bytes of data. If I transmit 12345678 everything works and I can see the data on my serial monitor. However if I transmit 123456789, then I do not get anything on the serial monitor. I have enabled the ZLP define and commented it out but still no lock. What am I not setting correctly here?
Hello,I found an issue in the STM32H5 HAL UART driver: during interrupt-based reception with FIFO enabled, a pending overrun error can be cleared from huart->ErrorCode inside the FIFO RxISR. Consequently, HAL_UART_IRQHandler() does not abort the reception as intended.I used AI to create a standalone CubeMX-generated project and reproduced the problem, without modifying the HAL driver. The test project is in the attachment.EnvironmentBoard: NUCLEO-H533RE, STM32H533RET6 Firmware package: STM32Cube FW_H5 V1.7.0 HAL_GetHalVersion(): 0x01070000 HCLK and peripheral clocks: 32 MHz Receiver: USART1, PB15, 9600 baud, 8 data bits with even parity, 1 stop bit HAL configuration: UART_WORDLENGTH_9B with UART_PARITY_EVEN FIFO enabled, RX FIFO threshold = ½ NbRxDataToProcess = 4 Interrupt-based reception, no DMA Receiver timeout disabled Sender: USART3, PB10, same frame format Connection: PB10 → PB15Steps to reproduce Disable only the USART1 NVIC interrupt, leaving UART reception and SysTick
in “usbd_msc_scsi.c” at function “SCSI_ModeSense6”/* Check If media is write-protected */ if (((USBD_StorageTypeDef *)pdev->pUserData[pdev->classId])->IsWriteProtected(lun) != 0) { MSC_Mode_Sense6_data[2] |= (0x1U << 7); /* Set the WP (write protection) bit */ } else { MSC_Mode_Sense10_data[2] &= ~(0x1U << 7); /* Clear the WP (write protection) bit */ }is writing to the wrong place !!! Change it to:MSC_Mode_Sense6_data[2] &= ~(0x1U << 7); /* Clear the WP (write protection) bit */Note:The wrong write mainly cause the write protection to stay on if its once set and never be able to unset without reseting the scsi device.Took me days to track down this bug !! best regards,Labmaster
I downloaded the latest version of X-CUBE-CLASSB-H7_v4.0.1 and found that it is missing library .aThe older version 4.0.0 has this.
Hello,RM0431, section 8.3.18, contains the following warning:"To switch off a peripheral connected to a DMA stream request, it is mandatory to, first, switch off the DMA stream to which the peripheral is connected, then to wait for EN bit = 0. Only then can the peripheral be safely disabled." However, HAL_ADC_Stop_DMA() in the STM32F7xx HAL driver v1.3.3 (stm32f7xx_hal_adc.c) uses the opposite order:1. Line 1526: __HAL_ADC_DISABLE(hadc);2. Line 1532: hadc->Instance->CR2 &= ~ADC_CR2_DMA;3. Line 1538: tmp_hal_status = HAL_DMA_Abort(hadc->DMA_Handle);Could you clarify which sequence should be used?
Hello ST Community,We are working with the STM32N657X0H3Q controller and interfacing an S80KS5123GABHB020 HyperRAM using the XSPI1 (Octal SPI) interface. The external HyperRAM is intended to be used as the LTDC frame buffer.We have configured the HyperRAM in memory-mapped mode, and according to our configuration, it should be accessible at the address 0x90000000.However, we are unable to access this memory region. Any read or write operation to 0x90000000 fails. For initial testing, we have configured the XSPI clock to 2 MHz.Our setup is based on the STM32N657-DK board example, and we have followed the same memory-mapped configuration.Could you please let us know if any additional configuration is required to access the HyperRAM at 0x90000000? Specifically, we would like to know:Are there any additional XSPI configurations required for memory-mapped mode? Does the MPU or cache need to be configured for this external memory region? Are there any system, clock, or pin configurations that
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.