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
Hi,I am using the NBP8FD4ST1 pressure sensor with the S32K146 microcontroller. The CS_B/WAKE-UP pin of the sensor is connected to a GPIO pin on the microcontroller.The logic analyzer signal mapping is as follows:D0 → SCLK D1 → CS_B D3 → READY D5 → MISO D7 → MOSIDuring the communication sequence, when I pull the CS_B pin low to request SPI communication, the READY pin is asserted as expected. After READY goes high, I send the SPIOPS register read command (0x00E1). However, the sensor always returns 0x0000 on MISO. As a result, the firmware validation fails, and the CS_B pin is subsequently driven high to terminate the transaction.Could you please help me understand whether my SPI communication sequence is correct or if I am missing any required step, such as the wake-up sequence, dummy transfer, or SPIOPS handling described in the datasheet?I have also attached the logic analyzer screenshots for reference.Thank you in advance for your support.Best regards,Pratyusha.
Hi everyone,I'm working on an STM32 (Nucleo-F446RE to be spesific) project using the STM32Cube extension for VS Code, not CubeIDE. I'm using CMake for building the project.I encountered a few issues:printf doesn't print anything to the serial monitor, so I switched to using HAL_UART_Transmit.When I try to print a float using sprintf(msg, "value: %f\n", var);, it doesn’t work. The output just skips the float value (e.g., "value: \n").After some research, I found out I need to add "-u _printf_float" to the linker flags to enable float formatting support with printf and sprintf.However, I'm new to CMake and I couldn’t figure out which CMake file I need to modify in the project folder to add this flag.I'd really appreciate it if someone could guide me:Where exactly should I add the "-u _printf_float" flag?Is there anything else I should do to make printf work properly over UART?Thanks in advance for your help.
Hello,I have programmed the OTP word 31 to 0xBBBBBBBB as follows, but when I want to write another value such as 0x12345678 or 0x00000000 to word 31, it reported the following errors, can you help to analyze this ? Thanks a lot!
Hello!I have been trying to review and fix the configuration of my Ethernet LwIP+FreeRTOS STM32 project and I would like to ask more experienced people if I have correctly chosen memory locations, modified the linker script, configured MPU and a few other things. My project uses STM32F746VGT6 MCU that has 320KB of RAM and 1024KB of flash memory:MEMORY{ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 320K FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 1024K} Since this project uses Ethernet peripheral and LwIP library, a few memory sectors need to be defined: one for Tx Descriptor, one for Rx Descriptor, one for RX POOL and one for LwIP heap.I have set Tx and RX Descriptor addresses to 0x20048000 and 0x20048100 and checked in debugger that each one of them takes 160B of space, so 256B is more than enough to store a single Descriptor.I decided to store memp_memory_RX_POOL_base under 0x20040000 address in 32KB section. With ETH_RX_BUFFER_CNT defined to 16U, size of memp_memory_RX_P
My STM32F429 LWIP project stops all network comms after running for a few hours. I am hoping that this is a known bug with a known fix. But I would appreciate any insight that anyone can provide.I have a CubeMX generated project using LWIP and FreeRTOS running on an STM32F429. I have an ethernet interface using a LAN8742A.After running for a few hours my project stops communicating and does not recover. I think I have ruled out any kind of memory or buffer exhaustion. I suspect a race condition of some sort.Every time the comms stop, all of the RX descriptors are owned by the CPU and the ethernet RX descriptors are stuck in this same pattern.The numbers change but RxDescIdx is always (RxBuildDescIdx + 1). And the counts are always = 1. heth->RxDescList->ItMode = 1 RxDescIdx = 27 RxDescCnt = 1 RxDataLength = 118 RxBuildDescIdx = 26 RxBuildDescCnt = 1 pRxLastRxDesc = 7734049 FreeRTOS is still running the idle
Hi All,I am using STM32U375RETx on in my project on a custom board. I am using 8 channels on ADC1 and 3 on ADC2. I want to scan all the channels using DMA. I have configured the ADCs in scan conversion mode using dma and have also configured the gpdma channels to connect with the ADCs.My issue is that I am unable to trigger a scan using software trigger. I am able to trigger a scan only once and then if I scan again, the adc callback is triggered. I verified my adc and gpdma logic by switching from software triggered dma scan to timer event triggered dma scan. This worked and the timer was able to always trigger the adc and update the callback to process the adc data. Could anyone please share what would be an example code for U3 to use software triggered adc dma. The github examples show only for timer trigger and not software trigger[link].Below is a cleaned up version of my main.c I appreciate any suggestions!Thanks!/* USER CODE BEGIN Header *//** ***********************************
9 axis gyroscope mems sensor available?
Hi ST,We have developed a custom board based on the STM32MP257F-DK design, with the primary difference being the use of the STM32MP255DAK3 processor in place of the STM32MP257F. All other components and configurations—such as RAM, eMMC, and SD card interface—remain the same as the original DK board.We generated the device tree source (DTS) using STM32CubeMX; however, we are currently unable to boot the board successfully. Initially, we encountered an error related to the RISAF component, which we managed to resolve. Unfortunately, we are now facing a new issue resulting in a Panic in EL3 error.Despite our efforts, we have not been able to determine the exact root cause of the problem. Given that only the processor has changed and all other hardware remains identical, we would appreciate any guidance or suggestions you could provide to help us resolve this issue and complete the bring-up process.NOTE: the 1st error ################################################NOTICE: CPU: STM32
Hello,I am experiencing what appears to be a BootROM or silicon issue on the STM32N657-DK.HardwareSTM32N657-DK Discovery board Boot from the on-board XSPI Flash External APSRAM connected to XSPI1Problem descriptionThe system works perfectly after a power-on reset.The FSBL starts correctly, the application runs, XSPI1 is initialized, and the APSRAM is fully functional. There are no communication errors with the memory.However, after XSPI1 has been initialized once, any subsequent reset causes the board to become completely unresponsive.The problem occurs with:pressing the NRST button, calling NVIC_SystemReset(), or resetting through the debugger.After such a reset:the CPU never reaches the FSBL, the debugger cannot stop in the reset handler, it appears that the BootROM itself never starts the boot process.The only way to recover the board is to completely remove the power supply and power it up again. A simple reset is never sufficient.Additional observationsIf XSPI1 is never initialize
Hi,I am developing an object detection system using the sensor, integrated inside the inner wall of a toilet bowl to detect falling waste. I am experiencing persistent "Low Confidence" issues, and I am looking for expert advice on whether this is an inherent physical limitation or a configuration issue.Current Setup & Environment: Environment: Actual toilet bowl (highly reflective curved ceramic surfaces). Hardware Integration: The sensor is mounted behind a cover glass, and an active NIR/Visible fill light is installed inside the bowl to assist a separate camera system. Configuration: VL53L7CX_RANGING_MODE_AUTONOMOUS @ 60Hz. The Phenomenon: Static/Idle State: Even in this real-world environment (with cover glass and fill light), the sensor produces some "Low Confidence" data points even when nothing is happening. Dynamic Event (Object Drop): When an object is dropped, the frequency of "Low Confidence" reports increases significantly, often rendering the detection logic unrel
I have a VL53L4CD that I’m trying to use as a binary signal for detecting whether or not an object is within a specified range. In the default case with no detection thresholds set, GPIO1 is driven low when data is ready as expected, and I can continuously receive data from the sensor by reading when GPIO1 is low and then clearing the interrupt. I set the timing budget to 20 ms, and the intermeasurement time to 50 ms, as was done in the ULD example code (VL53L4CD_ULD_V2.2.3/Examples/Example_6_detection_thresholds.c) . As soon as I add the same call that the example code makes: VL53L4CD_SetDetectionThresholds((Dev_t)dev_add, 100, 300, 3); At the end of my initialization sequence, GPIO1 no longer pulls down, nor does VL53L4CD_CheckForDataReady(TOF, &ready) signal ready. This is expected behavior outside of 100-300 mm, but I can force read the device regardless of ready status and see measurements within this window that are constantly updating. Is there another step in this process
Hello,I have a couple of devices using LPS28DFW pressure sensors.The sensors are configured as follows:INTERRUPT_CFG = 0x00, THS_P_L = 0x00, THS_P_H = 0x00, IF_CTRL = 0x00, CTRL_REG1 = 0x3C, CTRL_REG2 = 0x00, CTRL_REG3 = 0x01, CTRL_REG4 = 0x02, FIFO_CTRL = 0x02, FIFO_WTM = 0x64,All other registers are left at their default values.Usually they work fine, filling the FIFO with new data and generating an interrupt every second. However, I occasionally encounter an issue where the sensors appear to stop filling the FIFO for a period of time. The duration of this stall is not consistent, it can range from a few seconds to a permanent lock-up. During this locked state, I can still successfully read the temperature, and reading back the configuration registers confirms they are set as expected. After a power cycle and reconfiguration, everything returns to working correctly.Have you ever experienced this issue? Do you have any idea what might be causing it?
Hi all, Experiencing yet another hurdle using the STM32N6: I am running into the issue where if I run the VENC as the JPEG encoder, where I previously found out how to properly run it in the first place, I get issues in the I2C slave communication…! Okay, what do I mean…i2c is configured as a slave. I receive/send all data via. DMA First stop for both directions of communication is the `HAL_I2C_AddrCallback` Maximum burst length of any i2c communication on my bus is 256 bytes The above mentioned limitation works very good and without issues, if I do not have the VENC running Problems arise, when I turn on the VENC, encoding each 2nd frame on PIPE1 that comes in through the DCMIPP. It is configured to convert one frame of ARGB24 into a JPEG. I used the middlewares from https://github.com/STMicroelectronics/STM32CubeN6/ and snippets from the VENC_JPEG_Encoding example (commit 8ab3b641, which is the latest as of writing). A list of some problems that I encounter, observed in parallel with
Hello, I am currently using SAI1A as Master and SAI2B as synchronous slave on the Nucleo F756ZG to send data to 2 DACs.One DAC is connected to SAI1A pins and the other is connected to SAI2B pins. The issue : SAI1A needs to be configured as master and SAI2B as its slave to be synchronized so the data are sent at the exact same moment to both DACs The second DAC is routed to the SAI2B SD, SCK, FS and MCLK pins but these are not used because the SAI2B is slave In this configuration, DAC 2 does not receive any signal from SAI2B SCK, FS and MCLK pins If both SAIs are configured as masters, there is a 20 microsecond latency between the data frames because the SAIs are not synchronized so there is a delay because of calling twice HAL_SAI_Trasmit_DMA function. I cannot afford this delay in my use case. Is there a way to clone or duplicate the SAI1A clock outputs to SAI2B pins so DAC 2 receives the clock signals as well, without modifying the routing ? Or reduce the delay to some nanoseconds wi
IF it’s failed to connect, and given an error code of -1, how can that be “No error” ?! Also the suggestion “Please check power and cabling to target” is useless here - it’s not a target connection issue! The focus of this thread is the silliness/unhelpfulness of the messages.Not looking for solutions to the underlying issue here.For that, see:
Hi, When there is no object in front of the VL53L0x, all corrections have been made, but the following test data still appears. Why are the data so high?
Hi ST Team,We are developing a custom Qt 6 + OpenGL object detection application on the STM32MP257F-DK using OpenSTLinux 6.6, X-LINUX-AI, and the ONNX Runtime (stai_mpu) backend.Our application architecture is based on the official ST object detection example. We use the same stai_mpu_wrapper and ssd_mobilenet_pp.hpp post-processing implementation from the stai_mpu_object_detection example, while replacing the GTK/Cairo UI with our own Qt/OpenGL application.Application Architecture Board: STM32MP257F-DK OS: OpenSTLinux 6.6 AI Backend: ONNX Runtime (libstai_mpu_ort.so.6) Camera: libcamera + DCMIPP Display: Qt 6 + OpenGL (Wayland/Weston) Camera Pipeline: Viewfinder stream → RGB565 → OpenGL live preview AI stream → RGB888 → STAI inference Inference: stai_mpu_wrapper::RunInference() Post-processing: Official ssd_mobilenet_pp.hpp from the ST stai_mpu_object_detection example. 1. DCMIPP camera configuration issueOur AI model requires a 300×300 RGB888 input, so we conf
Dear ST Team, I am currently porting an SBSFU/Trust Zone -based application from the STM32U585 to the STM32U5A5. The migration is almost complete, and the bootloader is functioning as expected. The following operations complete successfully:BL2/SBSFU boots correctly. Image authentication and verification succeed. The application vector table is read correctly. The application jump is initiated using:boot_jump_to_next_image((uint32_t)&boot_jump_to_next_image, vt->reset); Both addresses appear to be valid:MSP points to Secure SRAM. Reset vector points to Secure Flash with the Thumb bit set.The application successfully reaches the Reset_Handler, so the jump from SBSFU to the application appears to be successful.However, during the startup code, execution gets stuck while clearing the .bss section.The relevant startup code is shown below:ldr r2, =_sbssb LoopFillZerobss FillZerobss: movs r3, #0 str r3, [r2], #4 LoopFillZerobss: ldr r3, =_ebss cmp r
Hello everyone,I am currently working on a project on Nucleo F756ZG where I need to :Use SAI1A and SAI2B to send audio data at the same time using TDM with 8 slots each SAI parameters are 128 bits data frames (so 16 bits per slot) Audio frequency 96k Master mode Use of HAL_SAI_Transmit_DMA to send the dataI managed to configure the SAIs, send and monitor the output data and it is working well but I noticed (an obvious I guess) latency between the payloads of the signals, between the 2 calls of the HAL_SAI_Transmit_DMA function, as you can see on the screenshot (12 us approximately). I would like to reduce this latency under 1 microsecond if possible. During my experimentations I noticed it was possible to set one SAI as master and the other one as its slave and only call HAL_SAI_Transmit_DMA once, but haven’t managed to make it work for now. Is it really possible ? I am looking for a code example to be sure to setup the SAIs properly. I can share more details of my code if necessary. T
I have read these forums and I see some have successfully got the F407 connected to KSZ8863 working. I am trying to do a simple non managed switch RMII PHY connection to the third port with no luck. I have confirmed the 50mhz clock input to the KSZ8863 is working as I can get port 1 and port 2 to transfer packets between each other, no issues at 100mbps just no packets to the processor. The schematic pdf I upload here shows my physical connections to the 407 and in the past I have successfully use the DP83848 out of the box. If anyone has a connection diagram to the 407 that works it would be much appreciated if you could share it along with any driver that you might have used.Update: I added a screenshot showing I do see rx data activity on the RII interface back at the processor.Thanks,
It will be great if you can provide I2C address change options as in many other devices on the market. There are some unused pins, why not use them to select different I2C addresses. Or if like in VL53L8CX have MISO+NCS not used in I2C mode. One may connect this pins to VCC/GND/SCL/SDA by 47k. So you have the option to preselect the address.it may be a hardware change in base device logic and so not solving any current problems, but useful for future devices.regardsChris
Can connect STM32H743 with LCD with MIPI interface ?
Hi all,I'm driving an NHD-1.5-128128G (SSD1351 controller, 4-wire SPI mode) from an STM32F303RE (Nucleo board) using the hardware SPI2 peripheral. The display has never lit up, and I've now run out of obvious things to check, so I'd appreciate a second pair of eyes.SetupDisplay: NHD-1.5-128128G Interface: 4-wire SPI (BS1=0, BS0=0, both tied to GND) MCU: STM32F303RE, HAL library, hardware SPI2 (not bit-banged) Pin mapping: CS, D/C, /RES driven as GPIO outputs; SCLK/SDIN via SPI2 hardware linesPower rails (all measured at the panel/FFC connector end, not just the breakout header)VCC: 13.0 V (measured on oscilloscope, confirmed at the connector) VCI: 3.3 V VDDIO: 3.3 V (measured directly at pin 4) VDD: not externally driven, only a 1 µF cap to GND per datasheet VCOMH / VSL: only connected to their respective decoupling caps per the reference schematic, no external driveWhat I've verified works correctly/RES toggles LOW→HIGH with correct timing (confirmed on scope) D/C toggles between comm
TL;DR: Right click your project in Project Explorer, click Properties > C/C++ General > Indexer > Enable Indexer if option is not checked. Hi all,I have seen other posts in the community about Autocomplete not working with their projects, with fixing the indexing being a possible solution that does not work for many. I have seen that some go to Window > Preferences > C/C++ > Editor > Content Assist > Advanced and enabled “Parsing-based Proposals”. For me, that did not work either, and I could not get any Autocomplete results for the HAL library or any imported APIs/libraries.However, I finally found a possible culprit when Right-Clicking a HAL_Init( ) call within my code and clicking References > Workspace/Project. A window should pop up and may relay the message “unknown results: indexer is not enabled”).Window is in top right.The solution for this lies in right clicking your project in Project Explorer and clicking Properties > C/C++ General > Indexer
Hello guys, I started a project using STM32C552RET6 and STM32CubeIDE. When I use the autocomplete feature to select a HAL function, I can’t find it. I have to type the function manually.Does anyone know how I can fix this problem?Thanks for your 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.