Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hello everyone, I'm working on a custom board that uses the STM32H723ZGT6 together with the LAN8742A-CZ-TR Ethernet PHY. During the call to HAL_ETH_Init() in the stm32h7xx_hal_eth.c file, the initialization fails and gets stuck in this loop: /* Wait for software reset */ while (READ_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR) > 0U) { if ((HAL_GetTick() - tickstart) > ETH_SWRESET_TIMEOUT) { /* Set Error Code */ heth->ErrorCode = HAL_ETH_ERROR_TIMEOUT; /* Set State as Error */ heth->gState = HAL_ETH_STATE_ERROR; /* Return Error */ return HAL_ERROR; } } I suspect the issue may be related to the NRST pin. On my PCB, I have connected the NRST pin of the LAN8742A to both the MCU's NRST and the ST-Link NRST pin — similar to what is shown in the STM32H7 Nucleo-144 (MB1364) reference design. However, when I checked the LAN8742A datasheet, it suggests that this pin should be driven in a specific way Could this NRST wiring be the reason fo
I am doing development for the STM32N6570-DK board in Zephyr. I can build a simply "blinky" project:$ west build -p always -b stm32n6570_dk ./applications/blinkyAnd can flash the device:$ west flash But when I try to debug:$ west debugserverI get this error:FATAL ERROR: no debugserver runner available for board stm32n6570_dk/stm32n657xx. Check the board's documentation for instructions.I have tried several variations of specifying the runner, but get an error each time, i.e.:$ west debugserver --runner jlinkFATAL ERROR: board stm32n6570_dk/stm32n657xx does not support runner jlinkTo fix, configure this runner in /home/stuart/ns-iot-dev-platform/zephyr/boards/st/stm32n6570_dk/board.cmake and rebuild.or$ west debug --runner openocd$ west debugserver --runner stlink_gdbserveretc.I am running Zephyr v4.1.1.Can someone please confirm that this chip is supported? Anyone tried to debug with Zephyr? Am I doing something wrong?Thank you!
I'm trying to generate an HID keyboard through CubeMX for USBX. I'm using an F411CE based board so picked the appropriate software pack for that. However, when I go to pick to pick components, I can only see the generic HID pack instead of separate keyboard and mouse packs as I've seen here before. I'd usually be fine with this and add the keyboard files in myself but this generic HID pack is based on a mouse implementation and adds a lot of unnecessary bloat to the stack. Is there a way to generate the files without the ux_device_mouse files?
Hi,I was trying to configure WRP protection in the flash for page 0 to page 11 and I am using STM32L443VC MCU.But I am seeing different value in the FLASH_WRP1AR for WRPstartoffset = 0x80 --Expected(0x00). Please find attached snapshot for the reference. Please do check the code snippet as well and let me know any configuration am I missing?
Hello, I am using a STM32H563ZI with an external PSRAM QSPI device, the APS6404L. I am using Quad-SPI through the OCTOSPI interface and have been successfully able to get into memory mapped mode. However, every time I go to read, I read out only 0 data. Has anyone ran into this same issue? I have pasted my code for transitioning the device to memory mapped mode and a subsequent test write/read. Thanks! int main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_ICACHE_Init(); MX_OCTOSPI1_Init(); /* USER CODE BEGIN 2 */ /* USER CODE END 2 */ /* In
Split from STM32f407Vet6 gets stuck in MX_LWIP_Init(); Please provide full details of your setup, what debugging you've done so far, etc - see How to write your question to maximize your chances to find a solution Did you find what was causing this? I am having the same issue it would seem.
Good morning, I made a project using stm32f407vet6, configuring the stm32f407vet6 to use ethernet network without freertos, I can ping it and it responds immediately, follow the code:#include "main.h"#include "lwip.h"void SystemClock_Config(void);static void MX_GPIO_Init(void);static void MX_RTC_Init(void);/* USER CODE BEGIN 0 */extern struct netif gnetif;struct pbuf *p;/* USER CODE END 0 *//*** @brief The application entry point.* @retval int*/int main(void){HAL_Init();SystemClock_Config();MX_GPIO_Init(); MX_LWIP_Init();MX_RTC_Init();while (1){ethernet_input(p, &gnetif);sys_check_timeouts();}/* USER CODE END 3 */}but now I want to use freertos and have a UDp server, but when configuring freertos, stm32f407vet6 gets stuck inside MX_LWIP_Init();, the firmware version for STmf4 is 1.28.1, here is the code:#include "main.h"#include "cmsis_os.h"#include "lwip.h"osThreadId_t defaultTaskHandle; const osThreadAttr_t defaultTask_attributes = {.name = "defaultTask",.stack_size = 128 *
I have started for integration of NUCLEO-L476RG board with X-NUCLEO-IKS02A1 expansion board for getting live values from the accelerometer, magnetometer and gyroscope.Started from creating a project on STM32CubeIDE then selected X-CUBE-MEMS1 package, selected Board Extension IKS02A1, motion fusion library, gyroscope calibration, accelerometer calibration and magnetometer calibration libraries.Also, enabled the CRC, SPI, I2C, USART in the configurations. When generated the code, motion_fx.h file generated.So further I want to know what else libraries or header files I need to acheive my final goal, to get tje yaw, pitch, roll values when the board is tilted or moved or to calibrate them.
I'm building a USB Audio Class 1.0 full-speed microphone on an STM32L4 (HSI48+CRS clock) using ST's USBD stack. So far I'm just streaming a 1 kHz test tone in 48 kHz/16-bit.Platform support I need - macOS: must use explicit or implicit feedback (Adaptive isn't supported on IN)- Android: restricted to UAC1.0 support which is essential for me so UAC2.0 is out of the question- Linux: adaptive works fine, explicit does not yet work for me- Windows: what's supported here?Hardware & clock- USB FS off HSI48 with CRS locked to SOF- SOF interrupts enabled- ADC sampling not in use yet (sine is generated and sent in `USBD_AUDIO_DataIn` callback)hpcd_USB_FS.Init.Sof_enable = ENABLE;DescriptorsConfiguration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x007e bNumInterfaces 2 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 100mA Interface Association: bLength 8 bDescriptorType 11 bFirstInterface 0 bInterfaceCount 2 bFunc
I am receiving errors such as 'HAL_StatusTypeDef' does not name a type; did you mean 'NOR_StatusTypedef'?' and 'HAL_LockTypeDef' does not name a type' in my files in STM32F4xx_HAL_Driver/Inc . i create project automatically with stm32CubeIDE. What causes these errors?Thanks
Hi!I have no problem with writing, reading, or erasing with dual mode, but erase stops working as soon as I change the DBANK option byte to "Single bank mode" (Uncheck it).I assume there is something i need to change in the STM32G4XX files as well, because DBANK is always defiend:I have tried to search on my own, but have not found any solution. Out of the 2 relevant hits I found online, one did not work and the other seems to be unverified and not easy to testThis is my code, which simply calls "stm32g4xx_hal_flash.c" and "stm32g4xx_hal_flash_ex.c" functions if(HAL_FLASH_Unlock() == HAL_OK) { uint32_t PageError; if(HAL_FLASHEx_Erase(&pEraseInit, &PageError) != HAL_OK) { HAL_FLASH_GetError(); } while(HAL_FLASH_Lock() != HAL_OK); } Anyone have any suggestion?Thank you in advance
Hello, dear.I am working with Nucleo-H753ZI board to implement USB in - SAI out streaming. My goal is USB input to SAI output audio streaming for sample rate 48k and 44.1k.input condition is 44k or 48k, 16bit, 2channel, output condition is 44k or 48k, 32bit, 2channel. I am attaching my project and its files : usbd_audio.c, usbd_conf.h, usbd_audio.h are fixed for my purpose.It is recognized in PC as selectable audio driver and its SAI FS Frequency follows sample rate.When setting is 48k sample rate, it sounds well,But 44.1k sound is not right pitch and speed.I don't know which is the problem. Please let me know my problem and how can fix it.Thank you. From SK Son.
The STM32H750B-dk Based Custom Board isn't entering debugging mode when using STM32CubeIDE . But QSPI Example Code is working perfectly.
Hi everyone,I’m currently trying to deploy the VENC_RTSP_SERVER code, but it's getting stuck during execution. In the UART terminal, I only see the following output before it hangs.After some debugging, I found that the code is getting stuck at line 133 in venc_app.c.tx_event_flags_get(&venc_app_flags, VIDEO_START_FLAG, TX_AND, &flags, TX_WAIT_FOREVER);Any help or suggestions would be appreciated.
Hi everyone,I'm using an STM32F767 with an S25FL256S NOR flash over QSPI in indirect mode (HAL driver).I'm trying to write the string "HELLO" at address 0x000000, but after programming and reading, I always get: FF 45 4C 4C 4F → "ELLO".The first byte is always 0xFF. All other bytes are written and read correctly. What I’ve already done:Verified Flash ID: 01 20 18 (correct)Erased the sector before writingUsing 0x02 Page Program in 1-1-1 modeSet SIOOMode = QSPI_SIOO_INST_ONLY_FIRST_CMDSet FIFO threshold = 1Using indirect mode (HAL_QSPI_Command() + HAL_QSPI_Transmit()) Test Code:char tx[] = "HELLO";QSPI_PageProgram(0x000000, (uint8_t*)tx, strlen(tx) + 1);QSPI_ReadData(0x000000, rx, strlen(tx) + 1);Why is the first byte not being written?
Hello, I am trying do a loopback test, i.e I2C1 as master and I2C2 as slave on the same board(STM32F429ZI DISC1).I am giving the address for slave as 0x42 left shifted by one, and storing the same in oar1 register for I2C2. Now the problem is the master is not getting acknowledgement from the slave. I am using HAL to test this.I have also turned on/set the pull up and open drain for both the I2Cs. And i have also tried with external 4.7k ohm resistors, for the pull up resistance. But to no avail.Can somebody please suggest what can i do.
Hello everyone.I am using st32f407 chip to drive ad7606c ADC chip, and I want to output real time graph from PC to matlab via usb.ad7606c outputs busy signal at the end of conversion, and GPIO callback function is executed like below according to busy signal.void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) { if(GPIO_Pin == BUSY_Pin && dma_busy == 0) { Start_ADC_DMA_Receive(); } }Then the ‘Start_ADC_DMA_Receive()’ function is executed, which is shown below.// Start receiving DMA (call only once, repeat in subsequent callbacks) void Start_ADC_DMA_Receive(void) { dma_busy = 1; //HAL_GPIO_TogglePin(GPIOD, GPIO_PIN_3); // Toggle LEDs for status checking HAL_GPIO_WritePin(GPIOA, GPIO_PIN_3, GPIO_PIN_RESET); // CS LowHowever, if the DMA reception completion callback function is not executed afterward, the PA3(CS) pin output does not go high. The code is shown below.// DMA Receive Complete Callback void HAL_SPI_RxCpltCallback(SPI_HandleTypeDef *hspi) { if (hspi->Instance == SPI1)
Hi,I'm using a STM32L0, the power consume under stop mode was ~50uA. After some search, i see that i forgot to stop the USART clock which permit a consume under stop mode around 20uA which is far from the datasheet <1uA.Actually, i'm doing manual search for clock or GPIO which could drain useless power. I wondered if a library or function already exist which could scan all possibility option which drain power and give information about that. I'm not looking for exact number (it could be nice to have approximation) but more a list of all activate option like :- ADC clock enable- GPIOx under output state- MSI clock at x MhzetcSo i can figure out what i forgot to disable.Thanks in advance,
Hi,I am working on a secure TAMPER application running on STM32H5731I-DK. Tamper module init and config is properly executed for active tamper detection with interruption. The TAMP_MISR register is set as expected once the tamper attempt is discovered, however the TAMP_SMISR is never set. Given that the TAMP_SMISR is used by the TAMP IRQ handler to determine the IRQ origin, the event is never handled correctly.The application is running in a secure context.Is there any reason/explanation why TAMP_SMISR would not be set ?Is there any specific register meant to be set ?Thanks
I tried running the LwIP_TCP_Echo_Server app on the Nucleo Board H7S3L8 (MB1737-H7S3-L8-B02) using STM32CubeH7RS\Projects\NUCLEO-H7S3L8\Applications\LwIP\LwIP_TCP_Echo_Server sample code.The code downloaded fine, but TCP communication didn’t work.I started a DHCP server using Tftpd32 software, but the MCU didn’t get a DHCP IP and showed a static IP (192.168.0.10) instead.I tried pinging the MCU’s static IP from my laptop using a straight Ethernet cable, but it failed.I tested with both crossover and straight Ethernet cables and used a Wi-Fi modem/router as another DHCP server, but the result was the same.I also tried other sample codes (LwIP_UDP_Echo_Client, LwIP_UDP_Echo_Server, LwIP_TCP_Echo_Client, LwIP_HTTP_Server_Raw), but the result was the same.I followed the steps in the Readme file and enabled the XSPI2_HSLV=1 for high-speed I/O.Did I miss any steps? Screenshots are attached for reference. MCU Comm3 serial responsePing request from Laptop to the MCUWireshark packet while
I used the STM32H533 Nucleo board example project ADC_MultiChannelSingleConversion as a reference for this code. The actual project is running on an STM32H523.I am attempting to have a software-triggered array of ADC reads across two channels using the GPDMA. [Edit: for clarification, multiple conversions across a sequence of 2 channels, not just a single conversion]. The plan is to be alerted via interrupt callback that the sequence (triggered by HAL_ADC_Start_DMA) is complete. I do not want the ADC to continue to sample or overwrite the data in the buffer, so I am turning off the ADC in the callback. void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef *hadc) { HAL_ADC_Stop_DMA(hadc); ... }The issue is that this callback is being triggered after every two-channel sequence is completed, instead of once after the DMA buffer is filled.The system does not generate any DMA complete or half complete callbacks in this configuration.Here's what appears to be working:ADC conversions ar
Hi Team,I am working on SIL2/3 compliance project. For this I need to generate and work on LL based libraries instead of HAL libraries.I am using STM32Cube v1.19.0. and working on STM32H753xx and STM32G4A1VET6 series MCU.I am unable to generate LL libraries for FDCAN.Need your help support for generating LL based FDCAN libraries. Regards,Abey
Hello everyone,I’m working with an STM32H743VIHX and CubeMX 6.13.0-RC5, and I’m trying to capture a square-wave clock on PE9 (mapped to TIM1_CH1) so that each rising edge:Increments the TIM1 counter (External Clock Mode 1 via TI1FP1)Fires a DMA transfer from GPIOE->IDR into a circular bufferInvokes my HAL_DMA_RxHalfCpltCallback() / HAL_DMA_RxCpltCallback()Even though I can see the TIM1 counter increment (and even wrap around), my DMA callbacks never get called.Here’s what I’ve set up:PE9 → AF1 → TIM1_CH1Slave ModeSlave Mode = External Clock Mode 1Trigger = TI1FP1Polarity = RisingChannel 1ICSelection = Direct TI1ICPolarity = RisingFilter = 0DMA1_Stream1 is used for TIM1_CH1NVIC: DMA1_Stream1_IRQn enabledHas anyone successfully used TIM1_CH1 → DMA1_Stream1 on an STM32H7?I’ll attach my full main.cand stm32h7xx_hal_msp.c, files below. Any help would be greatly appreciated!Thank you in advance for your insights.
Hi , I was going through the template_fsbl_xip project located at: STM32Cube_FW_N6_V1.0.0/Projects/STM32N6570-DK/Templates However, I noticed that this project does not contain an .ioc file, whereas other examples like GPIO_IOToggle and several others do include one. My question is: Is this an oversight, or was it intentionally left out? If it was intentional, how can I create an .ioc file for this template as I would like to start my project using STM32CubeMX and I would like to use external flash and ram present on STM32N6570-DK board.
Hello,I'm currently working with the Nucleo-STM32H7S3L8 board and attempting to use the XIP_Template from its repository, which I've successfully cloned.I opened the template folder in STM32CubeIDE via "Open projects from a file system," selecting the folder that contains the .xmproject file. Following the official guide, I tried to build the application project, but the debugger returned the following error:No rule to make target '/Users/xxxxxxxxx/Desktop/STM32CubeH7RS/Drivers/STM32H7RSxx_HAL_Driver/Src/stm32h7rsxx_hal.c', needed by 'Drivers/STM32H7RSxx_HAL_Driver/stm32h7rsxx_hal.o'. Stop.Additionally, when I attempt to build the boot project, I encounter more errors, such as:../../../Boot/Inc/stm32_extmem_conf.h:47:10: fatal error: stm32h7rsxx_hal.h: No such file or directory | #include "stm32h7rsxx_hal.hIt appears that stm32h7rsxx_hal.h is not being found, even though it should be included. (I have attached a picture of the error.)I have already performed the following troubleshooti
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.