Join discussions in the Product Forums. Ask questions, learn from your peers, and share insights on ST solutions to accelerate your design journey.
Most recent activity
Hello!I am writing a program for STM32F769I-DISCO board that uses FreeRTOS and LwIP to communicate with the server and send data to it. It generally works, but unplugging and plugging Ethernet cable (especially doing it several times within a few seconds) usually causes Ethernet DMA errors which make program stop calling HAL_ETH_IRQHandler and thus board can't even try to reconnect to server. I don't know how I should handle those errors and where to look for information that could offer a solution to my problem.Any kind of help, whether a direct response or a link to helpful resources, is appreciated. Ethernet DMASR registerheth error codeMPU and Ethernet descriptors EDIT 1: Added ethernetif.c and lwip.c files to attachments and screenshot of MPU configuration.
Hi Guys. I am just trying to receive data from sensors accommodated on STEVAL-BCN002V1B (Blue Tile board) using application "BLESensorDemoCentral" running on STEVAL-IDB008V2 board.I am able to detect all services that are advertised by Blue Tile board using "BLESensorDemoCentral" application running on STEVAL-IDB008V2 board, which are "ServW2ST", "ConsoleW2ST" and "ConfigW2ST" services.But I am still unable to find characteristics of all the three services described above. Q1 : What changes ( Master context object ?, gatt callbacks ? ) shall be done on side of "BLESensorDemoCentral" application running on STEVAL-IDB008V2 to get all characteristics of all services that are received from by Blue Tile board (STEVAL-BCN002V1B)?Q2. Does somewhere exist a code, that I could use as clue ?Thanks for Your hints. PQ.
Edit: fixed a typo -- paHellow! When i debugging an application with a pre-installed bootloader in the Keil environment, I used the following script:FUNC void DebugSetup (void) { // </h> SP = _RDWORD(0x08040800); // Setup Stack Pointer PC = _RDWORD(0x08040804); // Setup Program Counter _WDWORD(0xE000ED08, 0x08040800); // VTOR to Image Base } FUNC void OnResetExec(void) { DebugSetup(); } DebugSetup(); // Debugger Setupin vscode plugin i add to launch.json"preRunCommands": [ "set $sp = *(unsigned int *)0x08018000", "set $pc = *(unsigned int *)0x08018004", "set {unsigned int}0xE000ED08 = 0x08018000", ],And it works fine until I do a reset, is there a way to fix this?For example, something like "postRestartSessionCommands".
I generated my project from the TouchGFX envinroment.Itried to modify the cube file and i got the following issues1. linking error ld.exe: cannot find -l:libnemagfx-float-abi-hard.a: No such file or directory2. linking error ld.exe: cannot find -l:libtouchgfxnema-float-abi-hard.a: No such file or directory3. many basic files are missing like main.h so i cant access any gpio by the name that was given to it in my user files
Hello,I have filed an issue but thought I would post this here for reference, this bug took me quite a while to hunt down and hope to save others time possibly:I have found a memory-safety defect in EEPROM_Emul on STM32U5 128-bit flash-line config.Config:- FLASH_LINES_128B enabled- EE_ACCESS_32BITS enabledIssue:- EE_ReadVariable32bits() passes a single EE_DATA_TYPE buffer:Core/EEPROM_Emul/Core/eeprom_emul.c:758, :762- In FLASH_LINES_128B mode, ReadVariable() writes two words:Core/EEPROM_Emul/Core/eeprom_emul.c:1184, :1185- This writes beyond the caller’s single-word buffer and can corrupt stack/register state (we observed HardFault with corrupted stacked PC).Why “wrong API usage” is not a valid dismissal:1) The API is publicly exposed in this build mode (Core/EEPROM_Emul/Core/eeprom_emul.h:126 with FLASH_LINES_128B APIs also present at :130).2) An exported API must not corrupt memory under any call pattern; unsupported combinations must fail explicitly.3) This component already uses st
Hi,I am using the application core of the STM32WB55VGY6 (not the radio core). I created a CubeMX project and added a simple HAL_GPIO_TogglePin() call. Literally just 2 lines of code in the entire project.When I use a for loop as a delay, the code works as expected. However, when I use HAL_Delay(), it does not.For some reason the SysTick_Handler() is never called... I’ve attached the full project, including the .ioc file. The application code itself is minimal (only two lines).From the configuration:The timebase source is set to SysTickInterrupts are enabledThe SysTick_Handler() is generated, but it is never triggeredHas anyone encountered this on the STM32WB application core, or have any suggestions on what might be missing or misconfigured?Thanks.
Board: NUCLEO-N657X0-Q, revision CI'm trying to communicate with an I2C sensor (VL53L7CX) using the I3C1 peripheral. I have written small routines to try this out based on this tutorial (chapter 9.10.). The problem is: no signal appears on the data pins (measured by an oscilloscope). Not even the slave address. They seem completely dormant.I have tried the "I3C Direct Command DMA" example project on the board. I don't have I3C devices, but measurement yielded digital signal waveforms, as expected. This confirms that the peripheral is in fact operational.What have I missed in my code or hardware setup? Any help is appreciated! Thank you!(I attached the mixed bus code and the .ioc file)
I am using stm32l552zetxq. I am testing standbymode with wakeup from event. According to reference manual RM0438, there are 5 wake up pin to wake up the mcu from standby/shutdown mode wkup1 to 5 with polarity setting option in PWR_CR3 and PWR_CR4. But i could not find whic are those 5 pins in datasheet and in reference manual. By searching i find that PA0,PC13,PE6,PA2,PC5 in a documents ""en.STM32L5-System-Power_control_PWR.pdf" in page no 40. Now my question is what is the wkup no of which pin. It should be mentioned either in data sheet or in reference manual. It be very help full to me kindly provide the document with page no or article number and te documents.
Hi,I have NUCLEO-U083RC-B01. I attached X-NUCLEO-IKS5A1 to it. All jumpers are in default positions.In STM32CubeMX I enabled I2C1 with default values. In the main program I am trying to check the device readiness for MEMS sensors on the X-NUCLEO-IKS5A1, e.g, ISM330IS. HAL_I2C_IsDeviceReady returns HAL_ERROR.I tried to set the I2C1 GPIO configuration Pull-up but no success. The I2C Speed Mode is standard. I check the readiness by:HAL_StatusTypeDef status = HAL_I2C_IsDeviceReady(&hi2c1, ISM330IS_I2C_ADD_H, 3, 100); I am attaching my main file.Thank you in advance.
Hi, so the recent change to make CubeMX a separate app has broken my old project. I am using a Nucleo board and HAL in the project. After a change to the .IOC file I get "stm32h7xx_nucleo_conf.h:50: warning: "USE_NUCLEO_144" redefined". Is there a resource somewhere explaining to to do all of the after the CubeMX split?
Hi,I would appreciate any guidance or best practices for minimizing code size by eliminating unused functions when using the STM32 extension for VS Code with CubeMX generated code (bare metal) as some code I'm writing has become very large.What is the recommended way to configure the compile/build process so that unused functions are not compiled or linked into the final image flashed to the microcontroller, in order to save flash space?I am not familiar with CMake, so if this can be achieved without using CMake, that would be preferred.If custom configuration text is required (for example Makefile edits or similar), could you please outline them in detail and whether these changes are generally safe, or if they require careful consideration.Any clarification on the recommended approach would be greatly appreciated.Thank you
Hi,I am using a STM32C031G6U6 and I would appreciate some clarification regarding HAL timebase and SysTick timebase selection.I want to use SysTick as a 1ms interrupt so in CubeMX I selected SysTick as timebase (see screenshot): None of the other timers - including TIM3 - are not enabled as shown here: These are the other settings: I then generated the code. But there is no sign of any SysTick related functions/handlers in the interrupt file stm32c0xx_it.c as you can see here: /* USER CODE BEGIN Header */ /** ****************************************************************************** * @file stm32c0xx_it.c * @brief Interrupt Service Routines. ****************************************************************************** * @attention * * Copyright (c) 2026 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. * I
Dear all,I'm trying to generate a waveform using DAC OUT1.I configured pin PA4 as analog (works)I configured DAC1 without DMA and it worksI configured TIM6 and it works Then I configured DAC with DMA, configured DMA, but output never changes.Where can I check? I enclose the minimun configuration code: /* DAC Configuration */ if(!(RCC->APB1ENR & RCC_APB1ENR_DAC1EN)) RCC->APB1ENR |= RCC_APB1ENR_DAC1EN; // Enable DAC clock DAC1->CR |= DAC_CR_DMAEN1 | DAC_CR_MAMP1_3 | DAC_CR_EN1; // DMA1 enable | Amplitude 511 |Wave generation disabled | Timer6 TRGO event | Trigger enable | Buffer enable | DAC1_OUT1 enable /* DAC Timer */ if(!(RCC->APB1ENR & RCC_APB1ENR_TIM6EN)) RCC->APB1ENR |= RCC_APB1ENR_TIM6EN; // Enable TIM6 clock TIM6->CR2 |= TIM_CR2_MMS_2; // The update event is selected as a trigger output (TRGO). TIM6->DIER |= TIM_DIER_UIE | TIM_DIER_UDE; //Enable interrupt | Enable DMA request TIM6->EGR = TIM_EGR_UG; // Re-initializes the timer coun
Hello,I may have made a *** of myself on a prototype, and need a bit of help with a work-around. I have an external clock signal on TIM20_ETR (PG5) for some pulse counting stuff. This works.However, I intended to use the same clock signal to trigger TIM2 one-pulse (and later TIM5 one-pulse as well), and thought that I could use tim_trgo from TIM20 to clock them. My problem is that, now I have the prototype PCBs in hand, I cannot figure out how to pass the TIM20_ETR clock signal on to tim_trgo – or if it is even possible.My best guess is that I can set TIM20_CR2 MMS to 0010 (Update), and set PSC and ARR to 0. I have already set TIM20_SMCR to use TIM20_ETR as the trigger source. If I understand the timer functionality correctly, this should give me an update event for each clock pulse.This work-around will make me lose the TIM20 counter feature, but if I can just get the external trigger signal out on tim_trgo, then I can use that to clock TIM1 or TIM8, which can then be used for the act
Starting with the BLE_Heartrate example, I want to measure a voltage on PA8 of STM32WBA65. The BLE_Heartrate project already has the option of using ADCCTRL to read the internal temperature so as to calibrate the BLE power.I have added PA8 as ADC_Channel1 in CubeMX. Do I need to call MX_ADC4_Init or not?How do I achieve a read of PA8 in my timed task? The call to ADCCTRL_RequestRawValue always returns without error, but the value read is always 1 or 2. There is definitely 1.0v on this pin.My code (copied from the temp_measurement.c of WPAN) is:static ADCCTRL_Handle_t LLADCRequest_Handle = { .Uid = 0x00, .State = ADCCTRL_HANDLE_NOT_REG, .InitConf = { .ConvParams = { .TriggerFrequencyMode = LL_ADC_TRIGGER_FREQ_LOW, .Resolution = LL_ADC_RESOLUTION_12B, .DataAlign = LL_ADC_DATA_ALIGN_RIGHT, .TriggerStart = LL_ADC_REG_TRIG_SOFTWARE, .TriggerEdge = LL_ADC_REG_TRIG_EXT_RISING, .ConversionMode = LL_ADC_REG_CONV_SINGLE, .DmaTransfer = LL_ADC_REG_DMA_TRANSFER_NONE, .Overrun =
Hi,i am using STM32G0B1KB and the UCPD peripherals to implement an USB-PD device with 2 ports:- Port 1 is DRP- Port 2 is Source onlyI need the dead battery pulldowns for port 1, so I will connect the UCPD1_DBCCx pins with the UCPD1_CCx pins as described in the manual. However, for port 2 I don't need to present the dead battery pull-downs - when the MCU is unpowered (dead battery) and the user connects some other device (e.g. smartphone) to port 2, simply nothing should happen. The manual states:> If dead battery behavior is not required (for example for source only products), then UCPDx_DBCC1 and UCPDx_DBCC2 pins must both be tied to ground.What resistance can be used to connect those pins to ground? Since I don't have any pins left, can I instead use the DBCC pins for something entirely different? E.g. connect LEDs (to GND) or some other digital output with a weak external pull-down resistor (e.g. 10kOhm)? Will this prevent the MCU from enabling the pull-downs?Thanks!
Board: NUCLEO-N657X0-QRevision: CProblem: MCU cannot pull PA2 to low, only to about 2.5V. I tried it in push-pull and open drain modes. SB6 has been desoldered to isolate it from the analog attenuation circuit, but it didn't work with it soldered. It doesn't work with the "GPIO_IOToggle" example project either, same behaviour. Pulling the pin up to 3V3 works just fine. PA2 is the pin so far which has caused this issue. Holding the reset button makes the pin go high (3V3), indicating a hardware issue, as far as I know. My best guess is it is somehow pulled up through a pull up resistor, but I haven't found any evidence of it in the documentation.I attached some documentation which I investigated.Any help is appreciated, thank you!
I’m working on an STM32 project that uses the ADC to read sensor voltages. However, I’ve noticed inconsistent readings—sometimes fluctuating even when the input voltage is stable. I’ve tried adjusting the sampling time and using different reference voltages, but the problem persists.Has anyone encountered similar ADC accuracy issues on STM32? Are there best practices for minimizing noise or improving stability in these readings? Any guidance or examples would be really helpful.
Hello, hope everyone is well. I'm working on the software side for a micro mouse bot. We're planning on using the STM32G070RB for the microcontroller. For prototyping, I'm using the NUCLEO-G070RB. I separated the ST Link from the board, and wired the two together, as shown below (source and the schematic:( And here's the schematic below: When I flash a program (I use openOCD, but I've also tried STM32CubeIDE), it works until I unplug the ST-Link, then it doesn't seem to work until I plug it back in. Any advice? Am I missing an additional connection? To clarify, the Arduino powers the Nucleo board.
I am currently trying to control a VL53L8CX sensor via SPI communication from the microcontroller mounted on a Crazyflie drone.However, inside vl53l8cx_check_data_ready(), the values in temp_buffer became as follows. Indices [0] to [2] look correct, but at temp_buffer[3], the condition ((p_dev->temp_buffer[3] & (uint8_t)0x10) == (uint8_t)0x10)evaluates to false.What exactly is this comparison checking?When temp_buffer[3] returns an incorrect value like this, which specific part of the communication or control process is likely failing?temp_buffer[0]: 0x0temp_buffer[1]: 0x5temp_buffer[2]: 0xC5temp_buffer[3]: 0xC1
After generating C code for a CMake project, I'd like to use some existing code that I've developed elsewhere.Is there good information or guidance on how to do this properly?For example, should compile my code as a static library and bring it into my project? If so, what is the recommended way to do this (how do I ensure compatibility, etc)? Or should I just copy-paste the source code files and headers into the project?
Hey team,I am working on a project using the STM32F103CB MCU. The device operates from both USB and battery power. The battery configuration consists of four 1.5 V alkaline cells arranged as 2S2P, providing a nominal 3 V supply. USB power is provided at 5 V.When both power sources are connected simultaneously, the PCB is designed to prioritise USB power. However, when the USB cable is unplugged while the battery remains connected, the MCU core resets and the LCD connected to the PCB hangs, resulting in no further operation.I am using the Arduino IDE for development. During debugging, I observed that the setup() function executes when the USB is unplugged, confirming that a reset occurs even though the battery supply is present. This indicates that the USB-to-battery transition is causing a reset condition rather than a seamless power handover.I monitored the MCU supply voltage (VDD) during the USB disconnect event. Initially, the voltage dropped to around 2.0 V. After addin
Hello STM Community,I'm facing an issue with my STM32 device on Windows 11. The Virtual COM Port (VCP) driver is not working, and in the Device Manager, the device is shown as:Unknown USB Device (Device Descriptor Request Failed)Here are the details:Device: own boardTroubleshooting Steps Tried:Uninstalled the STM VCP driver and restarted my PC.Reinstalled the VCP driver from the official STM website.Used a different USB cable and port (all working with other devices).Verified USB settings in the BIOS.Checked Windows Updates for driver compatibility issues.Despite these efforts, the problem persists.Has anyone else encountered this issue with Windows 11? Are there any additional steps or settings I need to configure to resolve this?Thank you for your assistance!Best regards,A.Sujith
Im using i2c on stm32 nucleo and the slave is a cheap imu (mpu6500). Sometimes the bus just gets stuck and doesnt work. And the weird thing is if i plug everything out, flash code again and run it it will not work. Until it randomly works again until the next random fail. I tried with various setups, with pull ups from stm32, with external 5k pull ups.Initially i was running bare metal code but i thought something is worng with the code and switched to HAL to do simple read or write. Everything is the same, randomly works and doesn't work.Did anyone experience and solve something similar?
I've been trying to run code from the external QSPI flash (MT25TL01G) and have gone through an extensive debugging process that ended with a hard lockup. Below is a detailed log of my steps.1. Initial Setup & GoalBoard: STM32H750B-DK (MB1381-H750XB-B01, Product ID DK32H750B$AT1)Tools: STM32CubeIDE, STM32CubeMX (FW_H7 V1.12.1), STM32CubeProgrammer.Goal: Configure and debug an application to run from external QSPI flash at 0x90000000.. Initial Setup & GoalBoard: STM32H750B-DK (MB1381-H750XB-B01, Product ID DK32H750B$AT1)Tools: STM32CubeIDE, STM32CubeMX (FW_H7 V1.12.1), STM32CubeProgrammer.Goal: Configure and debug an application to run from external QSPI flash at 0x90000000.2. Step-by-Step Troubleshooting & ResultsA. CubeMX & Project ConfigurationCreated project via Board Selector (not MCU selector).Verified QUADSPI configured in Memory-Mapped mode (Clock Prescaler=2, CS High Time=2, Flash Size=26).Programming & External LoaderSTM32CubePr
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.