Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
I am experiencing an issue with ADC3 multi-channel scan mode on a custom STM32H745 board (LDO power supply). The same code works perfectly on the Nucleo-H745ZI reference board (SMPS power supply), but fails on my custom design. Problem Summary: ADC3 configured for 6-channel continuous scan with DMA circular mode Only channels 1-3 receive invalid data (changing values) Channels 4-6 are stuck at 0 (no change) When using single-channel with interrupt (polling mode), the ADC works fine All GPIO pins are correctly routed; multimeter confirms good analog signals on all 6 input pins Expected Behavior: All 6 ADC channels should update continuously via DMA circular buffer. Actual Behavior: adcValues[0] = 2604660662 // PF6 (IN8) - CHANGING ✓ adcValues[1] = 1343977801 // PF7 (IN3) - CHANGING ✓ adcValues[2] = 4294918112 // PF8 (IN7) - CHANGING ✓ adcValues[3] = 0 // PF9 (IN2) - STUCK ✗ adcValues[4] = 0 // PF10 (IN6) - STUCK ✗ adcValues[5] = 0 // PC0 (IN10) - STUCK ✗ HARDWARE CONFIGURATION
Hi everyone,I'm working on a project based on the following STM32H7 LwIP example:https://github.com/stm32-hotspot/STM32H7-LwIP-Examples/tree/main/STM32H747_Disco_M7_ETHIn addition to the Ethernet functionality, I’ve enabled the SAI peripheral with DMA to transmit audio via I2S. I’ve noticed a problem:When I run the SAI with DMA on the Cortex-M7 core using FreeRTOS, the audio stream contains gaps or dropouts.However, when I move the exact same SAI/DMA initialization and logic to the Cortex-M4 core, the audio output is perfect with no gaps.Has anyone experienced similar issues when using DMA for audio on the M7 core with FreeRTOS?Any suggestions would be greatly appreciated.Thanks in advance!TG808
There is a bug in the FW package V1.6.3 where the UART and DMA doesn't work correctly.I've been using FW package V1.6.2 for awhile with UART in DMA circular mode and it has never had an issue. I've recently made a copy of the project to make an A and B comparison because we needed to make some subtle changes. I migrated to the latest FW Package V1.6.3 for the B project.With V1.6.3, when receiving a string command, i only receive a few character from the beginning of the string and the last few characters from the end of the string. A bunch of characters are missed from the middle of the string. I decided to go back to FW package V1.6.2 in CubeMX because that is the only thing that really changed and generated the code. The project works correctly. What i see in V1.6.3 are a lot of missing huart->TxXferCount = 0U; and huart->RxXferCount = 0U; throughout the stm32g0xx_hal_uart.c file compared to V1.6.2In WinMerge you can see in the lef
Hello,I am using the STM32H7B3I-EVAL board with STM32H7B3LIH6Q controller.The board revision I am using is MB1370-lcd-b02 a254300030.I downloaded the official demo package from the ST website:STM32H7B3I-EVAL → Tools & Software → Demo Code Package.After extracting the ZIP file, I tried flashing the provided .hex demo file into the controller using STM32CubeProgrammer.However, programming fails with the following errors:Error: failed to download Sector[0]Error: failed to download the FileThe board is detected correctly through ST-LINK, and connection is successful. I already tried:Reducing SWD frequencyFull chip eraseHardware reset / Under reset modeBut the issue still occurs.Could anyone please suggest:Whether the provided demo .hex file is directly compatible with STM32H7B3LIH6Q?If any special option bytes or external memory configuration is required?Whether the demo depends on external QSPI/OSPI memory or specific boot settings?Thank you.
I was wondering what is that. I created a custom bootloader firmware and application firmware. But once I successfully uploaded. When I send application firmware resquest I do not receive application firmware responses. Why is that? what is that? do you recognize that? The AA 01 00 00 BB is the application firmware request frame. 0xAA is the begining 0x01 is the length 0x00 is the frame request ID 0x00 is the checksum 0xBB is the end of the frame Thanks for all.
Hi everyone,I am working on a project using the STM32H753ZI Nucleo-144 board. My goal is to save data to an external USB thumb drive via the CN13 (USB OTG FS) port.My Environment:RTOS Stack: ThreadX, NetXDuo (Ethernet is working), USBX (Host/Storage Class), and FileX.Tools: STM32CubeMX v6.12/6.17 and IAR Embedded Workbench.Clocking: Using HSI48 for USB, stabilized by the CRS (Source: LSE).Hardware Configuration:VBUS: Manually controlled via PD10 (STMPS2141). I have confirmed with a multimeter that 5V is present on the port when the software runs.VBUS Sensing: Disabled in CubeMX (since I am driving power manually).USB_OTG_FS Settings:Mode: Host_Only.Speed: Full Speed (12 MBit/s).DMA: Disabled.Interrupts: USB OTG FS global interrupt enabled (Priority 15).The Issue: Despite the drive having power, the USBX stack does not seem to trigger the device insertion callback. I suspect the issue lies in the registration of the Host Controller Driver (HCD) or the link between the HAL interrup
Hi Everyone,We are developing a Sub-GHz/LoRa device based on STM32WLE5CCU6 and have encountered an issue relatedto the Sub-GHz Radio BUSY state. We would like to ask for possible root causes and the recommendedrecovery procedure.The observed behavior is as follows:1. After MCU peripheral initialization, we call MX_SubGHz_Phy_Init() and then Radio.Init() /Radio.Sleep().2. We then try to execute HAL_SUBGHZ_ExecGetCmd(&hsubghz, RADIO_GET_ERROR, ...).3. The command keeps returning HAL_ERROR, and HAL_SUBGHZ_GetError(&hsubghz) returns 0x00000002, whichcorresponds to HAL_SUBGHZ_ERROR_RF_BUSY.4. We poll this command once per second for 10 seconds, and all attempts fail with the same error.5. We also checked the PWR flags before. PWR_FLAG_RFBUSYS remains active, which indicates that thecurrent RF BUSY signal stays high.6. PWR_FLAG_WRFBUSY can be cleared, but RFBUSYS remains high. Therefore, this does not look like apending wakeup/event flag issue, but rather the actual RF BUSY hardware
Hello Everyone,I am working on a custom USB bootloader project on STM32H743 using:USB Host MSCFATFSExternal QSPI FlashInternal Flash updateIAR WorkbenchHAL driversMy bootloader detects USB pendrive successfully and I can see:Appli_state == APPLICATION_READYf_mount() returns FR_OKBut the system gets stuck / deadlocked when calling:DIR dir; if(f_opendir(&dir, "0:/") != FR_OK) { return UPDATE_NONE; }The MCU hangs inside f_opendir() and never returns.Current flow:MX_USB_HOST_Init(); while(1) { MX_USB_HOST_Process(); if(Appli_state == APPLICATION_READY) { HAL_Delay(500); update_flags = ver_check(); break; } }Inside ver_check():if(f_mount(&USB_FatFs, USBHPath, 0) != FR_OK) { return UPDATE_NONE; } if(f_opendir(&dir, USBHPath) != FR_OK) { return UPDATE_NONE; }Additional Information:USB Host MSC works until f_opendir()No FreeRTOS usedUSB drive detected properlyf_mount() succeedsDeadlock occurs specifically at f_opendir()Tried both "0:/" and USBHPathTried adding delay
I have a project where a STM32U575VGT must convert a SSI multiturn encoder value into a parallel single turn value for GPIO output. The SSI values are 3 bytes long, and it would be best if the CPU is only interrupted when the last 2 values differ. I have set up SPI2 to have GPDMA channels for TX and RX (although only RX is needed). DMA transfers work, but when I try to enable autonomous mode with LPTIM1 Channel 1 as a trigger, there are no interrupts for SPI2 or the DMA channels. How do I trigger the SPI read every ~1ms? Is this something only achievable with the LL libraries rather than HAL? Is it possible to interrupt the CPU only if the 3 bytes read from the SPI differ from the previous value?
Hello,I would like to add Aliro compatibility to my access control device.My device uses the STM32WB55 MCU with an ST25R3911B NFC front-end.It seems that the X-Cube-Aliro package is designed to work with the new STM32WBA MCUs along with different NFC front-ends (such as ST25R200).As I understands it, I can implement the Aliro protocol on STM32WB55.1. Are there any such examples of adapting the X-Cube-Aliro package to work with such an MCU?2. Does using the X-Cube-Aliro package also require running a comm stack that the STM32WB55 doesn't support?3. Are there examples of implementing the Aliro protocol without using the X-Cube-Aliro package on STM32 devices?Thanks,Tal
Hi everyone,I am working on STM32H723 (H7 series) using HAL, and I am facing an issue with ADC1 + ADC2 dual regular simultaneous mode.Configuration DetailsMCU: STM32H723HAL based projectADC1 = MasterADC2 = SlaveMode: ADC_DUALMODE_REGSIMULTDualModeData: ADC_DUALMODEDATAFORMAT_32_10_BITSResolution: 12-bitScan mode: DisabledContinuous mode: DisabledTrigger source: TIM2_TRGO (rising edge)DMA: Circular modeADC3 runs independently (also TIM2 triggered) and works perfectlyDual mode started using:HAL_ADCEx_MultiModeStart_DMA(&hadc1, (uint32_t*)g_adc12_packed_buffer, TP_DMA_BUFFER_SIZE); Buffer unpacking: uint32_t packed = g_adc12_packed_buffer[i]; uint16_t adc1_raw = packed & 0xFFFF; uint16_t adc2_raw = packed >> 16; Observed BehaviourWhen I apply voltage to ADC1 input:Both ADC1 and ADC2 values changeBoth show identical values (mirrored)When I apply voltage to ADC2 input:No change in readingsADC2 does not respondWhen inputs are floating (level shifted mid-sca
Hello I've been trying to recreate the DCMIPP_SnapshotDecimation example with STM32CubeIDE, I have been running into several issues. I have solved most of them, I am encountering a memory error while debugging my code. I was able to flash and debug the original example successfully on the STM32N6570-DK. However, when I try to read a value from the AXISRAM address (0x34200000), it fails: (address does not exist and unable to reconnect to target device). AXISRAM3 which it should be the address 0x3420000 is activated and initialized in the main. Initialization of the signal processor and starting the DCMIPP pipeline was passed without any problem:if( ISP_Init(&hcamera_isp, &hdcmipp, 0, &appliHelpers, ISP_IQParamCacheInit[0] ) != ISP_OK ) { Error_Handler(); } if( HAL_DCMIPP_CSI_PIPE_Start(&hdcmipp, DCMIPP_PIPE1, DCMIPP_VIRTUAL_CHANNEL0, BUFFER_ADDRESS, DCMIPP_MODE_CONTINUOUS ) != HAL_OK ) { Error_Handler(); }But, trying to access the buffer addr
Hi all,I'm looking for a free library or source C code to develop and application for DALI master manager with STM32F7 board.I didn't find anything ....Any suggestion?Many thanksFabio
Hi Technical Support Team,I am working with the Nucleo-H563ZI board and would like to enable the I3C interface within the Zephyr environment.Could you provide a minimal sample project or a reference configuration (Devicetree/Kconfig) to validate the I3C host driver and I3C shell?Thank you for your assistance.----------------------------------------------prj.confCONFIG_I3C=yCONFIG_I3C_SHELL=yCONFIG_I3C_STM32=yCONFIG_USERSPACE=yCONFIG_I3C_RTIO=y----------------------------------------------
Hello,I am working on a project using an STM32H7S3 with an XSPI NOR Flash (ISSI IS25WX064) running in XIP (Execute-in-Place) memory-mapped mode. The firmware is split into two stages: a Bootloader and an Application context executing directly from the external flash.I need to put the flash into Deep Power-Down mode (command B9h) before the STM32 enters Standby, in order to minimize total system current consumption. On wake-up, the Bootloader handles the Release from Deep Power-Down (ABh) before re-entering memory-mapped mode and jumping to the Application.I am struggling to find a clean way to send the Deep power down command from the Application context. The main obstacles are:1. The XSPI handle (hxspi1) lives in the Bootloader context, so the Application does not have direct access to it.2. The Application code runs from XIP flash. This means that aborting the memory-mapped mode (required before sending any command) from code that itself is fetched through that same memory-mapped int
Hi ST Support Team,I am working with the STM32L476RCT6 on a custom-designed board for an NFC reader project.I am facing a critical issue during basic bring-up:Issue DescriptionThe MCU appears to hang when using HAL_Delay() and HAL_UART functionsThe code runs only during debug (step-over execution), but not in normal run modeIn normal execution:HAL_Delay() blocks indefinitelyUART transmit functions also get stuckIn debug mode:Code executes correctly step-by-stepGPIO (LED toggle) works as expectedWhat I Have VerifiedFirmware is successfully flashedMinimal project (only GPIO toggle, no complex logic)Using default CubeMX-generated initializationSystem clock configured to HSI (no external crystal)Issue persists even in a very simple projectObservationsBehavior suggests a possible issue with:SysTick / time base not runningInterrupts not functioning correctlyOr clock configuration problemRequestCould you please help identify:Why HAL_Delay() is blocking in normal execution but works during deb
Hi everyone,I’m relatively new to embedded systems, so apologies if this has already been discussed elsewhere. I’ve tried searching, but haven’t been able to find a clear solution.I’m currently developing a system based on the STM32F746G Discovery board using TouchGFX for the touchscreen UI. In addition, I’m interfacing with a distance sensor over I2C. My goal is to log data (timestamp + sensor value, already formatted) to an SD card.The issue I’m facing is the following:When I enable only SDMMC and FatFS in CubeMX, I can successfully open a file and write data to it.However, when I integrate this functionality into my full project (which includes TouchGFX, FreeRTOS, and I2C), the SD card logging no longer works.I’d really appreciate any guidance or suggestions on what might be causing this or how to approach debugging it.Thanks in advance!
The board I am using is NUCLEO-H7S3 and I have encountered the following issuesI want to perform continuous and large data sampling using ADC+DMA, but when the collected value reaches 10000, the subsequent values become 0. When I modify the number of collected values to 50000, it stops at 17231 and the subsequent values remain 0. At this point, I am connecting the ADC pin to the 3.3V on the board. I'm not sure where the settings went wrong, please help me.Thank you.
"I am currently working on implementing Ethernet communication using a NUCLEO-H753 board. As a first step, I attempted to perform a ping test. I followed the official tutorial videos provided by STMicroelectronics step-by-step, but unfortunately, I am not getting the expected results (the ping is failing). I would appreciate any guidance or advice on what might be causing this issue or which specific configurations I should double-check." "Let me share my CubeMX configuration with you first so we can review the setup." 1. System Core - CORTEX_M7 2. Connectivity - ETH 3. LwIP 4. Clock I will also share the modified source code with you. STM32H753ZITX_FLASH.ld /* Modification start */ .lwip_sec (NOLOAD) : { . = ABSOLUTE(0x30040000); *(.RxDecripSection) . = ABSOLUTE(0x30040100); *(.TxDecripSection) . = ABSOLUTE(0x30040200); *(.Rx_PoolSection) } >RAM_D2 /* Modification end */ ethernetif.c /* USER CODE BEGIN 2 */ #if defined ( __ICC
Hi all, I’m debugging a reproducible SPI6 slave issue on STM32H753ZI and would like feedback from anyone familiar with H7 SPI v2 behaviour. Setup MCU: STM32H753ZI Peripheral: SPI6 slave Master: Raspberry Pi 5 (spidev) Pins: PA5 SCK PG8 NSS PG12 MISO PG14 MOSI SPI mode: CPOL=0, CPHA=1 (HAL SPI_PHASE_2EDGE) Pinmux verified as AF8 on live registers. Important context about observed bytes Initially master read 0xFF consistently; after removing pull-up resistors on the MISO path, reads became 0x00.This was line-bias behaviour, not a functional fix: pull-up + Hi-Z -> 0xFF no pull-up/weak low bias + Hi-Z -> 0x00 So the core issue remained: slave not reliably driving/qualifying frames. What I tested I instrumented both HAL and LL test images (counters + CR1/CFG1/CFG2/SR + pin-level edge counters). A/B tests that did not fix it NSSPolarity LOW vs HIGH AFCNTR 0 vs 1 soft/hard NSS var
Hi, I am using the Nucleo-L552ZE-Q board. I use STM32CubeMX version 6.17.0 which appears to be the laters version. When generating code for SD card FAT FS using CubeMX i get "sd_disckio.c" file containing only stubs of the functions, without content (the stub functions just return error value/no_init value). In CubeMX i have done some fault finding steps already with no luck. I have configured SDMMC1 before enabling FATFS. I am staying with default values, exvcept clock divider (Currently using 8). I am using Mode "SD 4 wide bus" Under Middleware->FATFS i enable it for SD card. SOMMC instance is SDMMC1, BSP code none. The rest is default values. FAT FS version in cubeMX is R0 12c I have tried investigating the options in CubeMC, but i cant spot anything wrong so far. I also tried starting from scratch with a new project in CubeMX, with the same result: sd_diskio.c only contain stubs. Does anyone have a fix for this issue? Or can anyone point out where i find the&nbs
Added "DHCP" in the title to give the context. Using an STM32H7S78-DK I try to set up the network to join an IPv4 network through DHCP. I did set up the board using CubeMX, standard configuration, MPU activated. FreeRTOS + LwIP Removed all other interfaces I don't need. Made sure the Ethernet clock shows 50MHz The LED's on the RJ45 start to blink (Orange LED blinks with packets exchanged) but I get no IP address. digging in the possibilities I added a simple routine to monitor the DHCP advancements. struct dhcp *dhcp_data = netif_dhcp_data(&gnetif); if (dhcp_data != NULL) { printf("[DHCP] State: %d, Retries: %d\r\n", dhcp_data->state, dhcp_data->tries); } this shows I get stuck in state 6: waiting for an ACK -> what could be behind this? can someone share an .ioc file that sets everything correctly in MX?
Hi @Community, I have previously posted the same issue , that i have been working on the STM32H723ZGT6 - Nucelo board on Ethernet LWIP to acheive TCP/IP without free RTOS, Im still facing the same issue that i cant ping the IP.I have tried the GITHUB of STM32CUBEH7 -> APPLICATION ->LWIP -> TCPSEREVR ECHO . Its working perfectly , but cant remake or reuse it due to some library issue , im in a middle of a development of a project. so i tried to take the tcp confing in the example code and reuse it , but that also failed So i tried to remake the all the linker script and searched various Youtube videos , but everything remained in vain , ill share some screenshots of my configuration , can anybody help me with this , I previously seens several quries that facing the same issue , those who got resolved the issue kindly share your solution and approach with me. Thank You ,Gokul
I am using CUBEMX Version 6.10 STMCUBE IDE 1.16.0FW version F7V1.17.0Enabled LWIP ETH With FREERTOS CMSIS2same settings did with cmsis version 1 it's working but with cmsis version2 NOT WorkingI configured on internal Timer TIM1 as soon as I connect Eth Cable program counter not reaching threads & Timer callback / TIM6(systick update).I checked in fault handlers it is not reaching here ETH State in eth handler is (READY STATE --> START STATE)Error code in eth handler is zero.Here I have attached my .ioc fileI have updated flash ld file as per repository code LWIP Debug Messages : netif: netmask of interface set to 255.255.255.0 netif: GW address of interface set to 192.168.10.10 netif_set_ipaddr: netif address being changed netif: added interface
Hello,I am writing this because I am unable to enable the SAI on this development board. The strange thing is that I actually managed to enable it before and it was working correctly. However, while implementing another feature, I switched branches and worked on a different GitHub branch for some time. When I came back, I noticed that the SAI was no longer starting.At first, I thought I had made a mistake in a commit, so I created a completely new project where the only goal was to start the SAI. Even though I believe all the steps are configured correctly, the MCK clock never starts, and the MCKEN register bit never becomes enabled. I am attaching screenshots of the SAI registers below. As shown in the screenshot, the SAI is enabled, but I cannot see any clock output on the oscilloscope. As I mentioned before, what confuses me the most is that two weeks ago, using the exact same development board, I was able to make it work correctly.I tried adding the following line inside the M
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.