Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi,I'm using an STM32H7 board with a LAN8742 PHY, configured via STM32CubeMX.LwIP is initialized without RTOS, and Ethernet is in RMII mode. The main goal of this project is to receive data over UART and forward it via Ethernet.I want the STM32 board to connect to a standard router using a physical Ethernet cable, obtain a dynamic IP address via DHCP, and then transmit the received UART data over the network.Currently, the board does not seem to request or receive any IP address — while the PC connected to the same router receives an IP successfully, the STM32 does not. So far I've verified: MX_LWIP_Init() is called from main.c MX_LWIP_Process() is called inside the main while (1) loop MAC address is manually set in ethernetif.c: MACAddr[0] = 0x02; MACAddr[1] = 0x12; MACAddr[2] = 0x34; MACAddr[3] = 0x56; MACAddr[4] = 0x78; MACAddr[5] = 0x9A; DHCP is enabled in .ioc under LwIP configuration netif_add(), netif_set_default(), netif_set_up() and dhcp_start() are called ETH is
Hello, @Peter BENSCH @Cristiana SCARAMEL @TDK @Amel NASRI I recently came across the easySPIN library for controlling a stepper motor using the L6474 driver. The library provides two board options: STEVAL_PCC009V2 and STM32_VL_Discovery.I am using the STEVAL_PCC009V2 code and have selected the STM32F103C8 as the target in uKeil. The code compiles successfully and flashes without any errors.I have connected SPI2 and other required pins (SCK, DIR, STBY_RESET, and FLAG) as defined in the easyspin.h file. However, the motor does not move.The main.c file contains motor functions such as eMotionControl_GoTo(-65);. I am attaching the relevant files for your reference. Kindly review and let me know if I am missing something.Thank you!
Hi, we have perform a series of environment test for STM32H533, including thermal cycle and vibration test.Durting vibration test, DUTs are powered off, while under thermal cycle test, DUT is powered on.After the test, all application part still function as expected, including UART, ADC, basic IO...etc. However, we've found that three, out of six, DUTs can NOT be accessed through debug interface SWD. Moreover, there are few things abnormal,nRst pin is about 3V, even through VDD is 3.3VST-Link can NOT drive nRST pin to 0V, only 1.5V to 2V.same as SWCLK, cannot be driven low to 0V, as nRST pin.Is there anything we can do to further identify the root cause of the failure?Can anyone shed some light on this? Zt.
hello everybody: l'm currently debugging the FOC motor with MC Workbench. Now I have generate the code with the open loop configuration. According to the user mannual, I can use the APIs in the code as follows:------------------------------------Firmware Usage via APIsStep 1 : Choose Open Loop mode using MCI_SetOpenLoopVoltageMode(&Mci[motorID]) or MCI_SetOpenLoopCurrentMode(&Mci[motorID]) functions (MCI_SetOpenLoopCurrent and MCI_SetOpenLoopVoltage should be considered as deprecated there will be removed in the future).Step 2 (Open Loop Voltage Mode only) : Set Voltage reference via OL_UpdateVoltage(&OpenLoop_ParamsMx,((Voltage_Reference * 32767) / 100)) function.Step 2 bis (Open Loop Current Mode only) : Set Current reference via MCI_SetCurrentReferences(&Mci[motorID], Iqd) function. Mind that Iqd is a qd_t struct that needs to be given Id and Iq as parameters. Id is Flux Reference, whereas Iq is usually 0.Step 3 :
Hi, I hope this is the right place to ask. I'm currently working on interfacing an SD Card with a nucleo f767. I used the DS-Bits in CR2 to set the data frame to 8 Bit (what also should be the reset value). Despite that, MOSI always sends the whole data register, which is 16 Bits. So if I use the function below to send 0xFF, the hardware will send 0x00FF. Does anybody know this issue? uint8_t spi_txrx(uint8_t b) { while (!(SPI3->SR & SPI_SR_TXE)); SPI3->DR = b; while (!(SPI3->SR & SPI_SR_RXNE)); return SPI3->DR;}
Hello,I need you help . For implementing sensorless control of a PMSM motor using the STEVAL-IPM30B and STM32F407, how should their pins be connected? Should the control board's required feedback for voltage and current be directly connected from the given sensing points?
Hi, We are using STM32G491 Series MCU in our application.Can all the three I2C lanes can be used either as a master or slave.Is there any specific pins which supports only as a master or only as a slave. Warm Regards,Mythili B
I'm using the STM32H747I-DISCO board. When I enable any timer (e.g., TIM3, TIM4) on either CM4 or CM7, the LCD display goes blank or stops updating. The display works fine until the timer is initialized.I'm using TouchGFX on CM7.Display is initialized correctly at startup.The issue appears right after initializing the timer via HAL.Could this be due to a conflict with LTDC clocks, TouchGFX timing, or backlight control (PWM)? How can I safely use a timer without affecting the display?Any insights or configuration tips would be appreciated.
Hi , I 'm using NUCLEO-G071RB to test RTC using LSE 32.768k.I using RTC to generate a second alarm and in the interrupt to toggle the pin output(PC6).But i find a issue if follow below steps the interrupt not enter, and the program goes wrong.1. erase the chip.2.Debug the code using IAR+onboard stlink.3.Run the program, the interrupt will not enter,and the program goes wrong.But if i follow below steps, the interrupt runs OK ,and the program goes right.1.Program the mcu g071.2.Power cycle the nucleo board by disconnect /connect the USB.3. After power on the program goes right.
Is it possible to divide by 1 for DIVP of PLL1?According to RM0433 Rev8, DIVP of PLL1 is capable of dividing by 1.However, I could not set division by 1 in CubeIDE. (It is possible that my setting is incorrect.)
Hi all.I'm using STM32H747I-DISCO bord, and I am working on displaying string on LCD by using touchGFX.By the way I want to display string by calling function which exists outside of touchGFX.For example, the function is exists in GPIO interrupt handler or main function. When the function is called, touchGFX action react and display string. The action is configured to display string in response to the function call in advence.In TouchGFX Tutorials, trigger example for LCD touch operation(click button,etc) is provided, but trigger example that is not related to touchGFX is not provided.Please tell me how to display string by calling function outside the touchGFX.Thank you in advance.
Hello,I am trying to fill a buffer from the on-board MEMS microphone using the BSP_AUDIO_IN_RecordPDM() function. However, execution pauses around HAL_SAI_Receive_DMA() and the BSP_AUDIO_IN_IRQHandler() is called. The stack trace is as follows:Checking the hdma variable on the debugger, I can see the error code is 1, corresponding (I believe) to a transfer error. I tried looking at the relevant registers with breakpoints, but they were at 0x0 at every point:I've tried almost everything under the sun. I disabled the D-Cache and allocated all the memory to RAM_D1, I tried allocating my buffer (copied below) to each of RAM_D1, D2, and D3ALIGN_32BYTES (uint16_t recordPDMBuf[AUDIO_IN_PDM_BUFFER_SIZE]) __attribute__((section(".RAM_D1")));My linker script looks like this:/* Highest address of the user mode stack */ _estack = ORIGIN(RAM_D1) + LENGTH(RAM_D1); /* end of "RAM_D1" Ram type memory */ _Min_Heap_Size = 0x800 ; /* required amount of heap */ _Min_Stack_Size = 0x800 ; /* requ
I've been working on a project on STM32F746-Discovery with only CMSIS (no other libraries written by not me) on a Windows machine in STM32CubeIDE. I used the default STM startup file (.s with a vector table and a memory initialization), the startup_stm32f746nghx.s. This file, among other things, defines a list of weak IRQ handler hooks with interrupt handler names. So naturally I took the name HASH_RNG_IRQHandler straight from the file. I declared the function extern "C" to prevent name mangling in C++, besides, it's far from the first interrupt handler in the project. All of them work without an issue. When I compiled and ran the project, I found myself hardfaulting. I debugged my way through everything, but everything looked solid. It just suddenly crashed after I enabled the RNG peripheral. I verified everything there was to verify, but found nothing odd, right before RNGEN, the RNG showed no error flags, no seed error, no clock error. My gut feel told me to look at t
Greetings, I am using STM32CubeIDE version 1.18, Running FreeRTOS, and using the HAL library to configure the ETH device. I have the STM32H573 ETH port configured as MII, and communicating with an external ethernet switch device (also in MII mode). We want the link to be Full Duplex 10 Mbps. We can see that the MAC CR register has bit 14 as a zero, which is 10 Mbps mode. GRISHKA $ peek 0x40028000 [40028000] 0x3830A003 Yet, we I probe the RX and TX clocks with my scope, I see both clocks at 25 Mhz (40 nsec period). I believe at 10 Mbps, the clock frequency should be 2.5 Mhz (400 nsec period) ? Thanks Ken Carlson Edit by ST Moderator: Add the right labels
I am using an STM32G0B0RET and trying to use USART2 w/ RS232 Flow Control (Both CTS and RTS) on pins PA0 - PA3. I am also trying to use pin PD5 as a standard GPIO_Output. PD5 has the additional functionality of being USART2_TX. However I am seeing weird behavior off of the PD5 pin as it never seems to pull the line over 0.01V. I have tried disabling flow control and moving the USART Init above the GPIO init in the main function. My initial assumption was that because USART2 is active on the device, PD5 cannot be used as an output, however looking at the GPIO block diagram that doesn't seem like the expected behavior. This would lead me to believe that I can't use PD6 as its additional functionality is USART2_RX. But that means that pin isnt controlled by the microcontroller which means that potentially the data written to PD6 would appear as UART RX data internally to the device??? I am not sure what is wrong in this case. Any insight, suggestions, or tes
Hi everyone. Im using the nucleo-h743zi2 and im facing the following issue: When trying to printf using redirect to usart3 with the following clock settings: /** * @brief System Clock Configuration * The system Clock is configured as follow : * System Clock source = PLL (HSE BYPASS) * SYSCLK(Hz) = 400000000 (CPU Clock) * HCLK(Hz) = 200000000 (AXI and AHBs Clock) * AHB Prescaler = 2 * D1 APB3 Prescaler = 2 (APB3 Clock 100MHz) * D2 APB1 Prescaler = 2 (APB1 Clock 100MHz) * D2 APB2 Prescaler = 2 (APB2 Clock 100MHz) * D3 APB4 Prescaler = 2 (APB4 Clock 100MHz) * HSE Frequency(Hz) = 8000000 * PLL_M = 4 * PLL_N = 400 * PLL_P = 2 * PLL_Q = 4 * PLL_R = 2 * VDD(V) = 3.3 * Flash Latency(WS) = 4 * @PAram None * @retval None */ static void SystemClock_Config(void) { RCC_ClkInitTypeDef RCC_ClkInitStruct; RCC_OscInitTypeDef RCC_OscInitStruct; HAL_StatusTypeDef ret = HAL_OK; /* The voltage scaling allows optimizing the power consumption when the device is cloc
Hello,I am trying to use the PKA module on a STM32U5 controller. I have configured the clock at 160Mhz and also initialized the Ring. However, when I try to initialize the PKA, it runs into ADDRERRF = 1, I was expecting ofcourse INITOK to be 1. Does anyone have Idea what am I missing here or what might be causing the ADDRERRF? Thanks,Abhi
Hi, We would like to implement a parity checks on the internal RAM to detect random upsets. I understand some STM devices support this feature and I was trying to find one that supports it. I have searched several datasheets but so far I can't find mention of it. I found a thread that stated that the STM32F3 has it, but the STM32F4, I don't know if that is true. Do any H5,H7,F7 support this feature? Is this feature still supported in the latest devices? Regards Jon Edit: title edited to correct STM32 series.
Hi,I want to make my custom ota project and i wanted to know Is there a ioc file for the BLE_ota example? or does anybody know how to extract that example from the FW_WB examples, there are lot of files and examples i dont need and the structure of the example is very messy.Thank you
/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2024 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** */ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "main.h" #include <stdio.h> #include "stm32f4xx_hal.h" #include "string.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ /* USER CODE END Includes */ /* Private typedef -----------------
Title: UART Loopback with Interrupts Halts After Second Transmission on STM32H747I-DISCO Hello everyone, I'm working on a simple UART loopback test on an STM32H747I-DISCO board using the HAL libraries, and I've run into an issue where my interrupt-driven communication halts unexpectedly. The goal is to have USART2 continuously transmit a byte, receive it back via a physical loopback (TX and RX pins are connected), increment the value, and repeat the process. I'm using an LED to visually confirm when a byte is successfully received. The process starts correctly but stops after the first full cycle. Here is the exact sequence of events I'm observing with the debugger: main() calls HAL_UART_Transmit_IT() to send the first byte. The HAL_UART_TxCpltCallback() is successfully triggered. Inside the TxCpltCallback, I call HAL_UART_Receive_IT() to arm the receiver. The byte is received, and HAL_UART_RxCpltCallback() is successfully triggered. The LED toggles as expected. Inside t
Hello,I have a STM32H747I-DISCO I want to use to record audio. In my test code I tried to record 3 seconds of audio after pressing the JOY_SEL button. I tried to setup the configuration of peripheral SAI4 for PDM and to use DMA and PDM2PCM using the CubeMX tool. I also tried to just use the BSP provided by ST for the discovery board. I was not able to get either the manual configuration or the BSP configuration to work. I have already looked at AN5027 and the examples provided by ST in the STM32Cube_FW_H7_V1.12.1 repository. The examples provide audio recording but for different boards. The DFSDM example for this board is not that useful when using SAI for communication. Any guidance or detailed procedure on how to setup the on-board digital microphone using SAI for the STM32H747I-DISCO is much appreciated!Manual/BSP Setup:CPU ICache enabledCPU DCache enabledFreeRTOS enabledGPIOs for joy stick button configuredTIM6 and TIM3 used for sysclks for Core M7 and Core M4 respectively. (b
I would like to increase the code readout protection level from 0 to 1 programmatically in an STM32G030. I must be doing something silly and if anyone sees it, I'd be grateful. I've stepped through it with the debugger and the flash and option byte locks are indeed removed. The write to the option register doesn't show up in the debugger (still shows 0xAA), There are no errors in the FLASH SR or CR registers after the OPTSTART bit is set. The debugger loses connection when OBL_LAUNCH is set (presumably due to the reset). After the reset, the RDP byte in the flash OPTR is still set to 0xAA. It is still 0xAA after the device is power cycled. The code is: // Set code readout protection __disable_irq(); // unlock flash memory (LOCK bit in FLASH_CR) FLASH->KEYR = 0x45670123; FLASH->KEYR = 0xCDEF89AB; // wait for flash unlocked while (FLASH->CR & FLASH_CR_LOCK); // clear option lock (OPTLOCK bit in FLASH_CR) FLASH->OPTKEYR = 0
Hello,MCU: STM32L071During a transition from RDP level 1 to RDP level 0 the MCU stays stalled.Only a power supply off then on permits to have it running.Do you have any suggestion?Best regardsMich
Hello STM32 Community,I accidentally erased the full firmware on my STEVAL-PROTEUS1 board (STM32WB5MMG). After that, I followed this process to recover:FUS firmware: Updated using stm32wb5x_FUS_fw.bin from STSW-PROTEUS (since FUS was missing in the other package).BLE Stack: Flashed stm32wb5x_BLE_Stack_full_fw.bin from FP-AI-PDMWBSOC.OTA Reference App: Flashed Proteus_BLE_FUOTA_reference.bin from FP-AI-PDMWBSOC.After these steps, Bluetooth worked fine — I could connect to the board via my phone.However, when I upload the user application PDMWBSOC.bin (from FP-AI-PDMWBSOC), Bluetooth stops working — it gets disconnected and doesn’t advertise anymore.I tried uploading the application using:STM32CubeProgrammerOTA method via the mobile appIn both cases, the same issue occurs.My Goal: I want to use the FP-AI-PDMWBSOC software pack to run the predictive maintenance application via BLE.Can someone please guide me on what might be going wrong or if any additional steps are needed after uploadin
ST Community highlights – April to June 2026
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.