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 using the STWIN.box with the DATALOG2 firmware and would like to acquire data based on an external trigger signal from a speed sensor.My speed sensor provides an open-collector output, which is connected through appropriate signal conditioning to the STWIN.box.I would like to know:What is the recommended way to use an external GPIO as a trigger source in DATALOG2? Can a GPIO interrupt (EXTI) be used to start data acquisition or mark events in the recorded data? Are there existing examples in DATALOG2 that use external trigger inputs? Which GPIO pins are available for this purpose on the STWIN.box? For an open-collector speed sensor output, should I use an internal pull-up or an external pull-up resistor?My goal is to trigger or synchronize vibration measurements with the rotational speed signal.Thank you.
Environment - Device: STM32H562ZI- Reference manual: RM0481 Rev 5- HAL: STM32Cube H5 HAL Driver V1.5.0- Peripherals: GPDMA used for SPI slave Tx/Rx. SPI in slave mode, normal (non-circular) transfers, no linked-list. Summary On our SPI slave DMA path, the DMA channel becomes permanently stuck after an SPI error, and SPI communication never recovers until the device is power-cycled. The cause is that `GPDMA_CxCR.SUSP` gets written to a channel that has **already completed its transfer and stopped** (EN=0, IDLEF=1). In that state `GPDMA_CxSR.SUSPF` is never set, so `GPDMA_CxCR.RESET` is never written and **SUSP stays set**. Setting `EN=1` afterwards suspends the channel immediately after start, and the driver can no longer escape that state. Observed register sequence (Tx channel, real measurements) ```1) Block transfer completes. Hardware clears EN.CxCR = 0x00805D00 (EN=0, SUSP=0, SUSPIE=0)CxSR = 0x00000001 (IDLEF=1) 2) An SPI error occurs right after this point.SPI ErrorCode = 0x84 (UD
I’m trying to add openAmp to a stm32cubemx project (ioc). I add everything (IPCC1, openAMP exc) but when I compile the project[build] [ 5%] Building C object bsp/CMakeFiles/bsp.dir/CM33/OPENAMP/open_amp.c.obj[build] [ 6%] Building C object bsp/CMakeFiles/bsp.dir/CM33/OPENAMP/openamp_log.c.obj[build] [ 8%] Building C object bsp/CMakeFiles/bsp.dir/CM33/Core/Src/stm32mp2xx_it.c.obj[build] In file included from /home/marco/lavori/qmc/software/qmctest-m33/bsp/Middlewares/Third_Party/OpenAMP/open-amp/lib/include/openamp/open_amp.h:11,[build] from /home/marco/lavori/qmc/software/qmctest-m33/bsp/CM33/OPENAMP/openamp.h:25,[build] from /home/marco/lavori/qmc/software/qmctest-m33/bsp/CM33/OPENAMP/open_amp.c:21:[build] /home/marco/lavori/qmc/software/qmctest-m33/bsp/Middlewares/Third_Party/OpenAMP/open-amp/lib/include/openamp/rpmsg.h:15:10: fatal error: metal/compiler.h: No such file or directory[build] 15 | #include <metal/compiler.h>[build] |
Hello,I am currently trying to setup a blink example on NUCLEO-U5A5ZJ-Q and I have a bug using the default configuration from current CubeMX version (6.18.1).The generated binary ends up in an Error Handler in the SystemClock_Config function. The default clock configuration generated is the following: I have noticed that a similar issue has been notified in I have tried to use the bypasses mentioned in the previous post (setting the HSE source to 16 MHz, changing the SYSCLK Mux source, etc.) without success. Particularly, I am not able to find the setting allowing me to set HSE to “Crystal/Ceramic Resonator” in my CubeMX version.Thanks in advance for helping me resolve this setup issue,Best regards,Robin
Hi,I am trying to initialize FDCAN for my project. After the initialization I am clearing INIT bit in CCCR Register. The output what I can see is only CCE bit gets cleared but INIT bit is stuck at 1.Below is my code snippet.void Can_driver_init (void){ uint32_t StartAddress_l_u32 = CAN_RAM_OFFSET_CFG; uint32_t RAMcounter_l_u32 = 0; uint32_t ElementSize_l_u32 = (CAN_DATA_BYTES_CFG/4); // Enable the peripheral clock for FDCAN RCC->APB1HENR |= RCC_APB1HENR_FDCANEN; // Exit from Sleep mode */ CAN->CCCR &= ~FDCAN_CCCR_CSR; // Wait till the CSR bit is set in CCCR */ while (CAN->CCCR == FDCAN_CCCR_CSR); // Wait timeout to be added // Request initialization */ CAN->CCCR |= FDCAN_CCCR_INIT; // Wait until the INIT bit in CCCR register is set */ while ((CAN->CCCR & FDCAN_CCCR_INIT) != FDCAN_CCCR_INIT); // Wait timeout to be added // Enable configuration change */ CAN->CCCR |= FDCAN_CCCR_CCE; // Enable automatic retransmission
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,I am working with an STM32MP135DAF on a custom board and am trying to boot OpenSTLinux/Yocto from eMMC.My setup is:MPU: STM32MP135DAFCustom hardware/boardCustom Yocto machineSTM32CubeMX used to generate the Device Tree filesOpenSTLinux / YoctoBoot device: MMCImage: `core-image-minimal`I have created a custom machine configuration and integrated the CubeMX-generated Device Tree files into my Yocto build.The Yocto build completes successfully with: “bitbake core-image-minimal”. The image and flashlayout files are generated successfully.However, when I try to program the board using STM32CubeProgrammer in USB DFU mode, CubeProgrammer reports that it cannot reconnect to the device.I also connected a serial terminal to the debug UART. During the boot/programming sequence, I see:PANIC at PC : 0x2ffe6405Exception mode=0x00000016 at: 0x2ffe6405The relevant CubeMX-generated DTS files, machine `.conf`, and `local.conf` are attached below.Could someone please help me identify what could ca
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
Help Needed: ST25R500 Antenna Matching and Unexpected Reading Distance ResultsHello everyone,Thank you for taking the time to read my post.I am currently using the ST25R500 and designing a reader with the goal of achieving the maximum possible reading distance. I have been working on the antenna design, impedance matching, and the internal transmitter impedance settings of the ST25R500, but I have encountered some confusing results and would really appreciate your advice.My antenna is a 2-turn enamelled-wire coil. For the impedance matching, I am using the impedance matching software officially recommended by ST.Based on the recommendations in the datasheet, I set my target impedance to:10 Ω − j4 ΩAs far as I understand, this target impedance should be within the recommended range.I entered my antenna parameters into the official matching software and used its built-in simulator. I then adjusted the values of the matching components, as shown in Figures 1 and 2.However, after actually
[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,I came across the above guide on ADC interleave mode and attempted to use it on MX2 for the STM32C552VET6, but many of the parameters here listed seem to be invisible to MX2 although it does seem to recognise that I am attempting interleave between the two ADCs. Can an equivalent guide be created for the C5 series?Thanks in advance.
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
when generating cmake file from CubeMX2, CMakeLists.txt states: cmake_minimum_required(VERSION 3.20) but in fact you need a minimum version of 3.3:
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?
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.