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
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
I am working on SDRAM execution using FMC on STM32H563ZI (NUCLEO-H563ZI board) with external SDRAM connected through FMC interface. Our target is: Execute application sections from SDRAM Place heap and stack in SDRAM Enable automatic scatter-loading/copy from internal flash to SDRAM during startup We are facing an issue where: SDRAM initialization appears successful Manual SDRAM read/write access works in application runtime But automatic copy/scatter-loading from Flash to SDRAM during startup is failing Application execution from SDRAM is unstable and leads to HardFault/reset handler Below are the detailed steps and observations. CURRENT STARTUP FLOW Reset_Handler→ SystemInit()→ PLL/System clock configuration→ FMC GPIO configuration→ FMC SDRAM initialization→ SDRAM command sequence→ __main()→ scatter loading→ main() We intentionally moved FMC/SDRAM initialization into SystemInit() so that SDRAM becomes available before scatter loading. CLOCK CONFIGURATION We configured P
Hello everyone! I have a problem with reterning ticks in line "measure_speed_rpm = speed_reference / LL_TIM_GetCounter(TIM2);". speed_reference is const variable and equals 15000000. When I looked at Serial Monitor, it's indicated: (picture)That's mean that LL_TIM_GetCounter(TIM2) returns '1' sometimes. Nothing in my code not calling void EXTI1_IRQHandler(void), except EXTI Interrupt. And the main question is - Why it reterns only '1'??? Not 2,3 e.t.c.Thank you for help! void EXTI1_IRQHandler(void) { if (LL_EXTI_IsActiveFlag_0_31(LL_EXTI_LINE_1)) { LL_EXTI_ClearFlag_0_31(LL_EXTI_LINE_1); static uint8_t edge_switch = 0; if (!edge_switch) { edge_switch = 1; LL_TIM_SetCounter(TIM2, 0); } else { edge_switch = 0; measure_speed_rpm = speed_reference / LL_TIM_GetCounter(TIM2); NVIC_SetPendingIRQ(SPI1_IRQn); // SPI1_IRQHandler is free vector in list, that's why I use it for PID update trigger } uint8_t hall_index = HALL_Read(); SixStep_SetPhas
Hi Community, I'm a new Developer/ for ST Microcontrollers, Now Im currently using STM32H723ZGT6 (NUCLEO - 144). Im currently working on ethernet (LWIP), the ping is not working for this code that i have generated . I have seen some youtube channels but I cant rectify and make the ping, I have tried all the possible things like , flash linker script , enabling ICache , Dcache , using MPU(Memory Protection Unit), change them to static ip for both board and my PC and So on . I have tried but I dont know whether my code or my implementation is correct or not . Can anybody help me with this ?.. I have attached the file thats my code and how project. pls have a look into that. Thank You.
Hello STM32 Community,I am developing a system on the NUCLEO-N657X0-Q using ThreadX and NetX Duo and I am having a hard time to make the ethernet work. I want to implement a web server in my system but I cannot make the Ethernet communicate.Problem:I am unable to receive or transmit any Ethernet frames. The PHY link establishes successfully (from what I see on my linux terminal, autonegotiation completes, Link is UP, and the LEDs on the plug turns on normally), but pinging the Nucleo's static IP yields no response. Wireshark shows no ARP or ICMP packets originating from the Nucleo.Trying to debug, I see that the the MAC/DMA interrupt `ETH1_IRQHandler` is never triggered by incoming network traffic. It fires exactly twice during the initial board boot sequence(where, for what I understand, some DMA errors flag are raised), but remains completely silent afterward. From the logs that I send to the serial port it appears that from the NetXDuo point of view is everything fine.The D-cache is
Split from this thread My firmware is based on this ccid usbd driver https://github.com/STMicroelectronics/stm32-mw-usb-device/blob/master/Class/CCID/Src/usbd_ccid.c . The issue that I face, the PC finishes receiving data immediately after receiving 256 bytes (10 bytes of header + 246 bytes of data). when I want to send to pc 253 bytes of data + 10 bytes of header (263 bytes in total) by splitting (64 bytes by 64 bytes) the PC finishes receiving data immediately after receiving the fourth chunk which is 256 bytes (10 bytes of header and 243 bytes of data), It doesn't wait for the fifth chunk, which carries the remaining 7 bytes of my data which arrives in an unknown message despite the fact that I define the size of the data to be sent as 253 bytes. Images 1 and 2 show these details captured by wireshark software.12 this is my code used to send data by chunks : uint8_t SC_Itf_XferBlock(uint8_t *ptrBlock, uint32_t blockLen, uint16_t expectedLen, USBD_CCID_BulkIn_DataTyp
Environment:- MCU: STM32H743IITx- USB PHY: USB3300 (ULPI, external HS PHY)- HAL version: STM32CubeH7 v1.11.6- Mode: USB Host, HS, ISOC transfer (UVC camera)- HFIR: 7500 (manually set for 60MHz PHY clock)Problem:HPRT.PENA is cleared by hardware at exactly HFNUM=16383 (14-bit framecounter maximum, about to roll over to 0). HPRT value at the moment ofHAL_HCD_PortDisabled_Callback: 0x00001409.Key observations:1. PCSTS=1 at the time of the event — device is still physically connected2. This happens 100% reproducibly at frame 16383, never at any other frame3. Without SDRAM (FMC) and LTDC active, the issue does not occur for 1.5+ hours4. With SDRAM only: occurs after ~7 minutes5. With SDRAM + LTDC (framebuffer in SDRAM): occurs within seconds6. Temporarily shorting USB3300 VCC to GND with a probe (adding bypasscapacitance) eliminated the issue for 50+ minutes — suggesting powersupply noise is a contributing factor, but the frame=16383 correlationis too precise to be purely noise-drivenQuestio
Hello! I am encountering some issues when trying to run 2-Lane DSI with an STM32H747.Current Hardware Configuration:MCU: STM32H747 (using the Cortex-M7 core)Display Driver: Chipone CO5300 OLED Display DriverDisplay Panel: Round TOH143XRT-01CG2 1.43" 466×466 AMOLEDInterface: MIPI DSI (adapted command mode) Issue I am experiencing:I have successfully implemented 1-lane DSI communication between the STM32H747 and CO5300 display driver. However, when I configure both the STM32 DSI host and CO5300 for 2-lane operation, the display is not responsive (black screen / nothing being displayed) The display pipeline works as follows:DMA2D → Performs 2D graphics operations and copies framebuffer data to SRAMLTDC → Reads framebuffer from memory, performs layer blending, generates parallel RGB pixel stream (HSYNC, VSYNC, DE, pixel clock, RGB data)DSI Wrapper → Converts LTDC parallel RGB stream into a format suitable for DSI hostDSI Host → Packetizes pixel data into MIPI DSI packets, seriali
Hi,I have a DMA2D issue with a STM32N6 Nucleo-144 board. I can use the DMA2D to blend two framebuffers if the inputs are in the AXISRAM1. However, when one of the framebuffers is in AXISRAM3 (NPU RAM), the DMA2D doesn't copy from the relevant framebuffer. There is no error, but the output is invalid.I can copy to the AXISRAM3 using HPDMA without any issue. I have configured the RISAF4/5/6; otherwise, I am unable to copy to AXISRAM3. This is the code to configure RISAF4/5/6 (NPU RAMs): __HAL_RCC_RISAF_CLK_ENABLE(); RISAF4->REG[0].CFGR = 0x00000000; RISAF4->REG[1].CFGR = 0x00000000; RISAF4->REG[0].CIDCFGR = 0x000F000F; /* RW for everyone */ RISAF4->REG[0].ENDR = 0xFFFFFFFF; /* all-encompassing */ RISAF4->REG[0].CFGR = 0x00000101; /* enabled, secure, unprivileged for everyone */ RISAF4->REG[1].CIDCFGR = 0x00FF00FF; /* RW for everyone */ RISAF4->REG[1].ENDR = 0xFFFFFFFF; /* all-encompassing */ RISAF4->REG[1].CFGR = 0x00000001; /* enabled, non-secu
Hi all,I am trying to develop a bootloader software for STM32F765.I requires two features in it.1) jumping from Bootloader to Application2) jumping from Application to BootloaderI could make jump from Bootloader to Application very easily.But I am suffering with jumping from Application to Bootloader for 4-5 days now.The final code I tried is given below:void Bootloader_JumpToBootloader_Program(void) { void (*app_reset_handler)(void); __disable_irq(); SysTick->CTRL = 0 ; SysTick->LOAD = 0; SysTick->VAL = 0; HAL_RCC_DeInit(); HAL_DeInit(); /* 2) disable all enabled interrupts */ NVIC->ICER[ 0 ] = 0xFFFFFFFF ; NVIC->ICER[ 1 ] = 0xFFFFFFFF ; NVIC->ICER[ 2 ] = 0xFFFFFFFF ; NVIC->ICER[ 3 ] = 0xFFFFFFFF ; NVIC->ICER[ 4 ] = 0xFFFFFFFF ; NVIC->ICER[ 5 ] = 0xFFFFFFFF ; NVIC->ICER[ 6 ] = 0xFFFFFFFF ; NVIC->ICER[ 7 ] = 0xFFFFFFFF ; NVIC->ICPR[ 0 ] = 0xFFFFFFFF ; NVIC->ICPR[ 1 ] = 0xFFFFFFFF ; NVIC->ICPR[ 2 ] = 0xFFFFFFFF ; NVIC->ICPR[ 3 ]
Hi i have a board with STM32F4 and an EMMC. And I am using FATFS. I managed to enable the STM32 RTC and added the necessary code in get_fattime(); There is one problem stil: under windows "created" and "modified" date are shown corerctly. But "accessed" date is wrong. See attached image. Any clue what is going wrong? Thx
Dear all,I think I have discovered a bug in the CMSIS headers supplied for the STM32H7RSx and STM32H7x MCUs.In "Drivers/CMSIS/Device/ST/STM32H7RSxx/Include/stm32h7rsxx.h", there are definitions for ATOMIC_SET_BIT() and ATOMIC_CLEAR_BIT() among others, see https://github.com/STMicroelectronics/cmsis-device-h7rs/blob/7e6e213ddc397c76622a0aca2f623ccc3b34c010/Include/stm32h7rsxx.h#L162:/* Use of CMSIS compiler intrinsics for register exclusive access */ /* Atomic 32-bit register access macro to set one or several bits */ #define ATOMIC_SET_BIT(REG, BIT) \ do { \ uint32_t val; \ do { \ val = __LDREXW((__IO uint32_t *)&(REG)) | (BIT); \ } while ((__STREXW(val,(__IO uint32_t *)&(REG))) != 0U); \ } while(0)and the "register" in the description and the '__IO' qualifier in the code hint that this can be used for peripheral registers. This suspicion is correct, e.g., see https://github.com/STMicroelectronics/stm32h7rsxx-hal-driver/blob/1bde483bc7ab4883c2ef643e5a16ad6b303a631f/S
In the code examples provided with AN4502, this pattern is used often: while ( STACK_SMBUS_IsReady(pcontext) != SMBUS_SMS_READY) { } But in our code, when built with the Release CMake preset, this hangs forever.My understanding is that this is because the `StateMachine` member of the SMBus context struct (SMBUS_StackHandleTypeDef) is getting updated by the SMBUS interrupt handlers, but it isn't marked volatile: * @brief Stack state machine handling structure - the stack operation context */ typedef struct { uint32_t StateMachine; /*!< Keeps track of current stack state */ SMBUS_HandleTypeDef *Device; /*!< HAL driver handle */ uint8_t *ARP_UDID; /*!< A UDID used in ARP */ st_command_t *CurrentCommand; /*!< NULL, unless a command is being processed */ st_command_t *CMD_table; /*!< Pointer to first record in the table of all supported commands */ uint32_t CMD_tableSize; /*!< The supported commands table size */ #ifdef PMBUS13 SMBUS_ZoneStateTyp
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.