Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi, ı am trying to send some buffered data via SPI but it doesnt work. PA5-6-7 are automatically set by SPI and I also enabled PB6 for CS. Normally my algorithm needs to:1) Send 3 HF pulses to low and start interleaved ADC simultaneously.2) Take 1400 samples by DMA ADC(ADC Buf is 700 but it is interleaved so 1400 samples)3) Buffer this data and when DMA finishes, send it via SPI DMA4) Wait around 40ms and repeat You can find my main.c below.Also in logic analyzer that ı set for spi, I can kind of see the pulses but they and also CS pin are very unstable.
Hello,I'm currently working on an STM32 project using FreeRTOS, and I'm facing an issue with UART2 communication when interfacing with a GPRS module.Project Setup:UART3 is used for debugging (connected to a PC terminal) and is functioning correctly.UART2 is used for communication with a GPRS module.Both UART2 and the GPRS module operate at 3.3V logic levels.The firmware uses STM32Cube HAL drivers and FreeRTOS.What I’ve Verified:The GPRS module was tested by connecting it directly to a PC using a USB-to-Serial converter, and it responds correctly to AT commands.I also performed a loopback test on UART2 (connecting TX to RX), and it worked as expected — transmitted data was received correctly.Issue Faced:However, when I connect the GPRS module to UART2 (TX to RX, RX to TX, GND to GND), I observe that:The UART2 interrupt triggers continuously, even when nothing is being sent.The receive buffer fills with random or garbage data.As a result, I’m unable to communicate with the GPRS module pr
I have a TouchGFX Designer project that I setup in a Windows environment. In my .gitignore, I excluded the TouchGFX/generated folder so that all files can be generated fresh when the project is built on a new system.I would like to be able to build the project in a Linux environment. However, since TouchGFX designer is not supported on Linux, I was hoping that I could run a make command to generate them without the Designer application. The only thing I could find was a command to invoke the tgfx.exe file provided with the designer.Is it possible to build the generated code from TouchGFX designer in a Linux environment?**EDIT**I have created a Docker container that is running Linux, I have installed WineHQ in it to run the tgfx.exe file. Unfortunately, the container is having issue with running the GUI, is there a way to execute the tgfx.exe functions without invoking a GUI/window?
Hi all,I'm working on the STM32U5G9J-DK development board and trying to enable USBX-based MSC (Mass Storage Class) device functionality.My actual product is a battery-powered device, so USB Power Delivery (PD) is not an option. However, it's critical for my application to detect when a USB host (e.g., PC) connects or disconnects to/from the device, as I need to perform certain app-level tasks on both events.Since the USBX MSC device example was missing in CubeIDE, I updated the USBX CDC ACM device example to function as an MSC device. The device starts and I receive the "USBD_STORAGE_Activate" callback when a host is connected (when I call HAL_PCD_Start directly after initialization), but I do not receive the "USBD_STORAGE_Deactivate" callback when the host disconnects.I also tried enabling the VBUS sensing option, but the example started misbehaving when I selected that. So I had to disable it.What I’m looking for:A reliable method to detect both connection and disconnection events, e
I want to interconnect STM32F407 microcontroller (on the STM32F4 Discovery board) with CS43L22 audio DAC from the same board and external TV tuner R820T but on the same I2C bus. The R820T works correct when RESET line of the CS43L22 is tied low. When I turned RESET line to high in my code and added initialization code for CS43L22 (including I2S) it works fine but R820T not. Here comes schematic diagram. The CS43L22 and obviously R820T are connected to I2C1 PB9 (SDA) and PB6 (SCL):The A0 line is connected to ground so I2C address is 0x94 and it's correct. According to the R820T datasheet it has 0x34 address:So what's the issue? I faced addresses conflict. I checked my code and hardware with oscilloscope and logic analyzer. It's also everything perfect except something extremely strange with CS43L22. It shouldn't be something like that but CS43L22 respond to both addresses 0x94 and 0x34. I disconnected my board with R820T from the Discover Board and it's really like that. I scanned I2C b
hello, When configuring the STM2H7 LTDC display controller in CLUT mode, the CLUTWR register needs to be write. In the official example provided by STM32, the register is cycled 256 times to configure the CLUT table. This method of writing 256 times to a register in a loop is different from common sense. How should we understand this configuration method? or who can give me some other example as this config method, thanks! for (counter = 0U; (counter < CLUTSize); counter++) { if (hltdc->LayerCfg[LayerIdx].PixelFormat == LTDC_PIXEL_FORMAT_AL44) { tmp = (((counter + (16U * counter)) << 24U) | ((uint32_t)(*pcolorlut) & 0xFFU) | \ ((uint32_t)(*pcolorlut) & 0xFF00U) | ((uint32_t)(*pcolorlut) & 0xFF0000U)); } else { tmp = ((counter << 24U) | ((uint32_t)(*pcolorlut) & 0xFFU) | \ ((uint32_t)(*pcolorlut) & 0xFF00U) | ((uint32_t)(*pcolorlut) & 0xFF0000U)); } pcolorlut++; /* Specifies the C-LUT address and RGB value */ LTDC_LAYE
Hi ST Community Team,I am currently working with the STM32U585x SoC family and need assistance with configuring the ADC for multiple channels. My project involves:One differential input signal using PA0 and PA1 (Channel 5)Six single-ended input channels: CH7, CH8, CH9, CH10, CH11, and CH12Could you please guide me on the following:How can I read data with high precision for the differential signal (PA0 and PA1, CH5)?How can I read data from the single-ended channels listed above?I would appreciate your help in configuring both types of signals in a single project, Please share the STM32 Cube configurations and Firmware of it.Thank you in advance for your support.
I'm using an STM32L452RE MCU to communicate with the L6470 stepper motor driver via SPI, and I'm currently having trouble reading data from the driver. I’m able to transmit data (e.g., RUN, MOVE, SOFT_STOP commands). The motor runs and responds correctly, so SPI transmit appears functional.Problem: I'm trying to read registers like ABS_POS, ACC, etc. using the GET_PARAM command. I always receive 0 in response, regardless of the register.Setup: MCU: STM32 (HAL SPI) SPI Mode: CPOL = 1, CPHA = 1 (Mode 3) Driver: L6470 Motor: Connected and moving MISO, MOSI, SCK, CS connections confirmed uint32_t L6470_ReadABS_POS(void) { uint8_t cmd = 0x25; // GET_PARAM | ACC (0x05) static uint8_t TramsmitData[2]; TramsmitData[0] = cmd; TramsmitData[1] = 0x00; static uint8_t receivedData[2] = {0}; for (int index = 0; index < 1; index++) { L6470_CS_Low(); HAL_SPI_Transmit(&hspi2,&TramsmitData[index], sizeof(TramsmitData[index]), HAL_MAX_DELAY); HAL_SPI_Receive(&a
Building a product that utilizes BLE communication and since this is a new product, the STM32WB05KN was chosen due to the BlueNRG line being phased out.Unlike the BlueNRG line, they have a UART interface that would be advantageous to use, but seems to lack documentation. Doesn't seem to be found in the Wiki: WB0 Series WikiCan't find it in the um3355 documentation.Looking for basics, like UART parameters (baud, bits, etc), examples, and maybe some guidance on using DMA and Interrupts. What pins are required? Reset, IRQ.......
I am usi the IDLE event functionality of UART with HAL_UARTEx_ReceiveToIdle_IT() on an STM32G473QET6 controller. Is there a way to change the idle timeout using STM32CubeMX, or are there alternative methods to modify this setting?
Hi,I'm currently working on the STM32G491 board and implementing CAN communication. With the system clock configured using PLL at 80 MHz, I have set up the CAN peripheral with the following parameters: hfdcan1.Init.NominalPrescaler = 10; hfdcan1.Init.NominalSyncJumpWidth = 2; hfdcan1.Init.NominalTimeSeg1 = 13; hfdcan1.Init.NominalTimeSeg2 = 2; hfdcan1.Init.DataPrescaler = 2; hfdcan1.Init.DataSyncJumpWidth = 2; hfdcan1.Init.DataTimeSeg1 = 13; hfdcan1.Init.DataTimeSeg2 = 2; hfdcan1.Init.StdFiltersNbr = 10; hfdcan1.Init.ExtFiltersNbr = 0; With this configuration: The nominal time quantum (TQ) is 125 ns Nominal bit time is 2000 ns Bitrate is 500 kbps This setup works as expected. Now, I need to run the same CAN configuration using the internal HSI clock at 16 MHz. I updated the CAN settings accordingly: hfdcan1.Init.NominalPrescaler = 2; hfdcan1.Init.NominalSyncJumpWidth = 2; hfdcan1.Init.NominalTimeSeg1 = 13; hfdcan1.Init.NominalTimeSeg2 = 2; hfdcan1.Init.D
Hi there,I'm trying to describe the problems I'm facing with configuring dual direct OctoSPI chips on a custom board based on the STM32H7R7I8T.The setup includes:ISSI IS66WVO32M8DBLL PSRAM connected to XSPI Port 1.Macronix MX25UW25645GXDI00 NOR Flash connected to XSPI Port 2, configured in XIP mode via EXTMEM_MANAGER, which works fine during boot.“Try” is the key word here — because there are many issues.The PSRAM works fine on its own using a custom driver based on HAL — I'm able to configure it, read its ID, and enter memory-mapped mode. The problems arise when I try to use both memories together (e.g., in a basic TouchGFX setup with assets in Flash and the framebuffer in PSRAM).When both memories are initialized in the Boot context, everything works fine (no hard faults, I'm able to jump to Application). However, to use the custom PSRAM driver, I also need access to the hxspi1 handle in the Application context (or so I think — feel free to correct me). I’ve tried entering memory-map
Hi all,I'm facing an issue while building my STM32 project in Release mode, but everything compiles fine in Debug mode.The following error appears during the Release build:Middlewares/usbx/UX_Network_Driver/subdir.mk:19: *** unterminated variable reference. Stop.make: *** [makefile:85: all] Error 2There are no issues in any of the other source or header files. This only occurs in the subdir.mk under the USBX network driver middleware.I would like to understand:What could be the root cause of this error?Why it occurs only in Release mode and not in Debug mode?What steps can I take to resolve this?Any guidance or suggestions would be greatly appreciated.Thanks in advance!
Dear ST trams,I am using STM32H750 for a project. In the STM32CubeMX, I configured two ADCs in Dual regular simultaneous mode only. Also I am using DMA and a timer for trigger. I have activated 6 channel for each ADC. The sequencing of channels is as below:ADC1: ch18 -> ch16 -> ch2 -> ch14 -> ch15 -> ch3ADC2: ch10 -> ch4 -> ch2 -> ch5 -> ch9-> ch7In the Keil debugging mode, when I am checking the ADC_BUFFER, I see that the sequence of channels is different. It seems that ADC2 sequence is shifted by one (like this: ADC2: ch7 -> ch10 -> ch4 -> ch2 -> ch5-> ch9 ). Could you please help me in this issue?Could the problem is the clock prescaler?Best regards,Davood.
I have an issue to understand the MCU blocks for JPEG encoder. I have an stm32h743 MCU which is connected to a video decoder with dcmi interface. In ram I have the captured 8-bit ITU-R BT.656 YCrCb 4:2:2 output. Saving the captured data from ram to a debug file, I can see the image is captured properly. The byte stream looks like: Cb0-1, Y0,Cr0-1, Y1, Cb2-3, Y2, CR2-3, Y3 .... total 720Y and 360CB and 360 CR, total 1440 bytes + 8 byte blanking per line. And I have 240 lines so the resolution that I am capturing is 720x240.As described in the AN4996, each 4:2:2 MCU contains 256 bytes organized as two 8×8 Y blocks plus one 8×8 Cb block plus one 8×8 Cr block. For a 720×240 image, I should need 45 horizontal MCUs × 30 vertical MCUs = 1,350 total MCUs. My confusion is the two Y blocks. I implemented the two Y blocks as:Y1 first row:y0, y1 ... y7Y1 second row:y16, y17...y23Y2 first row:y8, y9, ... y15Y2 second row:y24, y25 .. y31Is this correct?So Y1 contains the first 8 pixel columns,
Hi everyone,I'm having trouble flashing my STM32 microcontroller using an ST-Link V2. STM32CubeProgrammer detects the target voltage, but it fails to connect to the MCU. Here's a summary of my setup and what I've tried:Setup:Microcontroller: STM32H723ZGT6ST-Link Version: ST-Link V2Flashing Tool: STM32CubeProgrammer (latest version)Connection Interface: SWDTarget Voltage Detected: 3.12 VWhat I’ve Tried:Verified SWD wiring (SWDIO, SWCLK, GND, VCC)BOOT0 set to 0 (boot from flash)Checked for power on the boardQuestion:What else should I try to get the MCU detected? Could this be a clone ST-Link V2 issue, or something else with my MCU or wiring?Any help is appreciated — thank you!
Hello everyone, I'm learning about MCUboot. Currently I have tried searching for information online but still don't have an overview. So I hope everyone shares their experiences about MCUboot (things to learn here) and give me some programs to better understand it. Thank you very much.
Hi,which widget should I use to create a curved line?If there is no widget,what is the procedure to create a curved line?Thank you
How do I configure the DFDSM peripheral using CubeMX?I do know about the application note AN4990 and have read it. I also saw this threadhttps://community.st.com/t5/stm32cubemx-mcus/stm32h753-stpms2l-dfsdm-pt100-example-using-stm32cubemx/td-p/172652and have looked at the example in the stm32cubeh7 firmware repository, but I does not contain the CubeMX .iocIs there any example or tutorial?
We are using your development board for the Testing our Control Logics and Communication from our Server. We are facing issue in the Ethernet Configuration and need support and details Steps.
Hi,I am working on a lighting control project and looking for an STM32 evaluation board that supports native DALI interface.By native support, I mean:The MCU or board includes a built-in DALI transceiver or dedicated hardware for DALI communication.It has UART or GPIOs pre-configured for DALI timing.The board is supported by official firmware libraries for DALI protocol handling.Does ST offer any evaluation boards or MCUs with these features built-in? Or would I need to implement DALI support entirely in software with an external transceiver?Any suggestions or guidance would be appreciated.Thanks and Regards,Yaadesh S
Hi,I am trying to establish a successful transfer using SPI in master full duplex DMA mode using a NUCLEO-H7S3L8 board (STM32H7RSxx family)..The runs and SPI data can be seen from the MOSI pins, but with one problem: data is not successfully sent.In the following photo:504B @50MHz are being transmitted (CH1 trace - yellow one - is SCK, CH2 trace is CS):total time of transmission is:20us * 3.1 = 62usvs(504*8/50e6) = 80.64uswhich is the time required for such a full transmission, meaning that approx. 116 B (according to these numbers) are missing on transmission.However, when I read the GPDMA_CxBR1.BNDT[15:0] (previously programmed to 504) after GPDMA TC Irq, its value is 0, meaning that all the 504 should have been transmitted... But that's not true according to oscilloscope analysis.So ... what is the missing piece? Maybe an LLI setup?Thanks,s.
My colleagues reported problems with data loss when using the X-CUBE-EEPROM library with STM32G473RET6 processors. The data loss occurred after a long period of using or testing embedded systems (switching them off and on quite frequently). I decided to investigate further. Ultimately, I discovered that the primary error was on our end: most of the virtual addresses used in the firmware exceeded NB_OF_VARIABLES. I investigated further because I initially suspected that the recovery process after a power failure while writing to or erasing a FLASH page was inadequate. While testing, reading the documentation, and reviewing the code, I discovered a missing boundary check and few other issues.The inadequate boundary check is in the EEPROM library. The "eeprom_emul_conf.h" configuration file contains a line#define NB_OF_VARIABLES xxx /*!< Number of variables to handle in eeprom */My colleagues misunderstood the purpose of NB_OF_VARIABLES. They thought it indirectly defines how many Flas
The only other mention i have found of this is in the following posthttps://community.st.com/t5/stm32-mcus-products/usb-otg-dual-role-selection-from-cube-mx/td-p/569876I'm using an F4 with external PHY.Everything works fine when configuring the USB FS as exclusively device or host but i'm unable to configure CubeMX to use both.What is the solution to this issue?Do i have to manually copy the host/device implementations and make a frankenstein implementation?The end goal is to have a USB Device VCP, a USB MSC and switch between them depending on the need.I dont really need the OTG part since the switching part is handled separately outside of the CubeMX code. Any input is appreciated.
I am using STM32F407VE Black Board. It contains the STM32F407VET6 chip. It has a microSD slot but the slot's CD pin is not connected. Due to this f_mount() is always returning faults. I don't know if this hardware miss connection is the primary problem why f_mount() returns faults or there are more problems. Please help me out with this. I am stuck since 2-3 days. I tried modifying the dist_status and dist_initialize functions to bypass this hardware check but when I upload the code, the board does nothing for 20-30sec and f_mount again returns error. I have attached my code changesDSTATUS disk_status ( BYTE pdrv /* Physical drive number to identify the drive */ ) { // DSTATUS stat; // // stat = disk.drv[pdrv]->disk_status(disk.lun[pdrv]); // return stat; return 0x04; } // Inside diskio.h: /* Disk Status Bits (DSTATUS) */ #define STA_NOINIT 0x01 /* Drive not initialized */ #define STA_NODISK 0x02 /* No medium in the drive */ #define STA_PROTECT 0x04 /* Write protected */0x04
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.