Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hello,Could someone please help me?After writing the following code to my custom board using the STM32H725, I can no longer connect to CubeIDE or CubeProgrammer.I believe the issue is due to accidentally enabling the MPU in CubeMX.I would like to recover the MCU by initializing the flash or using another method.Thank you in advance.#include "main.h" #include "stm32h7xx.h" #include "stm32h7xx_hal_flash.h" #include "stm32h7xx_hal_flash_ex.h" #include "stm32_hal_legacy.h" void SystemClock_Config(void); static void MPU_Config(void); static void MX_GPIO_Init(void); int main(void) { MPU_Config(); HAL_Init(); SystemClock_Config(); MX_GPIO_Init(); while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ } } void SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {0}; RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; /** Supply configuration update enable */ HAL_PWREx_ConfigSupply(PWR_DIRECT_SMPS_SUPPLY); /** Configure the main internal regulator output volt
Hello,I am implementing a sine wave generator based on the high-speed DAC3 of the G474.The DAC is in double-DMA mode and its conversions are triggered periodically by a timer.Sample and Hold is disabled.The DAC is connected to an external pin by an OPAMP in the follower mode.What could be the reason for the downward slope shown on the picture? It is consistent even at low conversion speeds.Thank you for your help.
I have a u5 dev board running a usbx msc reference design , which works fine. I'm trying to disable the usbpd side of things within the reference example. I've disabled the usbpd midlewear and peirphal port for the 2 pd pins aswell as disabling the adc input. The design compile fine, after removipng the bsp however the usb msc doesn't work. Is there something I'm missing? There was one post mentioning about removing threadx messageing ques, I did try tweaking some of the threadx code but couldn't get anything working Any ideas on how to fully remove the pd code as I'm just using usb+and usb- ldata pins.
HI am using stm32 B-U585I-IOT02A dev board in that the uart2 and uart3 are not transmitting the data but its receiving the data . I have set PH 13 and PH 15 high also . but Tx is not working only Rx workingmy code in this only hello2 getting in my serial terminal.
Hello everyone on the forum.I have created a UART DMA receive program with Nucle-H723.This time it is working properly, but sometimes it does not work properly.DMA set up in normal mode on UART4 RX.DMA initialization function of UART.void UART_DMA_Init(UART_HandleTypeDef *huart) { UART_HandleTypeDef *pHuart = huart; memset(RxBuf, 0, UART_BUF_LEN); __HAL_UART_DISABLE_IT(pHuart, UART_IT_PE); __HAL_UART_DISABLE_IT(pHuart, UART_IT_ERR); __HAL_UART_ENABLE_IT(pHuart, UART_IT_IDLE); HAL_UART_Receive_DMA(pHuart, RxBuf, UART_BUF_LEN); }UART DMA receive processing function.void UART_DMA_EventHandler(UART_HandleTypeDef *huart) { UART_HandleTypeDef *pHuart = huart; uint8_t RxData[UART_BUF_LEN]; if(__HAL_UART_GET_FLAG(pHuart, UART_FLAG_IDLE) != RESET) { __HAL_UART_CLEAR_IDLEFLAG(pHuart); HAL_UART_DMAStop(pHuart); uint8_t RxBufLen = __HAL_DMA_GET_COUNTER(pHuart->hdmarx); RxBufLen = UART_BUF_LEN - RxBufLen; RxBufLen = RxBufLen % UART_BUF_LEN; if(RxBufLen > 0) { me
Hi.I am currently developing a motor control platform using STM32G441 and am facing a problem.I am controlling a 3-phase motor with TIM1 based on packets from Half duplex USART1 (PB6), but when I Start TIM1 CH2, the USART1_TX pin, which should be unrelated, is pulled down to low level.Specifically, PB6 is pulled down by executing HAL_TIM_PWM_Start_(&htim1, channel2) or by setting the AF register and MOE register (output enabled).This occurs only on CH2 and is not reproduced on TIMx CH2 (inverted) or other channels.No short circuit in the board pattern is observed.In half-duplex, pull-down to low level during Idle section is a fatal problem.I have investigated using an oscilloscope, and it behaves as if the TIM1 CH2 pulse is shorted in the MCU with some resistance.Is this problem an errata of the STM32G441?Thank you.
Hi everyone,I’m currently working with the STM32N6570-DK board and trying to read an analog signal using the ADC1/2 INP8 channel (PB10) using the MB1280C Fanout board (Pin 13) with STMOD+ connector. However, I'm consistently getting a value around 2000 (high impedance value), regardless of whether I connect the pin to GND or a 1.8V source.For reference, I’ve used similar code on the STM32F441-RE board where it works perfectly, so I suspect this might be related to board-specific settings.Steps to Reproduce:Create a default STM32N6570-DK project using STM32CubeIDE.Set PB10 to ADC2_INP8 mode in the .ioc file.Keep the ADC settings at their default configuration (12-bit resolution).Add UART print statements to output the ADC values over the COM port (as shown in my main.c file).Observe that the ADC value remains around 2000, regardless of the input voltage on PB10 or Pin 13 on the fanout board connected to STMOD+ connector.I’m attaching my full project for reference.
Dear TeamI hope this message finds you well.I am currently working with a Nucleo-H755ZI development board (dual-core STM32H755) and encountering a persistent issue when attempting to program or debug the device using STM32CubeIDE and STM32CubeProgrammer.The following error message appears:Error: ST-LINK error (DEV_CONNECT_ERR)Despite multiple attempts and following several troubleshooting steps—including verifying the BOOT0 configuration, updating the ST-LINK firmware, trying "Connect Under Reset", and attempting a full chip erase via STM32CubeProgrammer—the error persists, and I am unable to establish a connection with the device.Here is a summary of what I have tried:Verified all physical connections and USB cables.Updated ST-LINK firmware.Attempted connection using “Connect Under Reset” while holding down the Reset button.Ensured I'm targeting the Cortex-M7 core, not the M4.Attempted a mass erase in STM32CubeProgrammer.Verified that no low-power or SWD-disabling firmware is loaded.I
Hello, I am making a project where i'm using usart2 as a virtual com port and where i'm making a CLI based HMI using teraterm , so there's a lot of diplay and hal_uart_transmit functions , it all worked fine until I added a DMA in the uart1 in order to read gps data.What happened is that the HMI menu doesn't work as it used to but when i removed the gps reading data part from dma receive to idle it worked like it used to.Someone told me that using DMA in receive mode like that + Hal_Uart_Transmit causes a block.Since HAl_uart_transmit is a blocking function, it will cause problems for dma receive ,And among the problems is that my functions in HMI don't work anymore like they used to, but at the same time i can implement dma with adc and it works fine, the problem is in the uart Can anyone please explain to me the logic behind it? The issue reminded me of the Hal_delay() block when used inside an interrupt.You'll find in the first picture how the normal behaviour should be an
Hi all,I’d like to share with you a project I recently completed – a digitally-controlled linear power supply built around the STM32F030CCT6 microcontroller.The power stage uses a classic analog linear regulator topology, known for its simplicity, reliability, and low output noise. To bring it into the modern age, I’ve added::small_blue_diamond:Digital control and monitoring using STM32F030CCT6:small_blue_diamond:LCD display with rotary encoder for local control:small_blue_diamond:Remote control via I²C interface:small_blue_diamond:Possibility to link and control multiple units in coordination:small_blue_diamond:Fully open source – schematics, firmware, and documentation availableThis is a well-working and stable design, ideal for home-built lab power supplies. It’s intended for electronics hobbyists who want a practical, reproducible, and expandable project that combines classic analog performance with basic digital control features.:link:Project page: https://www.stm32dds.tk/stm32-ps
The author of this how to get CANopenNodeSTM32 working video is very good (The length of the video is 3:31:33; The part that is pertinent to this post 57:05 - 1:18:22). Unfortunately, this video targets FDCAN (but I don't have this available; my chip just supports plain CAN) and this video also targets bare metal (but I don't have this available; FreeRTOS is what I am using). I tried to follow all of the author's steps but was unable to. When I ran I got a HardFault with the CAN node never even coming online.Executing this line is what causes the Hard faultcanopen_app_init(&canOpenNodeSTM32); From the instructions in the video, there are numerous steps that are different between FDCAN and CAN and I don't know what the equivalent (plain) CAN steps are which I believe may be the root of the problem. Under the "Parameter Settings" tab"FDCAN1" and "FDCAN2" are in the video at 1:00:55. Mine doesn't have these. Mine jus
I have succesfully built and programmed a TouchGFX application to my board in release mode. When I try to use the debugger I have limited success. If in the Project Explorer I highlight the (in FSBL) line and launch the debugger and press F8 my application runs. Any breakpoints I have set in my application do not trigger. If in Project Explorer if highlight the (in Appli) line and launch the debugger I receive an error "Failed to execute MI commad" It worked for me one time but I cannot relpicate the sequence that gave me that result. How do I launch the debugger so that breakpoints in my application will work?
I'm using LL_RCC_DeInit within a boot loader so that the clocks are in the reset state when the application is launched. However, LL_RCC_DeInit also clears the reset cause flags as its last action: /* Clear reset flags */ LL_RCC_ClearResetFlags();The application needs to use the reset cause, so I will need to either:Modify the LL_RCC_DeInit routine (not ideal, as there are no user code sections to retain the changes); orClone LL_RCC_DeInit and remove this part (also not ideal as I would need to keep on top of any LL HAL changes); orFind some other way of passing the reset cause into the application. I would rather not do this, as I want to keep the boot loader and application completely decoupled.Resetting the flags within LL_RCC_DeInit does not seem to be compatible with its stated behaviour ("Reset the RCC clock configuration to the default reset state"), as the flags could be seen as being part of that state.For now, I will use one of the TAMP->BKP?
loading program through st-link in stm32wl5moc mcu but it showing a msg check image
Hi Sir,We are using the STM32H747XIH6 microcontroller in our custom board. We have configured the ADA4930 amplifier in a single-ended to differential configuration with unity gain. The op-amp output is connected to the differential ADC1_IN2 channel (positive and negative inputs).The op-amp output looks fine, as shown in the attachment. However, we are not able to read the signal using the differential ADC to reconstruct the input sine wave.Could you please help us identify the issue.
Hello! With this Simulink model, containing a MATLAB function to convert the vector of numbers to ASCII, I was able to send a vector of numbers until a length of only [1x20], while with a length >20, the simulink model works normally with the external mode, with the MATLAB function being able to handle any length of any row vector as an input, but no messages are displayed on Node-red.Is it possible that the problem would be with the STM32 Mqtt block? Perhaps you can help me, please, by telling me if there are some settings in CubeMX that I can modify.I really appreciate any help you can provide.
I'm running into an issue on two boards (an STM32H735 Discovery Kit) and a custom board with an H743. #include <stdio.h> #include <zephyr/kernel.h> int main(void) { while (1) { printf("Hello there, world!\n"); k_msleep(1000); } return 0; }If I flash the program, it runs fine. If I start debugging it, it SIGTRAPs at 0xA05F0000 inside the k_msleep() (around sys_clock_tick_get_32()). Even though my debugger says the program is stopped, it continues running doing the printf() and waiting the 1 second in each loop. I'm using VSCode with the Zephyr IDE plugin on a mac - using either stm32cubeprogrammer or OpenOCD as my runner. I'm connected to my custom board with an STLinkV3. I'm using the inbuild STLink on the Discovery Kit board.I've googled and see a few references to 0xA05F0000 with similar bugs, but nothing that's a definitive answer. Does that address mean anything to anyone?
Hello ST Community,We are currently working on a project involving NB-IoT connectivity using the SIMCom SIM7022 modem, which is interfaced with the STM32L496ZG microcontroller via UART. Our goal is to establish MQTT communication with AWS IoT Core by sending AT commands from the MCU to the modem.Working Standalone Test:Before integrating with the STM32 MCU, we tested the SIM7022 module using a USB-to-TTL converter connected to a PC terminal. In this setup, the modem behaves as expected:Responds to AT commands properly (e.g., AT, ATI, AT+CSQ)Shows strong signal strength (AT+CSQ returns good RSSI)Registers on the NB-IoT network (AT+CEREG? returns +CEREG: 5,5)Connects to AWS IoT MQTT broker over SSL/TLS with certificate authenticationThis confirmed that the firmware version 2110B13SIM7022 works correctly and the modem is functioning properly.Issue with STM32L496ZG Integration:When we use the STM32L496ZG to send the same AT commands to the SIM7022 module through UART, the results are incon
Hello, I am using the H753zi board and cannot figure out why my blue led won't turn on. The green and red do work. Any ideas would be greatly appreciated.
dose st-link v2 is not supported in stm32wl5moch
Hi, I need to update the firmware of my MCU from the UART. I mean without physically touching the BOOT pin, but only via serial commands (classic FW update of a product).I'm not an expert, but I tried searching on the internet and I saw that for these things it is necessary to write a bootloader. It doesn't seem impossible, but for a non-expert it's not exactly simple.What I wanted to ask is, I think this is a very common need among users, has STM created anything official to support this feature? Is there something already given and official that I can use without necessarily writing my own custom bootloader? Maybe even supported directly in CubeMX.I've seen that there are dozens of amateur/community bootloaders available, but not knowing how to write it, I can't even evaluate whether it's done well or whether it's suitable for my application, which is why I'm looking for an official STM solution.
Hello everyone, I’m using an STM32L412K8 microcontroller with an external 32.768 kHz LSE crystal to operate the RTC for real-time clock functionality. However, I'm facing two issues: Second jumps: the seconds skip multiple values out of order (for example, jumping from second 9 to second 16). It consistently jumps by 7 seconds every 10 seconds. The attached image shows some of these jumps. Irregular seconds counter: The seconds count exceeds the normal range, reaching values above 60 (for example, 89) before rolling over to the next minute, as shown in the attached images.What are the possible solutions I can try?, Any tips or suggestions would be very helpful.Thank you in advance!
Hello.I am finishing a project where I measure voltage with an ADC using the STM32L431 and, for greater accuracy, I am using the OPAMP (PA0 = ADC1_IN0_VINP and PA3 = ADC1_IN_VOUT). For the STM32L431 on the STM32CubeMX, when activating the OPAMP in "Follower" mode, it is possible to select the "OPAMP1 Output Single-ended" option on the ADC1 to internally connect the OPAMP1_VOUT to the ADC1_IN8, and I can read it perfectly on the PA3 (ADC1_IN8). Knowing more about the ST family of microcontrollers, I realized that the STM32U545 has more features in terms of safety and lower power consumption, so I decided to change the microcontroller of the project and start using the STM32U545. However, on the STM32U545, when activating the OPAMP in "Follower" mode or any other mode, the ADC options do not show the "OPAMP1 Output Single-ended" option and, so far, I have not found out what to do to be able to use the OPAMP and read PA3=ADC1_IN8 as I do on the STM32L431.I have already looked in several m
X-Nucleo GFX01M1 not working properly with Nucleo-64, ARM Cortex M4, STM32 L476-Serie Hi, I Got My Hands Recently On a X-Nucleo GFX01M1 and I am now struggeling to get a Proper Connection > Everything I see Is White Screen. I have Simple Code For Testing the Screen :- Just Draw Everything Red On The Screen- Blinking LD2 on the Nucleo to see if the Code Is Running Or Not. So The Code Actuallys flashes correctly with 0 Errors and The LD2 is flashing but Still, only White Screen.https://drive.google.com/file/d/1r8Q8XvllzKyyLXUqnP15iG0EPqi2gGUq/view?usp=sharinghttps://drive.google.com/file/d/1N7JsuQcGA6AmxG5wUAQERqQLjKdWLTWE/view?usp=sharing (screenshot .ioc with SPI2 and warning ?) I am using New Blank Project In STM32 IDE,- SPI2 Full Duplex Master- PB15 > SPI2 MOSI- PB14 > SPI2 MISO- PB13 > SPI2 CLK- PA8 & 9 > GPIO Output- PB6 > GPIO Output- PA0,1,2 > GPIO Output This Is My main.c Looking Forward for your Responses!Btw th
I am working with STM32H747 and a display that has an ST7701 on it. I am struggling to get it to work. Does anyone have an ST7701 code (LTDC, DSI, and ST7701 init) or a sample project for it? Thanks
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.