Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
I'm working on NUCLEO-WB55RG board, and I cannot access to my NUCLEO-WB55RG board.1. I first tried DFU Mode with the setting below, but my computer couldn't find it.2. after that, I connected my board through ST-LINK with the setting below and used STM32CubeProgrammer for connection, But No STM32 target found! error occured. I've tried all the reset settings and Mode settings but same error occurs.3. So I gave up on checking the inside of the board. And I started IDE. I downloaded some examples and I run it. And now I see the error :Failed to execute MI command:target remote localhost:61234Error message from debugger back end: localhost:61234: Connection timed out.4. So I tried to follow link below(https://community.st.com/t5/stm32-mcus/how-to-solve-debugger-connection-issues/ta-p/49693)but I cannot see debug option on changing the pinAnd I also cannot access to my board with CubeProgrammer,And I also cannot get any different result by changing Debugger settings to Under Reset.I'm
Hello, I am working on a project that uses both SD card and USB interface with FatFs. For SD card, I am using FatFs User Defined mode. For USB, I am using FatFs USB Disk mode. The issue I am facing is:When I call f_mount() for the SD card using disk_open("0:"); and later try to use USB disk, there is a conflict/collision with f_mount. It looks like the two FatFs configurations are interfering with each other. My question: How can I properly configure FatFs to use both SD card (user defined) and USB disk together without conflicts? Is there a way to isolate or separately handle f_mount for each disk (e.g., "0:" for SD and "1:" for USB) so that they don’t collide? Environment: MCU: STM32H750VBT6 Middleware: FatFs + USB Host MSC IDE: STM32CubeIDE Any suggestions or working examples would be very helpful.
Title edited to give an accurate idea of the issue. Hello together, i had a problem with setting a correct bit time on a CAN-port. On my nucleo-h755ZI-Q board, I want to operate the FDCAN1 by the CM4 in classic-can mode with a baud rate of 1 MHz. I supply the FDCAN with a clock of 50MHz: Therefore the corresponding registers are set as follows: With: this excerpt in the reference manual, the calculation is: tfdcan_tq_ck = 0,02 µs <- (1/50MHz) tq = 0,1µs <- (0,02 * 5) The bit time ist 1µs <- (0,1 *( 7+1+0+1+1)) -> baudrate is 1 Mhz -> 1/1µs But in the outgoing frames, I measure a bit time of approx. 3µs. Enlarged: How can that be? What did I do wrong or overlook? Thank you and best regards, HiST
Hi there, I have been trying to send a receive messages via serial with the transmit and receive commands on a H7A3ZI Nucleo board, however when I build the code and run it with the debugger I cannot see the messages in the console or command shell console. I have used a 115200 Baud rate, and connected to COM 3 with 8 bits and 1 stop bit. This has also been set up in my device manager. When trying to connect the command shell console it is intermittent when connecting, and normally needs to be physically disconnected to reconnect. I am using suart2 with PA2 as the TX, and PA3 as the RX. SB16 and SB17 are soldered, and SB12 and SB64 aren't soldered. please let me know what else I could try, here is a example of the code that I have tried to run...
I use stm32f427 I find the NetxDuo can run so good.But When I want to run ptp_client.c I find a lot of difficultsCan ptp_client.c support E2E ? or only P2P, If support both how to configure ?I use a master clock that only can support E2E , It can't work I debug it for a long time ,but can't find why it don't work
We would like to connect LCD panel with parallel 8080 type LCD interface. The pin can be setup as follows. LCD_CS --- FMC_NE1 LCD_RD --- FMC_NOE LCD_RW --- FMC_NWE LCD_ReadResistor -- FMC_A16 LCD_D[0:15] --- FMC_D[0:15]/AD[0:15]If the FMC_A16 set for LCD register select, I think we don't need to use multiplexed mode.Also Cube IDE seems have "LCD interface" as Memory Type on FMC configuration. But, on the other hand, the note for FMC on the datasheet (17page DS14258 Rev5) say"2. For the LQFP100 package, only FMC Bank1 is available. Bank1 can only support a multiplexed NOR/PSRAM memory using the NE1 chip select." So, I'm confused for now.Can we use 16-bit parallel LCD interface on FMC with STM32H563VIT6 LQFP100 package?And, if we can use "LCD interface" memory type on FMC configuration, is there any specific care needed?
Hello, I’m trying to read temperature from some NTC10k sensors using a NUCLEO-H7S3L8 board. The datasheet says it has 14 ADC channels available, but I’m not sure how to wire the sensors correctly. I am using all channels in single ended modeEach sensor is a simple 2-wire heat-dependent resistor (variable resistance in ohms). They don’t have their own power supply and only change resistance with temperature. My questions are:How do I need to wire the NTC10k to an ADC channel so that the MCU can actually measure something?Do I need a voltage divider or extra resistor in the circuit?If I want to connect several of these sensors (up to 14), do I need one resistor per sensor, or is there a simpler way?Thanks in advance.
I made a custom 4 layer board using STM32H735VGT6 (schematic and PCB layout attached).I am trying to upload code into the MCU flash via ST-LINK V2, but it fails to connect.At first, I realized that I had not connected VDDLDO to 3.3V, which I thought was the problem. However, even after connecting it to 3.3V, I still cannot upload code.Error from CubeIDE:STMicroelectronics ST-LINK GDB server. Version 7.11.0Copyright (c) 2025, STMicroelectronics. All rights reserved.Starting server with the following options:Persistent Mode : DisabledLogging Level : 1Listen Port Number : 61234Status Refresh Delay : 15sVerbose Mode : DisabledSWD Debug : EnabledInitWhile : EnabledTarget no device foundError in initializing ST-LINK device.Reason: No device found on target.I also tried the “hold reset while clicking connect, then release” method, but it still fails.This is a newly soldered MCU. I have not uploaded any code to it yet. I also tried switching BOOT0 from low to high to enter system bootloader an
Hi, I am currently working on a custom board design based on the STM32N657X0H3Q microcontroller. To ensure correct implementation and speed up the design process, I would like to study the reference Altium design projects of ST’s official boards.Specifically, I am looking for the Altium project/source design files (schematics + PCB) for the following boards:STM32N6570-DK (STM32N6 Discovery Kit)NUCLEO-N657X0-Q (STM32N6 Nucleo-144 Board)The PDFs of the schematics are available, but having access to the full Altium project files would help me greatly in understanding layout practices, power distribution, signal routing, and peripheral connections.Could you please guide me on how I can obtain these design files?
himy Hex file have a 90kB .text session size,and I want to flash it into stm32G474cbtx mcu which have 128kb dual bank flash. I use stm32cubeProgrammer v2.19.0 and stm32CubeIDE v1.19.0. if the option byte DBANK is 1, I can successfully flash it using stm32cubeProgrammer, but fail to flash it usingstm32CubeIDE when I start debug session. The error mesage is "operation exceeds memory limits". if the option byte is 0, then both tools can flash successfully. I know when DANK is 1, stm32g474cbtx 's two bank address is not continuous, so I think in this case, both tools should fail to flash,but why stm32cubeProgrammer can succussfully flash it (and the program runs normmally) ?
Hello ST,I have been working on trying to get the FreeMODBUS library working on the NUCLEO-F446RE development board. The FreeMODBUS library can be found here,https://github.com/cwalter-at/freemodbusI am having trouble getting the USART port working correctly,So far I am able send packets to the microcontroller and get interrupt calls to the USART2_IRQHandler();However calling HAL_USART_Receive_IT(&uart_mb, (uint8_t *)byte, 1) only returns zeros in byte.BOOL xMBPortSerialGetByte(CHAR *byte) { //*byte = MB_USART->RDR; HAL_USART_Receive_IT(&uart_mb, (uint8_t *)byte, 1); //HAL_UART_StateTypeDef state = HAL_UART_GetState(&uart_mb); //*byte = MB_USART->DR; return TRUE; }I am configuring the USART port in the following manner,BOOL xMBPortSerialInit( UCHAR ucPORT, ULONG ulBaudRate, UCHAR ucDataBits, eMBParity eParity, UCHAR stopBit) { HAL_Delay(10); // Enable UART peripheral clock MB_USART_CLK_ENABLE(); HAL_Delay(10); // Enable GPIO clocks MB_TX_GPIO_
STM32N6570-DK STM32CubeProgrammer,Unable to connect using STM32CubeProgrammer software ST-LINK, target not found,Error: No STM32 target found! lf your product embedsDebug Authentication, please perform a discovery usingDebug AuthenticationHow to solve it
Hi All. So, I'm currently working on a project that I need some assistance with... I'm using the HRTimer and ADC. Timer A and Timer E both control my gate drive outputs; they're variable frequency. I also have Timer F, which controls my ADC sampling. Timer F runs at a much higher frequency than the Master timer, 10 times, roughly. This way, there are 10 equally spaces samples from my incoming signal that I can analyze for every period of the master timer. My incoming signal is of the same exact frequency as my outputs, just phase shifted by some degree. The ADC samples are put into an array by DMA, circular style. I'm creating a small array of 10 samples containing a reference sine, and cosine waveform. This is effectively my "window", which, for every 500 samples I collect (technically 1000, ping pong buffer style) I multiply my input waveform by the sine and cosine waveforms sample by sample, taking care to roll over every 10 samples for my sine and cosine tables. I th
I'm using an STM32H743VIT6 (rev V in LQFP100 package), powered at 3.3V and programmed with STM32CubeIDE.I'm using the ADC2 and ADC3, and also want to use the VREFBUF voltage (available on VREF+ pin) programmed for 2.5V. The *.ioc file is generated with:VREFBUF Mode -> internal voltage referenceInternal Voltage reference scale -> SCALE 0: around 2.5VUnfortunately I measure 3.3V on pin 20 (VREF+) instead of 2.5V!In the generated file stm32h7xx_hal_msp.c, in the HAL_MspInit(void) function I see: /** Enable the VREF clock */ __HAL_RCC_VREF_CLK_ENABLE(); /** Configure the internal voltage reference buffer voltage scale */ HAL_SYSCFG_VREFBUF_VoltageScalingConfig(SYSCFG_VREFBUF_VOLTAGE_SCALE0); /** Enable the Internal Voltage Reference buffer*/ HAL_SYSCFG_EnableVREFBUF(); /** Configure the internal voltage reference buffer high impedance mode*/ HAL_SYSCFG_VREFBUF_HighImpedanceConfig(SYSCFG_VREFBUF_HIGH
Hi,I am currently working on integrating Modbus RTU communication using the STM32H747I-DISCO board. Unfortunately, I have not been able to find any official example code or reference implementation specific to this board.I have already attempted to integrate the protocol using a sample code I put together, but it is currently not working as expected. I would greatly appreciate it if you could review the attached code and let me know if there are any issues or missing components.If you also have a working example or any official reference for implementing Modbus RTU (ideally using UART, FreeRTOS, and the CM4 core), it would be extremely helpful.Thank you in advance for your support.
Hi,I tried to connect a LoRa module to an STM32 controller using LPUART1. I am using HSI as the clock source and have configured PB10 and PB11 as UART RX and TX, respectively. However, I am not receiving any data while using the HAL driver API. In the Arduino IDE, I used the dedicated library for my LoRa module, and it worked.Could anyone please explain why I am facing this issue and why I cannot replicate the same functionality in STM32CubeIDE? Note Baud rate is 9600Thanks.
Dear All,I am currently working on a 10 kW motor drive for controlling a PMSM in an automotive traction application, utilizing a Field-Oriented Control (FOC) algorithm. I am facing a challenge with position extraction from the motor’s Hall sensors.The motor is equipped with three Hall sensors spaced 120 electrical degrees apart. However, due to sensor misalignment or misplacement, I am experiencing position jumps at n*60 electrical degrees. This issue appears to stem from the position extraction algorithm. Specifically, the Hall sensors' XOR logic determines position in 60-degree segments of the electrical cycle. To obtain a continuous angle, I interpolate between these segments using speed summation.I have tested various smoothing methods, including PLL and others, which work well up to around 3000 RPM. Beyond this speed, I observe current spikes leading to torque ripple and an audible buzzing noise from the motor.I will attach plots of the extracted position and Hall sensor signals f
I'm designing a custom PCB using an STM32F103 microcontroller to control a triac-based light dimmer. The firing angle for the triac is determined by reading the voltage from the potentiometer.The potentiometer output is routed through a header and then directly to an analog input pin (PA0) of the STM32, which uses the built-in ADC to read the value. For power supply filtering, I'm using an LC network to separate the analog supply (VDDA) from the digital supply (VDD), with the usual decoupling capacitors.This project is part of my effort to learn how to build custom PCBs and improve my practical electronics design skills.My main question:Should I add an RC low-pass filter right at the analog input pin (PA0) for improved ADC readings?The potentiometer wires might be picking up noise.I want smooth, stable ADC readings to avoid flicker or erratic dimming.Does the STM32 ADC have any internal filtering/signal conditioning?If I should add an RC filter, what typical resistor and capacitor valu
I have created TCP client on my STM32H723 module. Now I am stress-testing the code by abruptly closing the server before the TCP client could connect. As per my code it retries TCP connection after 30 seconds. But after multiple times the code freezes. I debugged it and it was getting stuck in tcp_fasttmr function: All the conditions under the while are not satisfied so it directly jumps to line 1519 and back 1489.
Hi there;I'm trying to muddle my way through my first design with a motor driver that includes current sensing. This is for a battery-powered device, operating with an stm32f4 at 3.3v. My motor is a small gimbal-style motor, which I intend to run at 3.3v, and which I estimate will draw current ranging from 0.1-0.4A. I think I would like to run at a PWM that is at least 20kHz, though it would be nice to go faster to avoid switching frequencies that might be irritating to pets. Maybe that's 25-40kHz (center-aligned PWM)? The STSPIN233 seems very appealing to me, but - because I'm new to this - I'm struggling a little navigating the ADC front end amplification necessary for this. I'm aware I need amplification of some sort - I have several dozen tabs open in my web browser here to try to understand the differences between using an op-amp vs. a current sense amplifier for this. I am having trouble finding many specific resources for this in ST's library. TI has a ton of stuff, bu
I'm trying unsuccessfully to erase a 4K sector at 0x73ff0000 using STM32CubeIDE code, but the STM32CubeProgrammer works fine. I've tried using BSP_OSPI_NOR_Erase_Block() and MX25LM51245G_BlockErase() with no luck. My code base is the HTTP_IOT_WebServer example. My basic code is (where addr=0x73FF0000 and EFLASH_SECTOR_MASK=0x03FFF000) ------------------------------------------- BSP_OSPI_NOR_DisableMemoryMappedMode(0); rc = MX25LM51245G_BlockErase(&hospi_nor[0], MX25LM51245G_SPI_MODE, MX25LM51245G_STR_TRANSFER, HAL_OSPI_ADDRESS_32_BITS, addr & EFLASH_SECTOR_MASK, MX25LM51245G_ERASE_4K); BSP_OSPI_NOR_DisableMemoryMappedMode(0); ------------------------------------------- Any idea why this doesn't work? Is the Programmer doing anything I'm not doing? -Marty
I wanted to do a full chip erase using STM32Programmer (I am trying to debug a custom bootloader) but kept getting the error "Mass erase operation failed. Please verify flash protection".I sent the following option byte screenshot to ChatGPT....ChatGPT said... Problem: PCROP ProtectionIn your PCROP Protection section:PCROP1_STRT = 0xFFFFPCROP1_END = 0x0000PCROP_RDP is enabledThis is an invalid PCROP range: start at 0xFFFF, end at 0x0.That effectively protects a huge chunk of flash against erase/program.So even though WRP and RDP are fine, PCROP is blocking your erase.FixIn STM32CubeProgrammer → Option Bytes → PCROP:Set PCROP1_STRT = 0xFFSet PCROP1_END = 0xFFUncheck PCROP_RDP unless you specifically need PCROP linked to readout protection.Apply changes (Program Option Bytes → Reset).Retry Full Chip Erase with ST-Link. I did the suggested fix but it obviously didnt work.But worse still, I cant even change the option bytes back to as they were because I get the
I'm currently testing a board that I designed incorporating an STM32WLJC55. The RF section is based on the 433 MHz MB1389E reference, with component changes due to availability issues and some PCB layout revisions. The design does successfully transmit and receive 433 MHz LoRa, however I want to compare and verify RF performance against the MB1389E/Nucleo-WL55JC2 developers' board. Is there a way to generate a continuous RF carrier at a set frequency so I can do RF power meter/spectrum analyser tests?
Hello,after some issues I was able to communicate with EvalBoard MB1801D and MB1803B (STM32WBA55CG) and the STM32CubeMonitor-RF Tool Version (2.18.0) .In the first step, I wanted to use the RF board MB1863 (STM32WBA52CG) in conjunction with the MB1801D board to be able to communicate with the RF monitor here as well.To do this, I generated a new project in the STM32CubeIDE (version 1.19.0) with the STM32WBA52CG µC and configured the pins using the .ioc file (see appendix) and copied the settings for the software pack "STM32_WPAN" from the TransparentMode example project of the WBA55.I can successfully flash the project to the board, but then I cannot establish a connection with the RF monitor.Is there an alternative method to get the BLE_TransparentMode running on the STM32WBA52 or am I overlooking a setting?Would it be possible to use the TransparentMode example project of the WBA55 and only change the linker File xxFlash.ld from the wba55 to the wba52? Thank you very much!
I’d like to understand the practical trade-offs — for example, how each level influences execution speed, flash usage, and RAM consumption. Also, are there any best practices or common pitfalls when choosing an optimization level for STM32 projects?
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.