Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi,Does anyone have any idea about how to easily expand STM32L476RG NUCLEO board GPIO pins to the breadboard?I can use jumper wires but I am looking for another way like "the Raspberry Pi breakout kit" which is more neat and clean.ThanksPeyman
Hi,We are currently using STM32H7S7 MCU with display and similar USB C circuit from the developer board.I wanted to connect a Web camera and to be able to display video from the screen.I wanted some help and guidance on where to find the driver?does ST have any driver I can use for getting the USB web camera data. Thanks
Hello,I encountered an error when using MCSDK 6.4.1 (Motor Control Software Development Kit 6.4.1) to configure the STM32G431VBT for using the three-resistor internal operational amplifier and performing external differential gain sampling. I would like to ask how to resolve this issue.The following images show my configuration process:
I am using stm32g431c8u6 microcontroller . I have enabled timer 2 channel 3 for alternative pin of PB10 and I have enabled channel 4 for PA3 pin. I set counter perioud 499 and prescaler value =0.When I plug the debugger and run the code only channel 4 generate PWM signal and channel 3 does not generate PWM signal.I am using DRV8845 motor drive to control 2 motors. It has two direction pins t control two motors. Below I linked the MCU pin configuration.This is my code to move forward the 2 motors.HAL_GPIO_WritePin(GPIOA,GPIO_PIN_2,0);HAL_GPIO_WritePin(GPIOB,GPIO_PIN_10,1); HAL_GPIO_WritePin(GPIOB,GPIO_PIN_0,1);HAL_GPIO_WritePin(GPIOA,GPIO_PIN_7,1);TIM2->CCR3 = 400; //out_pid;TIM2->CCR4 = 400;//out_pid; Please guide me to how to enable PWM signals for both channels. Thank you.
Hello all, I have Dev a new pcb base on STM32h743IIT6 with the below hardware: SDRAM: 256-W9825G6KH-6 FLASH : 25Q256JVEN LCD: Module LCD tactile capacitif RGB IPS de 7 pouces from LCwiki buy on aliexpress( it's a native rgb888 no driver )Total Hardware around : 70 euro. Here is the FMC and LTDC config: SDRAM: QSPI FLASH: LTDC: I have follow this post cube ide project https://github.com/JIU10/stm32h7_ltdc_dma2d/tree/master and it's work.But now i am lost how to go further and i have some questions.1 With the ltdc driver function below can i implement lvgl if yes how can i do if they are some link ? 2 What is the best option to make and interactive lcd panel.2 I am coming from esp32 world so I want my st32 lcd would work like famous tftespi lib of Bodmer.REF pcb Board rgb888 24
Hello @D.Botelho @mƎALLEm I had an issue of ThreadX and FDCAN transmit as below. I use the stm32g474 and config a threadx and fdcan with stm32cubemx, so far it works well. but when i add some fdcan transmit code, it comes strangely. the code as below void appThread2(ULONG thread_input) { while(1) { if(fdcan1_RXFlag == 1) { fdcan1_RXFlag = 0; // Clear the receive flag for(int i = 0; i < 8; i++) { fdcan1TxData[i] = fdcan1RxData[i]+1; // Copy received data to transmit buffer } my_FDCAN1_Transmit(fdcan1TxData); // Echo back the received data printf("FDCAN1 Received data: "); for (int i = 0; i < 8; i++) { printf("%02X ", fdcan1RxData[i]); } printf("\r\n"); } // // 发送 0x12 fdcan1TxHeader.Identifier=0x012; fdcan1TxData[0] = (dis_sensor_data1.dis1 >> 0) & 0xff; fdcan1TxData[1] = (dis_sensor_data1.dis1 >> 8) & 0xff; fdcan1TxData[2] = (dis_sensor_data1.dis2 >> 0) & 0xff; fdcan1TxData[3] = (dis_sensor_data1.dis2 >>
Hello. I'm trying to configure the STM32C011J4M6 to output SPI in Transmit Only Master mode. However, as soon as I turn on SPI in STM32CubeIDE and program it, the uC stops behaving properly. I can't transmit any data and the clock pin stays high with periodic spikes down to ground. My best guess is that this has something to do with the clock pin being assigned to the reset pin.I'm able to program it to toggle GPIO separately, but as soon as I try to change the reset pin to a GPIO, all the GPIO stop toggling and the reset pin does the high with spikes thing. That seems to point to this being a "reassign the reset pin" issue than a SPI issue.Is CubeMX just not disabling the reset pin properly? I don't have anything connected to the uC except the programming SWD clock and data lines, as well as the reset line connected to the programmer.I've never tried to repurpose the reset pin before, but I can't imagine ST would add an unusable SPI peripheral.The only changes I've made to main.c
I am using two NUCLEO-U385RG-Q boards for I3C communication—one as the Controller (Master) and the other as the Target (Slave). When the Controller’s RX length exceeds the Target’s TX length, after the first call to HAL_I3C_Ctrl_Receive_IT the Controller appears to enter an abnormal state; on the second call to HAL_I3C_Ctrl_Receive_IT, it hangs and an abnormal waveform is observed. After the first call, is there a way to restore the Controller to a normal state? Regarding Target-controlled TX length, please refer to I3C Specification, Section 5.1.2.3.4, which states:In I2C, Read from Target has the issue that only the Controller ends the Read, so the Target has no ability to control the amount of data it returns. In I3C SDR, by contrast, the Target controls the number of data Words it returns; but it also allows the I3C Controller to abort the Read prematurely when necessary. Master Rx = 3, Slave Tx = 2 (First & second calls) Master Rx = 2, Slave Tx = 2 (F
Setup DescriptionMCU: STM32G070REPeripherals:ADC1 sampling 11 channels (IN0–IN8, IN17, IN18).DMA1 Channel1 configured circular, PERIPH→MEMORY, increment on memory.Timer 15 used to generate a 3 ms integration window (for TPIC8101 knock sensor).CC1 = start of window (INT pin LOW).CC2 = end of window (INT pin HIGH) and also used as TRGO (OC2REF rising edge) to trigger ADC conversions.(ADC should only come into picture when INT pin goes high)DMA buffer: uint16_t adc_raw_buffer[NUM_CHANNELS] where NUM_CHANNELS = 11.What WorksTIM15 interrupts (CC1 and CC2) are firing as expected.GPIO pin toggles correctly at CC1 and CC2.TRGO is configured as LL_TIM_TRGO_OC2REF.What Does Not WorkDMA1_Channel1_IRQHandler never fires.The DMA buffer (adc_raw_buffer[]) remains unchanged.It looks like the ADC never actually starts conversions on TRGO.  
Hello everyone,I am working on a custom board with STM32H723VGT6 and LAN8742A but after much troubleshooting, pinging has remained unsuccessful. I am trying to use LwIP without RTOS. I have a NUCLEO-H723ZG that I have been able to successfully ping without RTOS, but when I use the same CubeMX configurations (except the RMII pinout) on my custom board, it does not work. I tried to very closely follow the Ethernet schematic for the NUCLEO-H723ZG, the only main changes I made were the pinout (since I am using VG instead of ZG) and using two ESD protection diodes instead of one for ease of routing. The RMII pinout follows what is presented in CubeMX. Here are the following code modifications I have made, based on the H723ZG example in this repo https://github.com/stm32-hotspot/STM32H7-LwIP-Examples.git:Added to STM32H723VGTX_FLASH.ld: .lwip_sec (NOLOAD) : { . = ABSOLUTE(0x30000000); *(.RxDecripSection) . = ABSOLUTE(0x30000100); *(.TxDecripSection) } >RAM_D2 /*
My timer setup in input capture mode. The ICPrescaler value is set to TIM_ICPSC_DIV2, meaning a capture event will occur on the falling edge of every second pulse. I need to handle an edge case where I need to "reset" the whole input capture system. If I need to handle a reset in-between the first and second triggers, then the internal prescaler counter will be at 1 when I reset/reconfigure, and then the very next input edge will trigger a capture instead of waiting for the full prescaler count of 2 In order to handle this edge case I need a way to "reset" the internal prescaler counter, however I don't think there is a HAL function to do this.
I am using the STM32U575 on a custom board and see that AN2606 indicates PG10 becomes a SPI MISO output in bootloader mode. I would like to connect this same SPI port to another device with the STM32 in master mode for the user application. In order to avoid contention on this signal, I am hoping that in bootloader mode the SPI MISO output is tri-stated if the associated NSS is negated (high). I have seen a couple of posts that touch on this question but I have not been able to confirm the behavior. For example: https://community.st.com/t5/stm32-mcus-products/spi-pin-states-during-bootloader-detection-phase/m-p/696205 Another post for a different part mentions that the SPI port can be setup to support multiple slaves by tri-stating MISO when not selected, but I don't know if this is the default behavior in bootloader mode for this device. Thank you for any feedback. -Jason
As the title says, the STM32G47 PA9 pin appears to be set high in boot mode opposed to pulled high though a resistor which is states in AN2606. This is becoming a problem because it introduces negative behaviors in our design when we try to reprogram. Is this a known behavior documented elsewhere?I have gotten pretty frustrated when migrating from the STMF3 family to the STMG4 since there are many more pins being pulled or set in one direction or another during boot mode. Is there any way to disable some of these hardware defined communications protocols during the boot loader mode initiated by the BOOT0 pin?
Hi! I have an issue with textArea flickering or wrong some characters, which you can watch in this video:https://youtube.com/shorts/gQtXfpys8fo?si=BS74DsFX03yeLcDTI would like to help in Mpu settings I have Stm32H753 mcu,32MB SDRAM with 0xC0000000 address16MB FLASH with 0x90000000 address Thank you!
Hello guys.I designed a custom board around the STM32F411CEU6. On this board, I have a switch and a screw terminal header, both of which are intended to be used has GPIO inputs. However, with both I've had a struggle working with GPIO inputs and interrupts. Attached is my current code, with my button being located on pin PA0. I intend to use pins PA1 and PA0 as input, with PA1 attached to a mat that activates similar to a switch. What's more confusing is that my display and touch input does indeed work. In fact, even LVGL works on this microcontroller and display. It's only the GPIO interrupts and inputs that I have an issue with. I've also attached a picture of my schematic. Any help is appreciated!/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2025 STMicr
I have installed MCSDK 6.4.1I can run the workbench (MotorControl Workbench_6.4.1) without any problem.But i cannot run the Motor pilot application.At first there was an error stating "The code execution cannot proceed because MSVCP140.dll was not found Reinstalling the program may fix this problem"I then installed "Microsoft Visual c++ 2015-2022 Redistributable (x64) 14.44.35211This error is not present anymore but nothing is starting when clicking on the motor pilot icon, no new window appears. I tried reinstalling the mcsdk without any change observed.I can see the following in the MotorPilot.log :2025-08-27 17:30:11.844 INFO-:MotorPilot is running in C:/Program Files (x86)/STMicroelectronics/MC_SDK_6.4.1/Utilities/PC_Software/STMotorPilot 2025-08-27 17:30:11.844 INFO-:Application is starting : MotorPilot version:6.4.1 2025-08-27 17:30:11.844 INFO-:ini file path=C:/Users/vboxuser/AppData/Roaming/ST Microelectronics/ST Motor Pilot.ini 2025-08-27 17:30:11.850 INFO-:Polling time out is
Hello everyone,How to calibrate the hse clock, I use NUCLEO-WL33CC2 boards.Best regards
Hello,On the STM32N6, I am using DCMIPP_PIXEL_PACKER_FORMAT_YUV422_1.I am seeing the correct coloring when using CMW_MIRRORFLIP_NONE and the incorrect coloring when setting CMW_MIRRORFLIP_FLIP. Any help getting the correct DCMIPP_ColorConversionConfTypeDef color_conf for the CMW_MIRRORFLIP_FLIP ? ... if (HAL_DCMIPP_PIPE_EnableRedBlueSwap(&hcamera_dcmipp, DCMIPP_PIPE1) != HAL_OK) { Error_Handler(); } #define N10(val) (((val) ^ 0x7FF) + 1) DCMIPP_ColorConversionConfTypeDef color_conf = { .ClampOutputSamples = ENABLE, .OutputSamplesType = DCMIPP_CLAMP_YUV, .RR = N10(26), .RG = N10(87), .RB = 112, .RA = 128, .GR = 47, .GG = 157, .GB = 16, .GA = 16, .BR = 112, .BG = N10(102), .BB = N10(10), .BA = 128, }; if (HAL_DCMIPP_PIPE_SetYUVConversionConfig(&hcamera_dcmipp, DCMIPP_PIPE1, &color_conf) != HAL_OK) { Error_Handler(); } if (HAL_DCMIPP_PIPE_EnableYUVConversion(&hcamera_dcmipp, DCMIPP_PIPE1) != HAL_OK) { Error_H
Hi, I am trying to use the disco-B-G431B-ESC1 board to move my gimbal motor. I am using the simpleFOC library example. The problem I am facing is that the motor is not moving. The motor is vibrating at a pole. If I move the motor by force then it vibrates at the next pole but does not start to rotate. I have checked with different motors but the issue persists. I have tried this same code with other gimbal controllers and it works fine. The motors are not faulty as I have tested them. Could anyone please advise me what to do?Below is the code I am using to run the motor at constant velocity in open loop mode - // Open loop motor control example #include <SimpleFOC.h> // BLDC motor & driver instance // BLDCMotor motor = BLDCMotor(pole pair number); BLDCMotor motor = BLDCMotor(7); // BLDCDriver3PWM driver = BLDCDriver3PWM(pwmA, pwmB, pwmC, Enable(optional)); BLDCDriver3PWM driver = BLDCDriver3PWM(PA8, PA9, PA10); // Stepper motor & driver instance //StepperMoto
I have been struggling with this chip for a few days now. I have code up for the STM32F072, and the STM32F100 series chips, but the GPDMA in the STM32U535 is baffling me. And no, I am not a big fan of the product notes for the GPDMA, while I've gone through them, I couldn't find much to help. Here's the challenge; the chip fails immediately with a DMA_FLAG_DTE error, with the trigger overrun flag being set in the CSR. No idea why or where to go next after 2 days of trying to troubleshoot this. Here is the MXCube configuration: In the code, there is a simple 8Khz WAV file stored in the "tinkles" array. Using the standard generated code from MXCube, I have attempted to just play it out the DAC with the following calls: HAL_DAC_Start_DMA(&hdac1, DAC_CHANNEL_1, (uint32_t*)tinkles_wav, tinkles_wav_len, DAC_ALIGN_8B_R);HAL_TIM_Base_Start(&htim2); It *is* an 8-bit array, and I am not sure if that may be part of this. Here is the code: ex
I just had a quick question to clarify my understanding of how byte allocation works for thread stacks in the ThreadX RTOS. I've seen the official examples use a byte pool and then allocate bytes from that pool before creating a new thread. However, in other places I've seen something as follows where the bytes are allocated statically: /* Private variables ---------------------------------------------------------*/ uint8_t thread_stack[TX_THREAD_STACK_SIZE]; TX_THREAD thread; /* Private function prototypes -----------------------------------------------*/ VOID thread_entry(ULONG thread_input); /** * @brief Application ThreadX Initialization. * memory_ptr: memory pointer * @retval int */ UINT App_ThreadX_Init(VOID *memory_ptr) { UINT ret = TX_SUCCESS; TX_BYTE_POOL *byte_pool = (TX_BYTE_POOL*)memory_ptr; (void)byte_pool; tx_thread_create(&thread, "thread", thread_entry, 0, thread_stack, TX_THREAD_STACK_SIZE, 15, 15, TX_NO_TIME_SLICE, TX_AUTO_START); return ret
The codebase is generated by CubeMX and now I'm facing issues during debug.debug method is SWD using ST-LINK V2.In debug mode, after resume fron HAL_Init(); , the code will crashed into system memory zone and have no debug information.Break at address "0x1fff12ca" with no debug information available, or outside of program code.the location of the address varies around 0x1fffxxxx sometimes.to be exact, the crash will happen when:Initialize the IWDGUsing Flash R/W OperationStart Timer (But not Init)In STM32G031, 0x1fff12ca is located at system memory area where it houses the factory bootloader.What confuses me is, I have another code project that has basically the same start up code at main() but it works just fine (in another STM32G031, and hardware connection is the same regarding BOOT0 pin). Tried Clean project and rebuild, restart IDE and change optimization, changing minimum heap and stack, absolutely no help whatsoever. I have not try to load
Is there any mapping document like this one on the H7S3L8 as there is for the H743ZI-B01?I only find this document:https://www.st.com/content/ccc/resource/technical/document/user_manual/group0/26/49/90/2e/33/0d/4a/da/DM00244518/files/DM00244518.pdf/jcr:content/translations/en.DM00244518.pdf Thanks for your help!
Hi, I have been working with a STM32U575 MCU and something strange has happened that I spent a lot of time trying to find the root cause for it and I am not able to understand what is wrong. I work with I2C slave interrupts and have FreeRTOS running. I realized FreeRTOS gets stuck in checking priorities when a FromISR function is called from the I2C handler. Long story short, checking all the configs many times, I checked what are the priority of the IRQs? HAL_NVIC_SetPriority(I2C1_EV_IRQn, NVIC_IRQ_PRIOR_I2C_SLAVE_EV, NVIC_IRQ_SUB_PRIOR_I2C_SLAVE_EV); HAL_NVIC_SetPriority(I2C1_ER_IRQn, NVIC_IRQ_PRIOR_I2C_SLAVE_ER, NVIC_IRQ_SUB_PRIOR_I2C_SLAVE_ER); HAL_NVIC_EnableIRQ(I2C1_EV_IRQn); HAL_NVIC_EnableIRQ(I2C1_ER_IRQn); PRINT("I2C1_EV raw priority: %lu\n", NVIC_GetPriority(I2C1_EV_IRQn)); PRINT("I2C1_ER raw priority: %lu\n", NVIC_GetPriority(I2C1_ER_IRQn)); PRINT("__NVIC_PRIO_BITS = %d\n", __NVIC_PRIO_BITS); PRINT("configPRIO_BITS = %d", configPRIO_BITS); having
I have the STLink V3MINIE. When connected to the PC the red power LED is on. But I can't program any device because there is not target voltage. ST Prog (v2.17) shows Target voltage 0.00 VHow can I fix this? Is there a jumper or solder connection missing on the stlink? Or is the board damaged?Thanks for help!
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.