Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hello,I am working with STM32H743, using ADC1 and 2 in dual simultanious mode, using DMA to store data from ADC_CDR (2 16 bit values) to memory, some hundred values in a stream in continuous mode. This works fine in general but I frequently see a missynchronisation between the two ADCs so that at the output of DMA I have in one 32bit word the lower half word from one ADC1 conversion of one point in time and in the upper half word the ADC2 conversion from the preceeding or succeeding point in time (I didn't check which of the two, but it is only one of them).I read RM0433 ADC section up and down and could not find anything about that. It seems to be more related to hardware, that sometimes triggering DMA does not properly wait for both ADCs to be ready and have their data transfered to ACD_CDR. But it is not occuring or not from sample to sample but it is there for one complete data stream or not, so it seems to be set or not with every setting of ADSTART.Here is my ADC init code:#defin
I plan to adapt the USBX host example to act as a bridge the way the current device example does. Then I can have a full link UART -> Host -> USB -> Device -> UART and vice versa. However, the data sent to the device is not displayed over its UART as expected and the device stops obtaining additional messages from the host. How can I fix this so I can move on the adapt the host example and use the device to debug?Overall Goal: Implement a USB to UART bridge using USBX Host mode on the NUCLEO-U575ZISteps:Run the Ux_Device_CDC_ACM example from the example selector on a NUCLEO-U5A5ZJConfirm device example functionality:Connect the NUCLEO-U5A5ZJ USB-C port to the PC.Open two Teraterm windows: UART serial port and VCOM (over USB) portTyping into either Teraterm window causes the text to appear on the other window. This confirms bidirectional USB to UART bridge on the NUCLEO-U5A5ZJ in USBX Device mode.Modify the device example due to lack of VBUS power bet
Hello Community, We are using an STM32U595ZJT6Q microcontroller and have connected an MB85R4M2TFN-G-JAE2 FRAM via a parallel interface. The setup works well under normal operation and even after a power cycle — all data is retained and verified correctly. However, we are facing a consistent issue when performing a microcontroller reset (MRST) without power cycling the board: After MRST, the data at address 0x00 in FRAM is found to be corrupted (0xFF). All other memory locations remain intact. This issue does not occur on power reset — only on MRST. We observed that CS & WR pins go low for ~300 ns during MRST, which seems to be the trigger. Below is waveform captured for the mentioned behaviour. Below things we did so far:- Added pull-up resistors on CS and WR line. Ensured early GPIO initialization in firmware to set FRAM control lines high. Verified that no write operations are performed in startup code. Checked FMC configuration and ensured no early access to FRA
Hi all, I am transmitting and receiving the image data using AT commands via UART in stmf767vi board. My transmission is sending successfully like sending chunk by chunk. I am able to see the count also. But the problem is while receiving side, I am able to receive the chunk for 2 min only. not all the image. If tx image size is 80k, I am able to see upto 35k only. after that my mqtt is stopping receiving the image data. I don't know where it is causing whether it is keep-alive timeout or something else. Even when I am receiving the small size data, it is receiving 6 times the full image like upto 2 min. after that it is stopping. what is the issue ? someone please help... while(1){ receive_data_test((char *)&response[0], RX_BUFFER_SIZE, 60000);} eState_t receive_data_test(unsigned char *out_buf, uint16_t buf_size, uint32_t timeout_ms){uint32_t last_ping_time = HAL_GetTick(); uint8_t rx_byte;rcvdCount = 0;notRcvdCount = 0;while (1){if (HAL_UART_R
Hello ,I am working with comparators on the STM32L496VGT6 microcontroller.In my setup:COMP1 is configured for rising-edge detection.COMP2 is configured for falling-edge detection, forming a window comparator arrangement.One input of COMP1 is connected to an ADC voltage (through a 2:1 voltage divider).The other input is from the DAC internal connection, operating in sample-and-hold mode with the output buffer disabled.The outputs of COMP1 and COMP2 are routed to external GPIO interrupts.Hysteresis is set to medium.Voltage levels:VH = 0.55 V (corresponding to Vin = 1.1 V after 2:1 divider)VL = 0.275 V (corresponding to Vin = 0.55 V after 2:1 divider)Issue description:When the input voltage is close to the threshold (around 1.05–1.07 V and 0.51–0.54 V), I observe continuous false comparator interrupts instead of a single expected trigger.To mitigate this, I increased hysteresis from medium to high and reduced the number of hold cycles from 64 to 32. This helped reduce the issue, but
Hi there,As the title suggests, I am working on a new project for my DIY board.I already created a new inverter board with the board designer. (See the inverter config in the attachment)I also configured a motor like below:However, after I merge the inverter and the motor by creating a new project, there are some errors shown:Question:1. Can I find some information for the LOG? If yes, where is it?2. Why can't I select the FOC or six-step algorithm? Is there some wrong configuration?3. What's the problem with the current sensing?Thanks for your help!
Hello,I am using STM32CubeIDE with the STM32F429I-Discovery board,and my goal is to connect it with the MT9M001 camera module.As a first step toward that, I would like to make the LCD display work properly.In the STM32Cube_FW_F4_V1.28.0 package,there are many sample projects organized as follows: Projects > STM32F429I-Discovery > Examples > LTDC > LTDC_Display_2Layers If I import this Example project into STM32CubeIDE,will the LCD automatically display the sample image?Or do I need to perform some additional setup or configuration steps?I would appreciate any advice or guidance.
As the subject line says, I've written a USART driver for a STM32H755 project where I want to detect a special end-of-line character, for implementing a simple command-line interface.Originally this used DMA with the USART FIFOs disabled, but I recently changed the driver to use the 16-deep FIFOs with FIFO-threshold interrupts, because I am bit short on DMA channels.I couldn't figure out why the character-match interrupt wasn't firing, so I paused execution to look at the USART registers after sending a short (12 characters) command from my serial terminal. I then refreshed the register view while looking at USART->RDR and was able to see the characters stored in the FIFO come out one by one.Finally after the 12 bytes my "match" character appeared in RDR and then the CMF bit was set in ISR. This was what I was afraid of. The RM alludes to the fact that the receive FIFO stores some flags along with each received character. Well, apparently one of those flags i
Hi ST Community, Our project uses STM32H743 (LQFP100). The system clock is set at the max 480MHz. The USB Device interrupts would occasionally cause a HardFault. For example, if we plug in or unplug the USB. The data hpcd would occasionally be 0xFFFFFFFF. Sometimes it's the hpcd->pClass[0] We have enough size for the stack and heap. A "workaround" is to lower the system clock to 240MHz... What we don't understand is that the USB clock source is from the "RC48" 48MHz clock, independent from the system clock, which sources the HSE. How does lowering the system clock help resolve this issue? We also tried using HSE to generate the 48MHz for the USB, but the USB just doesn't run. Is there other settings or configurations that we might have set incorrectly? Another thing to mention is that we have a conflict with the RCC CRS SYNC. Attached is our clock configuration and .ioc file for your ref
Hello, my project is using all 4 SPI interfaces on the STM32G474. SPI1-3 all work flawlessly, but SPI4 never triggers the RXNE flag. All SPI buses are configured identically, with the only differences being the pinouts and APB1 vs 2 bus. I am polling the transactions directly.Initialization:if (hspi_.Instance == SPI1) LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_SPI1); else if (hspi_.Instance == SPI2) LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_SPI2); else if (hspi_.Instance == SPI3) LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_SPI3); else if (hspi_.Instance == SPI4) LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_SPI4); LL_SPI_SetMode(hspi_.Instance, LL_SPI_MODE_MASTER); LL_SPI_SetTransferDirection(hspi_.Instance, LL_SPI_FULL_DUPLEX); LL_SPI_SetDataWidth(hspi_.Instance, LL_SPI_DATAWIDTH_8BIT); LL_SPI_SetClockPolarity(hspi_.Instance, LL_SPI_POLARITY_LOW); LL_SPI_SetClockPhase(hspi_.Instance, LL_SPI_PHASE_1EDGE); LL_SPI_SetBaudRatePrescaler(hspi_.Instance, LL_SPI_BAUDRATEPRESCALE
Hello, I have an STM32L4R5 MCU on a custom PCB and I have flashed it with my firmware via USB_OTG_FS. Both CubeProgrammer and the CubeIDE have worked in flashing the MCU for me, given I have an ST-LINK connected to it as well. I have USB_DM, VBUS_Sense, and USB_DP pins set up on my MCU. I am wondering how I can see some sort of output from my MCU. From my searching, I learned the DFU mode is only used for flashing and something like USB CDC is used for communication, through a serial port or UART. I am wondering some ways (preferably efficient and quick) I can go about seeing an output from my MCU that is running my firmware. If there needs to be any more clarification as to my wiring/setup, I will gladly add that. Can USB CDC be setup via firmware, or is it solely a hardware configuration? I do not have pins like UART/LPUART TX/RX connected on my MCU, however, they are able to be jumped of course. I have been using a NUCLEO development board to test my code. When connecting
Hello everyone,for a project at the university i have to programming an nextion display with a stm32f401re or a stm32g474re. (i can choose between them, i have both here). My problem is that i have configurate the display with the nextion editor. There i can change the text and it works. When i use the stm32f401re, connect the tx from the display to the rx from the processor (D0) and the rx from the display to the tx from the processor(D1) and the 5v with 5v, GND with GND, then i don`t can change the values. In my programm, i writeHAL_UART_Transmit(&huart2, (uint8_t*)"t0.txt=\"Hello\"\xFF\xFF\xFF", sizeof("t0.txt=\"Hello\"\xFF\xFF\xFF"), 1000); HAL_Delay(1000);When i use a logic analyzer on the pin tx, i see, that i get datas. Furthemore i looked at PuTTy. There i get the correct messages.My baudrate is 9600 bps. in addition my clock settings are:|Clock Source|HSE (8 MHz extern)||PLL Source|HSE||PLL_M|8||PLL_N|336||PLL_P|4||PLL_Q|7||System Clock (SYSCLK)|84 MHz||AHB Prescaler
Hello guys,Can anyone help me on how i need to set up a dma chain reaction so i can read from a timer ccr1, ccr2 registers and write their values to hrtim period and compare1 registers? The only thing I have found until now is how to set up the dma for the timers while being on PWM Input mode, burst read the cc1, cc2 registers and store their values to memory. I have read that I need to use then a DMAMUX request to generate an DMA request for the HRTIM to read the memory and then apply the changes to the peripheral, but I still don't understand how I should i configure the board. I'm using an STM32G474RET.Thanks for your time in advance.
Hi, I was trying to upgrade my ble wireless stack from CubeProgrammer but everything give me this error. I tried to install stm32wb5x_FUS_fw or stm32wb5x_FUS_fw_for_fus_0_5_3 to their correct addresses from release notes but nothing works. I am able to flash code from cube ide but these wont work. I can start FUS or take BOOT0 to 1 but these did not work too. Only thing I have in my mind is maybe my cube programmer. Due to language settings my cube programmer installation step 8 is stuck(I read this error from the forum too) but I can access to cube programmer from program files and it can connect/read/flash so I dont think this is the problem too. On the board RX/TX pins between st link and mcu are not connected but it should not be the problem as well because I am using st link and can flash anything from cube ide
I'm attempting to get started with the Morse Micro MM8018-EKH05 (STM32U585VIT6 controlled) and pair it with their HaloLink1 router. I am following their MM8108-EKH05 used guide user guide section "5.2 Build and Run Example Applications." I have loaded the downloaded CMSIS package with STMCubeIDE, imported the project, loaded the MM8108 software packs, generated code in STMCubeIDE, and built but when I get to the green "Run" phase on pg. 29, I get the following error (see attached screenshots): Cannot run program "C:\Users\dmitryp\STM32Cube\Repository\Packs\MorseMicro\MM_IoT\1.7.4\HaLow_example_spi\Debug\HaLow_example_spi.elf": Launching failedCannot run program "C:\Users\dmitryp\STM32Cube\Repository\Packs\MorseMicro\MM_IoT\1.7.4\HaLow_example_spi\Debug\HaLow_example_spi.elf": Launching failedCannot run program "C:\Users\dmitryp\STM32Cube\Repository\Packs\MorseMicro\MM_IoT\1.7.4\HaLow_example_spi\Debug\HaLow_example_spi.elf": Launching failed What shou
Hello ST Community,I am developing a product for residential pump control based on AC Induction Motor (ACIM). I am using the STM32 Motor Control SDK and have been studying the example on the wiki page: STM32MotorControl: SDK_AC_induction_motor.This software example is a good starting point. However, for hardware, it references the use of three separate evaluation boards (e.g., STM32 Nucleo, X-NUCLEO-IHM, and a power board). For a real product, this approach is too large and expensive. I am looking for a dedicated, consolidated hardware reference design for this application. Specifically, I need a complete schematic that integrates the STM32 MCU, the 3-phase inverter (with gate driver or STSPIN), current sensing, and power supply onto a single board.Does ST provide such a dedicated, consolidated reference design for a sensorless FOC ACIM driver? If so, what is the design name or document number?Are there any existing reference designs (even for PMSM) that I can use as a foundationa
1. In the B-G431B-ESC1 development board, there is a component labeled U5 (ST890DTR) in the circuit. Could you please explain the exact purpose or function of this component in the board’s design?2. If the U5 (ST890DTR) component is removed from the B-G431B-ESC1 development board, what types of issues or malfunctions could occur? Would the impact be considered minor, major, or critical to the board’s operation?
Hi friends. Help me figure this out.Am I missing something, or is my board faulty? MCSDK 6.4.1Motor 12n14p In 6-step mode, the motor operates correctly, and the phase signal waveform also appears normal. But in FOC mode, something strange happens; the motor is practically impossible to spin. In the profiler, it usually starts on the first try, and the program allows you to save the motor parameters, but the motor spins noisily, and profiling a second time in the same session is impossible; the motor won't start. A default project created with the motor parameters from the profiler also fails to reliably start the motor in the Pilot program.Shouldn't the signal in FOC mode look like a sine wave?
Hello, I would like to know if there are any methods to load PNGs/JPGs from a USB for the stm32 (I am on stm32F7). I currently imported lodepng but, it seems the malloc used by it is way too large for the device. The png I am loading is relatively small, 185 x 43.unsigned err = lodepng_decode24(&img, &w, &h, file, fileSize); if(err) { return MEMORY_ERROR; }
I'm using Motor Control Workbench 5.4.4.20160 to build up code for motor control. There is a issue that In some specific situations, the dead zone will disappear, which can be seen in figures bellow. I give a constant d-axis current and force positioning the hEIAngle. If the hEIAngle is 0, the dead zone looks normal. But if the hEIAngle is set to 20479, then the dead zone disappear. Moreover, I run a continuous angle ramp and recorded the measurement results of the oscilloscope in the attached video. I have checked the register BDTR, it seems every bit is normal. Could you help me out for this issue?Thank you for your kindly guidance.
(Please ignore the green area, which is Layer 1 of the LTDC.)I am using an STM32N6570 development board with an external PSRAM (connected via XSPI1) to store camera frame buffers. I have implemented a double-buffering scheme where the DCMIPP writes camera frames into the external PSRAM buffers and the LTDC reads from them for display.However, even with double buffering, I still observe screen tearing. I have tried:Switching the LTDC display buffer only during VSync (vertical blanking)Cleaning the CPU D-Cache before updating the LTDC addressDespite these measures, tearing persists. I suspect the cause is related to the limited bandwidth and high latency of the external PSRAM, combined with the LTDC FIFO prefetching. Essentially, the LTDC sometimes reads the external PSRAM while the DMA is still writing the new frame, causing partially updated frames to be displayed.I want to find a reliable solution to eliminate screen tearing while still using the external PSRAM for camera frames.This
Hi,I am new to STM32 and using DSI for the first time.I generated the simplest code for bringing up a custom DSI display board using CubeMX and TouchGFX. The code compiles successfully, but the CubeMX-generated function HAL_DSI_Init() within MX_DSIHOST_DSI_Init() (code snippet below) returns HAL_TIMEOUT at line 26.By default, HAL_TIMEOUT is set to 100ms, which is quite a long time... /* Get tick */ tickstart = HAL_GetTick(); if ((hdsi->Instance->PCONFR & DSI_PCONFR_NL) == DSI_ONE_DATA_LANE) { while ((hdsi->Instance->PSR & (DSI_PSR_PSS0 | DSI_PSR_PSSC)) != (DSI_PSR_PSS0 | DSI_PSR_PSSC)) { if ((HAL_GetTick() - tickstart) > DSI_TIMEOUT_VALUE) { /* Process Unlocked */ __HAL_UNLOCK(hdsi); return HAL_TIMEOUT; } } } else { while ((hdsi->Instance->PSR & (DSI_PSR_PSS0 | DSI_PSR_PSS1 | DSI_PSR_PSSC)) != (DSI_PSR_PSS0 | \ DSI_PSR_PSS1 | DSI_PSR_PSSC)) { if ((HAL_GetTick() - tickstart) > DSI_TIMEOUT_VALUE) { /*
Hey!I'm trying to create a driver for the STM32U545 for TinyUSB . Currently, theres a driver existing for device mode, and theres driver for the boards using synopsys and not usb_fsdev. I have followed the reference manual, and gotten so far:hcd_stm32_fsdev.c (the driver itself) stm32_helpers.h (helper function for different accesses) It detects the device, and starts sending some data, but then it just stops. Here's full stack trace:[13:54:09.609] Welcome to our controller![13:54:13.617] [0:] USBH Device Attach[13:54:13.771] Device unplugged while debouncing[13:54:13.930] [0:] USBH Device Attach[13:54:14.133] Full Speed[13:54:14.146] [0:0] Open EP0 with Size = 8[13:54:14.154] Get 8 byte of Device Descriptor[13:54:14.162] [0:0] Get Descriptor: 80 06 00 01 00 00 08 00[13:54:14.176] [:0] on EP 00 with 1 bytes: OK[13:54:14.185] [:0] on EP 80 with 1 bytes: OK[13:54:14.193] [0:0] Control data:[13:54:14.198] 0000: 00 |.|[13:54:14.215] [:0] on EP 00 with 1 bytes: OK[
I am currently working on a project that uses the STM32U575CGU3 microcontroller. The goal of the project is to display pressure and temperature values over CAN J1939 and CANopen communication protocols in a digital output format. For sensor data acquisition, I am using an external two-channel ADC to measure pressure and temperature values. Regarding the system clock, I have tested the application using both the internal clock source and an external crystal oscillator. The system performs well in both configurations. However, I would like to request your expert guidance on the recommended clock source for this application. Specifically: Is it advisable to use the external crystal for better timing accuracy and long-term stability? Or is the internal clock sufficiently reliable for CAN J1939 and CANopen communication in a production environment?
Hello,I want to interface two SAI of STM32L4S7VIT6 with two SGTL5000, which are working as transmitter and receiver at any time as used in telephone. Also interface one Si32287 through PCM. In datasheet SAI1_D1,D2, D3 are given but in reference manual it is not given. Also can we connect for one SGTL5000 with SAI1_FS_A, SAI1_MCLK_A,SAI1_SCK_A,SAI1_SD_A and SAI1_SD_B of same SAI1. And for other SGTL5000, can we connect SAI1_FS_B, SAI1_MCLK_B,SAI1_SCK_B of same SAI1 and for data SDI1_D1 and SDI1_D2. What are the functions of the lines SAI1_D1 and SAI1_D2?
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.