Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi, I have 2 questions here for help.1.)We encountered 2 x AAA batteries drained out very fast problem feedback by our customer. In order to resolve this problem I enabled STOP2 mode and added in the following 2 lines of codes in function “APP_Zigbee_NwkForm()” which following exactly the sample project did (Zigbee_OnOff_Client_SED). As the result I can see the battery consumption dropped significantly from mA to uA. However, during the functional test, noticed the device always encountered hardly wake up from the STOP2 mode after multiples times of button pressing action. I cannot find much information about these 2 lines of codes therefore request ST’s expertise to help up. Our production line has stop and waiting for my firmware update in order to resume. /* Add End device configuration */config.capability &= ~(MCP_ASSOC_CAP_RXONIDLE | MCP_ASSOC_CAP_DEV_TYPE | MCP_ASSOC_CAP_ALT_COORD);config.endDeviceTimeout=ZED_SLEEP_TIME_30S; 2.)I noticed that, after added in these 2 lines
Hello ST Community,I would like to share an improvement I made to one of my TouchGFX projects.BackgroundMy previous implementation used a login screen to demonstrate an on-screen keyboard. The login screen was created only as an example application to showcase the keyboard and its functionality.To provide a more familiar user experience, I also implemented features that are commonly found in modern desktop and web applications, including: Custom on-screen keyboard Password input field Show/Hide Password button Password masking User authentication flow Although these features worked well for the login example, the keyboard implementation was tightly coupled with the screen.The ProblemThe original custom container included: Keyboard Text area Input buffer Buttons Password controls Whenever the custom container was added to another screen, all of these UI elements were created together.This reduced flexibility because many applications only need the keyboard while using th
I am using a Nucleo-N657X0-Q board to prototype a data collection system that collects samples from an ADC connected to the SAI peripheral and places the results in RAM. If I use CPU AXI RAM0 as the destination this works correctly, but if I change the destination to DTCM all I get is a buffer full of zeroes.According to chapter-17 of the ref manual, HPDMA1 AXI port has access to the DTCM and I am setting the DAP field of HPDMA-CH0 TR1 register to Port-0 as required (setting it wrong results in a DTEF interrupt).I have RISAF 1 and RISAF 2 set as follows: RISAF1->REG[0].CFGR = 0x00000000; RISAF1->REG[0].CIDCFGR = 0x00FF00FF; /* RW for everyone */ RISAF1->REG[0].STARTR = 0; RISAF1->REG[0].ENDR = 0xFFFFFFFF; /* all-encompassing */ RISAF1->REG[0].CFGR = 0x00000101; /* enabled, secure, unprivileged for everyone */ RISAF2->REG[0].CFGR = 0x00000000; RISAF2->REG[0].CIDCFGR = 0x00FF00FF; /* RW for everyone */ RISAF2->REG[0].STARTR = 0; RISAF2->REG[0].ENDR = 0
Hello everyone,I'm trying to interface a Waveshare 4.0" TFT Touch Shield (SKU13587) with an ILI9486 LCD controller using an STM32F767ZI.The display communicates over SPI, and the SPI bus is shared with the XPT2046 touch controller. At this stage I am testing only the LCD. The touchscreen is completely disabled and is not accessed by the software.HardwareMCU: STM32F767ZI Display: Waveshare 4.0" TFT Touch Shield (SKU13587) LCD Controller: ILI9486 Touch Controller: XPT2046 (not used during testing) Interface: SPI Current statusI wrote my own low-level ILI9486 driver.The following basic operations work correctly:LCD initialization Setting an address window Writing commands Writing data Drawing a single pixelA single pixel is always drawn at the correct position.ProblemThe problem appears only when I draw a filled rectangle (or any larger filled area).The rectangle itself is drawn correctly, but additional unwanted pixels appear beside the rectangle.The artifacts have some interesting cha
Hello, I am working on an STM32F411CEU6 and I am trying to configure the Independent Watchdog (IWDG) directly through registers. I have encountered a problem where IWDG_RLR cannot be updated. My MCU information is: - MCU: STM32F411CEU6 - Device ID: 0x431 - Revision ID: 0x1000 - IDCODE: 0x10006431 - HCLK: 16 MHz - PCLK1: 16 MHz - System clock: default HSI 16 MHz - LSI: enabled and ready I am using the following register-level code: RCC->CSR |= RCC_CSR_LSION; while (!(RCC->CSR & RCC_CSR_LSIRDY)); IWDG->KR = 0x5555; IWDG->RLR = 250; uint32_t sr1 = IWDG->SR; while ((IWDG->SR & IWDG_SR_RVU) && timeout++ < 1000000); uint32_t sr2 = IWDG->SR; uint32_t rlr = IWDG->RLR & 0xFFF; The result is consistently: SR immediately after writing RLR: RVU = 1 SR after waiting for the update: RVU = 1 RLR: 0xFFF In other words, RVU never clears and RLR remains at its reset value of 4095. I have also verified that the IWDG itself is working. Test 1: PR = 0 RLR = 0x
Hello ST Community,I am working with the STM32N657X0H32Q and configuring the LTDC with external memory. I am facing an issue with framebuffer writes.The external memory is connected to XSPI Port 1, and the read and write operations work correctly in Memory-Mapped mode at address 0x90000000. I am able to read from and write to this address without any issues.However, when I configure the LTDC to use the framebuffer at 0x90000000 with a resolution of 800 × 600, I observe that some bytes are missing or skipped during the framebuffer write operation.For example, I observe that approximately 1 KB of data is written, followed by around 300 bytes being skipped, and this pattern continues.Memory Configuration/* Memories definition */MEMORY{ ROM (xrw) : ORIGIN = 0x34180400, LENGTH = 255K RAM (xrw) : ORIGIN = 0x341C0000, LENGTH = 256K SCREEN_BUFFER_SRAM (xrw) : ORIGIN = 0x90000000, LENGTH = 20M}.screen_buffer (NOLOAD) :{ . = ALIGN(4); _screen_buffer_start = .; KEEP(*(.screen_b
[STM32U5G9] MJPEG video playback hangs intermittently with HAL_JPEG_ERROR_DMA — non-deterministic race conditionEnvironmentItem Value MCU STM32U5G9ZJT6Q Custom Board Yes (not STM32U5G9J-DK2) External Flash Macronix MX25L12833F on OCTOSPI (memory-mapped mode) Display 800×480 RGB565 LCD via LTDC TouchGFX 4.26.0 TouchGFX Generator 4.26.0 FreeRTOS V10.6.2 (CMSIS-RTOS2, via X-CUBE-FREERTOS 1.0.1) STM32CubeIDE 2.1.1 STM32CubeMX Latest STM32U5 HAL Driver V1.4+ Compiler arm-none-eabi-gcc 14.3.rel1 Issue DescriptionMJPEG intro video plays inconsistently. The first frame is partially decoded (top 16 pixel rows visible, rest of framebuffer shows stale main-screen content). The TouchGFX task then blocks indefinitely on SEM_WAIT(semDecodingDone) and the system enters the FreeRTOS idle task (prvCheckTasksWaitingTermination).Same code, same setup, three different runs produce three different outcomes:Run 1 (best case) dbg_jpeg_irq = 3dbg_gpdma_ch0_irq
Hello,I am using an STM32H573 with Secure Manager and Mbed TLS / PSA Crypto for a TLS 1.3 implementation.Persistent private keys provisioned into the Secure Manager work correctly. For example, I have a persistent P-256 private key provisioned through the ITS Factory Blob and can successfully use it for ECDSA signing.The problem occurs when Mbed TLS tries to dynamically generate temporary keys during the TLS 1.3 handshake.For example, a call similar to: psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT;psa_key_id_t keyId;psa_set_key_type( &attributes, PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1));psa_set_key_bits(&attributes, 256U);psa_set_key_usage_flags( &attributes, PSA_KEY_USAGE_DERIVE);psa_set_key_algorithm( &attributes, PSA_ALG_ECDH);status = psa_generate_key( &attributes, &keyId);returns: PSA_ERROR_NOT_PERMITTED-129The same behavior can also be reproduced with dynamically generated AES keys, so it does not seem to be s
We are using an STM32C091CCT6 with the internal HSI (48 MHz) configured as the system clock.Our application generates a volume-based pulse output using TIM14 in one-shot compare mode. The output pulse frequency is derived from flow rate, and the receiving equipment measures the number of pulses generated per second. Therefore, maintaining an accurate 1-second timing window is important for correct pulse frequency and flow indication.Timer ConfigurationMCU: STM32C091CCT6 Clock source: Internal HSI (48 MHz) SYSCLK: 48 MHz TIM14 clock: 48 MHz Prescaler: 47 Timer resolution: 1 µs per tick Pulse window: 1,000,000 timer ticks (expected = 1000 ms)ObservationWhen measuring the pulse window using a logic analyser, we consistently observe the following:Expected pulse window: 1000 ms Measured pulse window: ~995 ms Timing error: approximately 0.5%This timing difference directly affects the pulse-per-second measurement used by downstream equipment.Current WorkaroundTo compensate for the observed ti
Hi everyone!Can you guys help me to identify the reason of the strange screen distortions that I’m getting from time to time on my custom board based on stm32f746 with external SDRAM. The display is controlled by LTDC controller. Example of distortionsHas it something to do with LTDC controller or with SDRAM?I appreciate any help!THX
Hello,We are developing a battery-operated GPS asset tracker. To conserve power, the STM32 enters STOP mode every 10 minutes and wakes up via RTC alarm to fetch the current location.Problem:After waking up from STOP mode and toggling the power/enable pin of the GPS module, the GNSS chip takes over 60–90 seconds to re-acquire a 3D fix (Cold Start), which drains the battery significantly. Even when backup power (VBACKUP pin) is maintained to save ephemeris data, warm start is not triggering reliably.Setup:MCU: STM32L4 Low-Power seriesPower Management: WFI / STOP 2 modeIs there a best practice for managing GPIO states and UART lines before entering STOP mode to prevent current leakage into the GPS module's RX/TX pins?Best regards.
Hello ST Community,I am starting a new project using the NUCLEO-N657X0-Q development board with the STM32N657X0 MCU, and I would like to get some guidance on the correct workflow for programming and developing applications for this board.I have experience working with other STM32 devices and Nucleo boards using STM32CubeMX/CubeIDE, STM32 HAL and ST-LINK, but the STM32N6 architecture and boot/programming flow seem to be different from the STM32 families I have worked with before.I would like to clarify the following points:What is the recommended procedure to create, compile, program and debug a basic application on the NUCLEO-N657X0-Q? What software versions are currently recommended? For example, STM32CubeMX, STM32CubeIDE, STM32CubeProgrammer and the corresponding STM32N6 software packages. What is the correct boot configuration for development? In particular, how should BOOT0/BOOT1 and the relevant jumpers be configured when using ST-LINK for programming and debugging? What is the re
I need vfd firmware for ACIM v/f and SVC., i am using workbench 6.4.2, there have examples, but have limitations on motor capacity,,, how to i change to 5.5 kw motor, if change manually, after generated file is guaranteed for 5.5kw.? Please instructions me
I am working on an STM32 project that uses USB communication and I am trying to improve the debugging process. Sometimes it is difficult to identify whether an issue is coming from the firmware, USB configuration, or the connected device.What tools or debugging methods do you normally use for USB-related issues on STM32?
Creating your own custom reusable containers has its limitations. One of the, in my opionion, largest drawbacks is that you are not able to set multiple sizes in Designer for the same container (e.g. in the same screen add a MyCustomContainer with size 31x731 and a MyCustomContainer with size 61x13). Currently there are three options:(1) new container for every new sizeCreate a new custom container for every size variation you have. Add an abstract base class that implements some of the common code and let every container extend that base class. Pro: in Designer you can see roughly how your component will look like for all of the sizes. Con: you still have to copy paste code between the different containers that are actually all identical except for their size. If you have a lot of different sizes, this option is not viable.(2) single container but all components are invisibleCreate a custom container with all of its child components hidden and “override” Drawable::setWidthHeight(int16
How do I decide which documentation to use for a specific problem, or for getting a specific information?
I have seen a few other posts about ADC2 calibration issues without resolution. I’m creating this new post to provide a resolution.Using ADC1 and ADC2 in Dual mode on STM32H745 from CM4 running at 240 MHz. 10% of boards in production (20/200) were continuously watchdog resetting. This was traced to the ADC2 calibration getting stuck in a loop for 5 minutes (and hardware watchdog of 4s would trip). At 240 MHz, this timeout loop should only be 2.4s. (It would be better to use a timer function, but this is STM ADC HAL code) /* Wait for calibration completion */ while (LL_ADC_IsCalibrationOnGoing(hadc->Instance) != 0UL) { wait_loop_index++; if (wait_loop_index >= ADC_CALIBRATION_TIMEOUT)I’m not sure what is going on in the H7 silicon that makes the status register read so slow or why it isn’t changing in the expected 2.4s max, but STM provided a work-around. Change the order of initialization to remove the Dual Mode config from the .ioc - generated code in ma
Request: Add an option to the ModalWindow to hide the modal when the shade is pressed. Also add a switch in the Properties panel in DesignerThis can be implemented as simply as: namespace touchgfx{class ModalWindow: public Container{public: ModalWindow: // ... shadePressedCallback(this, &ModalWindow::shadePressedCallbackHandler), shadeWasPressed(false), hideOnShadePressed(false) { backgroundShade.setClickAction(shadePressedCallback); windowContainer.setTouchable(true); } // ... // some setter/getter for `hideOnShadePressed` void shadePressedCallbackHandler(const Box &box, const ClickEvent &event) { bool pressed = event.getType() == ClickEvent::PRESSED; if (hideOnShadePressed && &box == &backgroundShade && shadeWasPressed && !pressed) { hide(); } shadeWasPressed = pressed; }protected: // ... Callback<ModalWindow, const Box&
Hi, I have a custom board with a STM32WB55RG and I’m trying to upgrade the Wireless stack (and the FUS firmware) from a user application (and so without using STM32CubeProgrammer).I'm following the Application Note AN5185.The current FUS version is v1.2.0 and I try to upgrade the stm32wb5x_BLE_Stack_full_fw firmware (v1.14.1 or v1.15 or v1.16).I'm able to send the FUS_GET_STATE command and it returns successfully:the response (HCI command complete event packet) is well formatted, Num HCI is 0xFF, Cmd opcode is 0xFC52 (FUS_STATE) and FUS State value is 0x00 (FUS_STATE_IDLE).I'm also able to send the FUS_FW_DELETE commands:Response command opcode is 0xFC55 (FW_DELETE_STATE), status value is 0x00 (Operation started). Before the delete, SFSA was 0xCE and after complete, the SFSA is 0xf4 Read FUS Infos from STM32CubeProgrammer shows valid STACKS version/address before and v0.0.0.0/NA after the delete.→ The communication to the FUS though IPCC looks to work as expected for the get state and
I am new to this evaluation boad can someone please help me to configure this board. is there any separate ide for this other than cube ide?
Hi,I need to downgrade the RDP level from Level 1 to Level 0 on an STM32F205 without triggering an automatic system reset, as I do not have access to the BOOT0 pin.My workflow is as follows: I write the firmware to the device and then set the RDP level to 1. This works as expected. However, when I want to write new firmware to the device, I first need to reset the RDP level back to 0. This automatically triggers a system reset, which makes access to the BOOT0 pin necessary.I have written my own frontend for the STM32CubeProgrammer API, but I have not been able to directly write to the option byte registers.Is what I am trying to achieve possible, or is the automatic reset unavoidable when downgrading RDP from Level 1 to Level 0?Thank you.
Hello, I am desiging PCB with STM32F030Fx where I plan to use blocks of 5 push buttons for reading user inputs.For the most of tutorials, they use reading ACTIVE HIGH after the press, but I thought more common is to read ACTIVE LOW.Also there is internal pull-up ressistors according to the schemtaic, so probably not necessary to use external pull-up resitstor for it.Using 100nF capacitors should simplify debounce process.Is it reliable for readings?
I soft-bricked a keyboard using a STM32F103C8T6 by, I think, trying to write too large an image, and I guess I overwrote the USB bootloader. I have an identical keyboard and I just ordered an ST-Link v2 but I haven’t been able to pull up instructions for cloning the firmware from the working board using the ST-Link. Is this possible?
MCU: STM32G4Motor: DFA90L048017-ADC bus: 24 VPole pairs: 11Hall sensors: 120°Hall pins: H1 = PB6 H2 = PB7 H3 = PB8Motor rated speed: 1900 RPMHall electrical phase shift currently: 120° Problem:- Motor starts and runs.- At approximately 500 RPM command, actual speed oscillates.- Motor can accelerate toward ~1000 RPM.- Motor then briefly rotates in the opposite direction.- Motor Pilot also shows approximately the same behavior.- Hall interrupts are continuously generated.- All six Hall states 1..6 are observed.
We want to activate a 3-phases motor. We wchosse the STM32G474BCx6 microchip, we created a custom board but cant connected it to any motor, we get the message “No algorithm is available for this hardware configuration”, how can we solve it ?attached the “custom board “ we created. 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.