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 developing an application in the simulator, I'm stuck on one bug with the scrollWheel. I have done these two scrollWheel that i update on their respective callbacks like this:void Display_Stages::m_scroll_pressureUpdateItem (Item_To_Select &item, int16_t itemIndex) { item.Update_Text (itemIndex); } void Display_Stages::m_scroll_pressureUpdateCenterItem (Selected_Item &item, int16_t itemIndex) { item.Update_Text (itemIndex); } void Display_Stages::m_scroll_timeUpdateItem (Item_To_Select &item, int16_t itemIndex) { item.Update_Text (itemIndex); } void Display_Stages::m_scroll_timeUpdateCenterItem (Selected_Item &item, int16_t itemIndex) { item.Update_Text (itemIndex); } The problem is that when i make the widgets visible i do scroll.animateToItem (value) so that it can go where the value we want to modify is, and this works fine, but when its a new value and the m_scroll_pressure.animateToItem (value) value = 0, as it is the same va
I am trying to configure the STM32L4A6 to act as an I2C slave on its I2C3 peripheral (PB4 - SDA, PC0 - SCL) with 7-bit addressing (address 0x42). The master is a Raspberry Pi CM4 configured on a software-defined I2C bus (i2c5, using GPIO10/11).Both devices are connected through a TXS0102 level shifter, with proper pull-up resistors (2.2kΩ to 3.3V and 1.8V on both sides).When the CM4 is scanned without the STM32 connected, the I2C bus is idle (~3.16V) and normal clock signals are observed during i2cdetect -y 5.When only the STM32 board is powered but not connected to CM4, the PB4 and PC0 lines are idle at ~3.16V as expected.When both CM4 and STM32 are connected together on the bus:The bus voltage drops to ~960mV.No clock signal is seen during i2cdetect from the CM4 side.Bus appears stuck low.STM32 firmware setup:I2C3 is initialized with HAL_I2C_Init()Slave address is set correctly (0x42, 7-bit)HAL_I2C_EnableListen_IT() is calledInterrupt callbacks (HAL_I2C_AddrCallback, HAL_I2C_ListenCp
Using stm32h743 device. when configuring timer 3 as pwm on channel 1 with phase on channel 2, we see that channel 4 will be influenced by channel 2even though channel 4 was not defined.if i configured channel 3 and 4 for pwm and phase i will have the same problem.- if start only pwm on channel 3 and 4 (phase) and stop it will function well.- if start only pwm on channel 1 and 1 (phase), then start channel 3 and 4 then stop channel 1 and channel 2 while channel 3 and 4 that generate pwm and then stop on channel 1 and 2, channel 4 will also stop.I have configured other timers for pwm non of them had this problem.if I clear timer 3 register using the code below before configuring timer 3 i will steel have the problem__HAL_RCC_TIM3_CLK_ENABLE();TIM3->CR1 = 0;TIM3->CR2 = 0;TIM3->SMCR = 0;TIM3->DIER = 0;TIM3->CCMR1 = 0;TIM3->CCMR2 = 0;TIM3->CCER = 0;TIM3->BDTR = 0;TIM3->EGR = TIM_EGR_UG; // Force update to reset counters and preload regi
I understand you can't erase the same bank you are running code in. Or something like that. But I am confused on the STMG0 because this one only has a single bank. So how do I use Flash to emulate EEPROM if I am using flash to run my code. Everything has been working. not sure what I changed but now when I do an erase I am getting an exception. Maybe I should not do the background interrupt based erase!? Thread #1 [main] 1 [core: 0] (Suspended : Signal : SIGTRAP:Trace/breakpoint trap) HardFault_Handler() at stm32g0xx_it.c:100 0x8013964 <signal handler called>() at 0xfffffff1 HAL_TIM_IRQHandler() at stm32g0xx_hal_tim.c:3,843 0x80192bc TIM6_DAC_LPTIM1_IRQHandler() at stm32g0xx_it.c:268 0x8013a6c <signal handler called>() at 0xfffffff9 HAL_FLASHEx_Erase_IT() at stm32g0xx_hal_flash_ex.c:282 0x8017682 DoEEP() at EEPromMgr.cpp:323 0x800208c DoWrite() at EEPromMgr.cpp:280 0x8001f4e DoEEProcess() at EEPromMgr.cpp:217 0x8001dfc main() at main.c:614 0x80136f6
What instructions do you follow to implement a C++ class and use it in "main.c"?Suppose it's a simple project, like blinking the LED.
Hi,Mouser among other sells the X-NUCLEO-67W61M1 expansion board and also provide a data brief, however the ST website seem to be void of any info on the board. Have anyone a clue to why that is?
Dear Sirs,I am implementing an interface between an STM32H750 and a CanBus device of an electric bike. I have the FDCAN peripheral configured to 250kbit/s (FDCAN clock is 48MHz)I have to interface with devices that use Extended Frames, but the speed is fixed to 250bit/s, so I wanted to use normal mode.First I ninitialize the peripheral as:// Configure TX Header for FDCAN2 CAN_TxHeader.Identifier = 0x03; CAN_TxHeader.IdType = FDCAN_EXTENDED_ID; CAN_TxHeader.TxFrameType = FDCAN_DATA_FRAME; CAN_TxHeader.DataLength = FDCAN_DLC_BYTES_8; CAN_TxHeader.ErrorStateIndicator = FDCAN_ESI_ACTIVE; CAN_TxHeader.BitRateSwitch = FDCAN_BRS_OFF; CAN_TxHeader.FDFormat = FDCAN_FD_CAN; CAN_TxHeader.TxEventFifoControl = FDCAN_NO_TX_EVENTS; CAN_TxHeader.MessageMarker = 0; /* Configure standard ID reception filter to Rx buffer 0 */ CAN_FilterConfig.IdType = FDCAN_EXTENDED_ID; CAN_FilterConfig.FilterIndex = 0; CAN_FilterConfig.FilterType = FDCAN_FILTER_DUAL; CAN_FilterConfig.FilterID2 = 0x0; CAN
I’m trying to use the built-in system memory bootloader on an STM32F103VCT6 and download firmware over UART with STM32CubeProgrammer, but I can’t get the tool to connect. I always see this error: Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again... My setup and procedure: Hardware MCU: STM32F103VCT6 UART pins: PA9 → TX PA10 → RX BOOT0 pulled high to 3.3 V via jumper USB-TTL adapter wired TX↔RX (crossed) & GND common Boot into system memory Set BOOT0 = High (3.3 V) Press and hold RESET (NRST low) Release RESET (NRST high) and wait ~1 s (I then move BOOT0 back to Low before connecting—this seemed necessary to power-cycle the logic) STM32CubeProgrammer UART settings Port: COM ×× (the USB-TTL adapter) Baud rate: 115200 Parity: Even Data bits: 8 Stop bits: 1 RTS / DTR: both low (no hardware flow control) What happens My user app
Moved from Feedback forum. The Feedback forum is for feedback about the forum itself - not product questions. Hello! During project debugging i encountered with follow situation. I have a led connected to PB3 pin (configured as output push-pull with low level by default) on STM32F103 and it turns on during debugger connecting and programming (i program empty flash) process and before the main program entering. I full erased flash then with STM32CubeProgrammer, but PB3 still raises high while debugger(ST-Link V2) is connected.After power toggling i downloaded under IAR debug with st-link other firmware and the pin behaves as expected (stays low). I also generated empty project with CubeMx (only external oscillator and SWD enabled) to see how PB3 would behave. After IAR debug session started it stays low. So, i suppose the problem is in firmware, but i can't understand where i should search it. All projects are generated in CubeMx 6.13 and debugged with IAR 9.60, HAL drivers versi
Hi!I am using STMCube IDE and a STM32G030F6I am trying to implement a code that writes variables to the flash. And I was able to make it work, with some limitations...THIS CODE WORKSunion { uint8_t regs[6]; uint64_t data; } mem; uint64_t *my_pointer; my_pointer = (uint64_t *)0x08007000; // base address of page 14 if(*my_pointer == 0xFFFFFFFFFFFFFFFF) // if the memory is blank { HAL_FLASH_Unlock(); mem.regs[0] = 25; mem.regs[1] = 50; mem.regs[2] = 75; mem.regs[3] = 100; mem.regs[4] = 1; mem.regs[5] = 0; HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, 0x08007000, mem.data); HAL_FLASH_Lock(); }I run this code in the initialization of the board, the first time the program runs it will enter the if...Instead of usingHAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD... I'd like to use:HAL_FLASH_Program(FLASH_TYPEPROGRAM_FAST...But i am not able to make it work...
(I'm using NUCLEO-F103RB)Hello,I'm currently working on a BLDC motor control project using STM32CubeMX and STM32CubeIDE with STM32 TIM1 peripheral.I have configured TIM1 in Center-Aligned PWM Mode 2, with:Prescaler = 3ARR = 899So, PWM frequency is 10kHz (from a 72MHz system clock).In this mode, since the counter counts up and down between 0 and ARR, the counter reaching ARR marks the exact midpoint of the PWM ON time.I would like to trigger an ADC conversion exactly at that point (i.e., at 50% of the ON time).To do this, I thought of using TRGO = Update Event, since the update event happens when CNT = ARR in Center-Aligned Mode 2.However, I am not fully sure if this is guaranteed to occur at that midpoint and whether it's the most precise method.:question_mark:My questions are:Is TRGO = Update Event guaranteed to occur exactly when CNT = ARR in Center-Aligned Mode 2?Is this the best practice to trigger ADC at the center of the PWM ON duration?If not, is there a more accurate or recomme
Hello I wrote a BootLoader program and an app program in flash,BootLoader program will Jump to app. current state is,BootLoader boot takes a longtime,and jump also takes a longtime, the length of time positively correlated with the size of global variables in SDRAM,for example,if a 1M array defined in SDRAM,it takes about 1s,if a 15M defined used in SDRAM,it takes about 10s,i use the Keil IDE,and AC6 compiler. i think,the longtime is the BSS set to 0 takes,so i wrote the sct file like this RW_SDRAM 0xC0000000 UNINIT 0X2000000{*(.SDRAM)},the variables are defined like this uint16_t FrameBuffere[LCD_WIDTH*LCD_HEIGHT] __attribute__((section(".SDRAM"))); I want the variables in SDRAM not to be initialized,but it has no effect,Another article is very similar to my situation ,the solution is "Add the C compiler condition "--no_unaligned_access" to the APP",i I tried, it also has no effect,could you please help me,how to re
Hi all, I'm trying to implement the Independent Watchdog Timer (IWDT) on a TrustZone-enabled STM32U5 controller. My goal is to configure and run the IWDT from the Non-Secure (NS) area. Here’s what I’ve done so far: I have an Azure RTOS ThreadX-based application. I've created a thread that runs every 10 seconds. Inside this thread, I’m initializing the IWDT and then calling HAL_IWDG_Refresh(). I’ve configured the IWDT for a timeout of 11 seconds. However, I’m getting a Hard Fault when this thread executes. What I'm looking for: A working reference or example of IWDT implementation in a ThreadX thread in the Non-Secure area on a TrustZone-enabled STM32 (e.g., STM32U585). Guidelines on how and where to initialize the IWDT (Secure vs Non-Secure). Any TrustZone-related permission issues I should be aware of (e.g., Secure access required to certain RCC or watchdog registers?). Any best practices on refreshing IWDT from a thread instead of an interrupt or bare-metal loop.
Hello,I am attempting to use an STM32H735G-DK development kit to drive an LCD and eventually use TouchGFX to build a menu for a proof of concept I'm working on. I was able to very quickly get a working screen using TouchGFX example board setup for this development kit but I want to use a larger LCD in the future with a custom PCB and I've never brought up an LCD panel before so I am following the bring up guide at https://support.touchgfx.com/docs/development/board-bring-up/board-introduction to make sure I understand all the settings and the process for bringing up the board. Steps 1 and 2 in the guide go well but step 3 is where it stops working properly where it wants you to set up a frame buffer in internal memory and point the LTDC at this location for what you put there to be displayed. I am able to get the background color of the entire screen to change and I can see a black box in the upper left corner where I create a small window the size of my framebuf
I cannot run any example on p-nucleo-stm32wb55 board.i only receive this message on debug. Wireless Firmware version 1.22.1Wireless Firmware build 1FUS version 2.0.0>>== SHCI_SUB_EVT_CODE_READY>>== SHCI_SUB_EVT_CODE_READY - FUS_FW_RUNNING I updated FUS to 2.0.0 and wireless firmware.
Hello Team,Issue Summary:The QSPI flash is not functioning correctly when used with an external loader on my custom board. I utilized the MT25TL01G_STM32H750_DISCO.stldr loader, but the erase operation fails, and the flash does not behave as expected.in above statement. we have enabled QSPI bank-1 as in below picture Using the specifications mentioned above, I successfully implemented custom firmware to enable read and write operations on the MT25QL512ABB8ESF-0SIT flash memory. I followed the "W25Q Flash PART 7 -> QuadSPI Mode" tutorial to achieve this functionality. The implementation has been thoroughly verified and is working as expected.custom board details:-> MCU: STM32H750IBT6-> flash memory: MT25QL512ABB8ESF-0SITUpon comparing the hardware connections, I noticed some differences. Please review them and let me know if there are any mistakes in either the hardware setup or the software configuration. below i have added screen-short of schematic.Circuits:Cu
Hi, I am trying to code up for creating text file in sd card (CN13) and I am implementing this in STM32H757I Eval. I am using STM32 Cube IDE v 1.18.1. I have followed this tutorial,https://community.st.com/t5/stm32-mcus/how-to-create-a-file-system-on-a-sd-card-using-stm32cubeide/ta-p/49830 but the text file is not created in the SD Card when verified through PC. What could be the reason? I have attached the code and ioc file. /* USER CODE BEGIN Header */ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "main.h" #include "fatfs.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ /* USER CODE BEGIN PTD */ /* USER CODE END PTD */ /* Private define ------------------------------------------------------------*/ /* USER CODE BEGIN PD */ #
Hi everyone,I’ve designed a custom PCB using the STM32F411CEU6 and a USB-C connector, but my laptop (Device Manager) and STM32CubeProgrammer fail to detect it as a DFU device or CDC. The board powers up (3.3V LDO confirmed working), and basic SWD flashing works, but USB fails. USB-C Schematic:CC1/CC2: 1kΩ pull-downs to GND (per USB 2.0 Type-C specs).D+/D-: Connected to PA11/USB_DM and PA12/USB_DP.VBUS: Filtered through a ferrite bead (BLM21AG121SN1D) and 2.2µF decoupling caps.Boot Configuration: BOOT0: Pulled to GND via 10kΩ resistor (tested pulling high during reset).Clock: 8MHz crystal with 30pF load capacitors.DFU Entry: Tried BOOT0=1 + reset (via button). Get that the "USB device not recognised."I have attached my schematic and the clock configuration for reference.
Hello, We are preparing a system based on STM32H7 series with FreeRTOS, and the memory configuration includes: External SDRAM External Serial Flash (QSPI) We plan to use a large static library (.a) with code and data totaling several megabytes. We have the following questions: Q1. Handling Large Static LibrariesWhat is the recommended way to use large .a libraries in STM32 environments?Are there common approaches to load/execute them from external memory such as SDRAM? Q2. Dynamic Loading via QSPI Flash and File SystemIs it feasible to store the library as a binary file in QSPI Flash (with a file system), then load it into SDRAM at runtime and execute it dynamically ? We’d appreciate any suggestions, best practices, or examples. Thanks.
Hi,I recently purchased a STM32U5G9J -dk board. When I power up the board, TouchGFX demo application is running.Can you please provide the source code of this demo application.
I'm a beginner for MCU developmenet and am developping a product with STM32G071EBY6, and wanna make it support the USART2 to upgrade firmware. But seems needing bootloader customization. But I didnot find where to fetch the sample codes, and also nowhere found some guides. Ask for help!!! Best Regards!
I have a custom board with a STM32H730 and an IS66WVH32M8 HyperRam.The ram is connected on octospi1 outputs.I can read and write in indirect mode to the internal registers of the ram.But in memory mapped mode i read only wrong values.To test the ram I write alternating 0x5555 5555 and 0xAAAA AAAA.When I inspect in the memory view I see always the second byte wrong per word.For example at address 0x7000 0000:AAFFAAAA 55FF5555 AAFEAAAA 55DD5555But when I measure the OCTOSPI on a scope, the data is correct (see attachement) The setup of the OCTOSPI is as follows:Clock speed of the OCTOSPI is 20Mhz with prescaler.OCTOSPIM->PCR[0] = 0x07050333; OCTOSPI2->CR &= ~OCTOSPI_CR_EN; wait_busy(); OCTOSPI2->CR = 0x30000300; OCTOSPI2->DCR1 = 0x4170700; OCTOSPI2->DCR2 = 4; OCTOSPI2->DCR3 = 0x5003F; OCTOSPI2->DCR4 = 0xC8; OCTOSPI2->TCR = 0x10000000; OCTOSPI2->CCR = 0x2C003C00; OCTOSPI2->WCCR = 0x2C003C00; OCTOSPI2->HLCR = 0x010600; wait_busy(); OCTOSPI2->CR
Hello!Problem: I am using 3 timers in the Encoder function on the Nucleo F767ZI board. The timers are TIM1, TIM2, and TIM3. The encoder function on TIM1 works perfectly. However, the encoder function on TIM2 and TIM3 is not working. They just count up 1 pulse, then down 1 pulse, then up 1 pulse again. What I have done: I checked the physical connection, and they were working fine. I also tried swapping TIM1 and TIM2, and TIM was still working fine, and TIM2 was still not working, so I think there might be some problem with the firmware or when I configure TIM2. The configuration file (.ioc) is attached to this post. Could you please help me with this problem? Thank you very much!
I'm working on a DMX communication project using an STM32 microcontroller (e.g., STM32G030K8T6TR).I have successfully implemented DMX data transmission.For reception, I have enabled USART RX interrupt using __HAL_UART_ENABLE_ITI’m using a keyboard to send values, for example setting channel 1 to 90, but in my code, I don’t receive 90 – I get random or incorrect values in the buffer.What I have verified:Baud rate is set to 250000 bps (DMX standard).USART settings: 8N2 (8 data bits, no parity, 2 stop bits).I’m watching the value stored in dmx_data[0] using live expressions in STM32CubeIDE.Question:Why am I receiving incorrect data?Could it be due to incorrect USART configuration, timing issues, or missing break detection in the DMX frame?How can I properly extract and identify channel data from the DMX stream (e.g., value for channel 1 when set to 90)?Any help or examples on proper DMX receive implementation would be appreciated! Here I attached my code.
Hello,We are currently developing a drone using B-G431B-ESC1 motor control boards, and we have encountered stability issues during flight testing.Components Used.Radiolink Flight ControllerReadytosky 920KV BLDC Motors3S LiPo Battery1045 PropellersWe characterized the motors using Motor Profiler firmware generated with Motor Control SDK v6.3.0. The resulting motor JSON file was used to generate the ESC firmware for testing.After assembling and configuring the drone, we observed that the drone is not stable during flight.To address an issue related to motor ramp-up during startup, we modified the PID integral term initialization in the mc_tasks_foc.c file. Specifically, we replaced:PID_SetIntegralTerm(&PIDSpeedHandle_M1, (((int32_t)FOCVars[M1].Iqdref.q * (int16_t)PID_GetKIDivisor(&PIDSpeedHandle_M1)) / PID_SPEED_INTEGRAL_INIT_DIV));with:PID_SetIntegralTerm(&PIDSpeedHandle_M1, 2); This was done in an attempt to eliminate the motor ramp-up to max RPM in the initi
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.