Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hello Community!I have an issue with reading / writing the RTC in an H723 MCU.The issue is:I can set the Clock to a date, but when I read out the RTC, then the year is 10 years in the future.e.g. I set the time to now (2025 / 06 / 22 19:mm:ss) and I read out the RTC after that, i get the corret day of month, month, hour, minute and second but the yearis 2035 (or better: 35 instead of 25, because the year in the Date Typedef is an u8 integer). This is my code: RTC_DateTypeDef d; RTC_TimeTypeDef t; d.Year = (uint8_t)(hDateTime->dt.year - 2000); d.Month = hDateTime->dt.month; d.Date = hDateTime->dt.day; t.Hours = hDateTime->tm.hour; t.Minutes = hDateTime->tm.min; t.Seconds = hDateTime->tm.sec; if(hDateTime->tm.dst) { t.DayLightSaving = RTC_DAYLIGHTSAVING_ADD1H; } else { t.DayLightSaving = RTC_DAYLIGHTSAVING_NONE; } uint8_t retval = 0; if(HAL_OK != (HAL_RTC_SetTime(&hrtc, &t, RTC_FORMAT_BIN))) retval |= 2; if(HAL_OK != (HAL_RTC_SetDate(
I have an existing project on an STM32F746g_disco board. The project uses lvgl under zephyr rtos. When I build and flash the zephyr/subsys/fs/fs_sample for this board, The terminal does read the sd card and return a listing of the root contents.I tried to apply the devicetree overlay, kconfig, and code to my lvgl based project, but it now shows an error of the mount point is unknown.I did more digging and with the help of claude came up with these changes. Error: 1. At one point I could get it to compile but the error reported was that the mount point didn't exist. 2. With this code I have a " undefined reference to `__device_dts_ord_208'" error, which seems to be associated wih the ".rodata.sdmmc_config_" file. Questions: Is this the correct approach to adding an sdcard to an lvgl project in zephyr?
Hi allI'm struggling for a while getting a µSD Card to run via SDMMC on FileX. I'm using a Nucleo U575 Board with an external SDMMC/SDIO-breakout board. I tried to follow the "Fx_uSD_File_Edit" example for the U575I-EV board.Long story short, I set up a FileX application thread on ThreadX and I'm trying to just open the media.In main.c there's the automatically generated MX_SDMMC1_SD_Init() initializing the the SDMMC1 interface just after GPIOs and ICACHE were initialized. In main.c everything runs through without any error.However, when entering the FileX application, the very first function getting called is MX_SDMMC1_SD_Init() again - as I configured FileX to initialize the SD IP (just as seen in the Fx_uSD_File_Edit-example). This time it ends in a HardFault in the Init. The one thing that I really don't understand is that it happens just on the call of sdmmc_clk = HAL_RCCEx_GetPeriphCLKFreq(RCC_PERIPHCLK_SDMMC);in stm32u5xx_hal_sd.cI enabled a breakpoint on the very first li
I am working on the communication between ADS199FE-PDK and the STM32F407-DISCO board. I created SPI code using the HAL library. MOSI line seems to be working, but MISO line returns 0xFF all the time. I cannot even read the registers. I am sharing my created code below. Also, I am sharing the logic analyser result of the SPI line. Thanks for your help./* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2025 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** */ /* USER CODE END Header */
Hello. I'm using a custom board with STM32F105RBT6. I used the MX_USB_HOST_Init() funtion to configure the host usb in mode usb_otg_fs. The problem is that some USB keys don't work (the USBH_Process() function can't go further the HOST_ENUMERATION state).Checking all the value returned by the involved functions I see this:USBH_HandleEnum() returns USBH_BUSY (in the ENUM_IDLE state);USBH_Get_DevDesc() returns USBH_BUSY;USBH_GetDescriptor() returns USBH_BUSY;USBH_CtlReq(phost, buff, length) returns USBH_BUSY;Inside the USBH_CtlReq() function, after the CMD_SEND, the functions goes to the CMD_WAIT state and the USBH_HandleControl() function returns USBH_BUSY.The USBH_HandleControl() is in the state CTRL_SETUP_WAIT, where the USBH_LL_GetURBState() function returns sometimes USBH_URB_IDLE or USBH_URB_NOTREADY or USBH_URB_ERROR.What could be the reason?
I am working on a project using the STM32F207ZG (NUCLEO-F207ZG) microcontroller with FreeRTOS, LwIP (Ethernet), and wolfSSL to communicate securely with cloud servers over HTTPS. I am able to successfully perform a TLS handshake and communicate with an AWS server by loading the Amazon Root CA 1 certificate—everything works as expected in this case. However, when I attempt to connect to a Firebase server using the corresponding root certificate, the TLS handshake fails with error code -188, which corresponds to ASN_NO_SIGNER_E. I verified that the Firebase root certificate is valid by testing it with the wolfSSL example code on a PC, where it worked correctly, indicating the certificate itself is not the issue. I also encountered the same -188 error when trying to connect to an Azure server, again using the appropriate root certificate. This suggests the problem is specific to the STM32 + wolfSSL embedded environment. Since AWS, Firebase, and Azure all use similar TLS configurations and
Hi,I have created an lwIP + FreeRTOS application using CubeIDE for my Nucleo 439 Board. The problem here is that the the init sequence generated by CubeIDE LWIP/App/lwip.c functionMX_LWIP_Init()it calls the following function without checking for the actual status of PHY (even when it is possible)/* We must always bring the network interface up connection or not... */ netif_set_up(&gnetif);So, even if I don't plug in my LAN cable to the RJ45 of Nucleo board, my network is marked as "UP", while actually its is "DOWN"I don't understand the need for this. I have seen the the EthLink thread is already testing the status of the actual phy and calling the same function for us. So what is the need to call it in init sequence?Ethernet Link State (Physical Ethernet Cable connection)This thread manages the Link state of netif. The thread's task function is defined in the file LWIP/Target/ethernetif.cIt runs in an infinite loop. With 100ms delay between loops.In each iteratio
Hi Sir, This is shiva chary ,am trying to implement Ethernet without LwIP,so when am configuring the ethernet MAC it is not resetting and am getting timeout error. can u please provide the solution for the respective errorThank youregards,shiva chary
As I tried to find CAN drivers for " STM32L4R9I-EVAL" but I didn't find any, And I tried configuring CAN example of Stm32L476G-Eval board but it is not working.Anyone who worked on STM32L4R9I-EVAL board please Guide me in this
Hello,We are thinking of switching from STM32F446 MCU to STM32U5A5 MCU in our device which is still in R&D.We are coding as bare metal. Since we are working with battery, low power is important for us. Also, our Quad SPI and USB HS work is critical and necessary.We have a problem. ST was giving the driver as USB_Device in STM32F446. However, ST does not give a ready driver in STM32U5A5. For this reason, there are a few things we do not understand.1) Do we have to use Azure RTOS to work with USB HS?2) Can we work with USB HS as bare-metal?3) Doesn't ST really have a driver for USB HS?4) How should the configurations for USB HS CDC be made in the .ioc file?5) Do we need to write the driver ourselves?Can you give us detailed information on the subject?Thank you for your help?
My project is a two-player Pong game using two joysticks, with each joystick controlling one paddle. The user interface was created using Touch GFX. The board is an STM32F429, and I have configured ADC1 to use channels 0 and 8. I’m using interrupts, but both paddles are currently being controlled by joystick 1, and joystick 2 has no effect. The adc_value1 and adc_value2 values read from the two joysticks via UART are identical.Please help me correctly read the value from each joystick so that each paddle is controlled properly.Thank you.
Hi everyone,I'm working on an STM32H7RS project (NUCLEO-H7S3L8) with the following setup:Bootloader in internal flash (0x08000000)Application in external OSPI flash (XIP) at 0x70000000Using Azure RTOS (ThreadX)Using TIM6 as the HAL time base (not SysTick)Configured using latest STM32CubeMX and STM32CubeIDE (v1.18.1)What I already checked:The vector table is correctly set in main() of the application: int main(void) { /* USER CODE BEGIN 1 */ #define APPLICATION_VECTOR_TABLE ((uint32_t)0x70000000) SCB->VTOR = APPLICATION_VECTOR_TABLE; __DSB(); __ISB(); /* USER CODE END 1 */ /* Enable the CPU Cache */ /* Enable I-Cache---------------------------------------------------------*/ SCB_EnableICache(); /* Enable D-Cache---------------------------------------------------------*/ /* MCU Configuration--------------------------------------------------------*/ /* Update SystemCoreClock variable according to RCC registers values. */ SystemCoreClockUpdate(); /* Reset o
Hello,I'm currently working with I3C in Target mode using STM32H7S3L8. I need to detect when the Controller sends a request to read data from the Target.In I2C, we can check the Address Match (ADDR) flag to know when the master sends a frame to the slave.Is there a similar flag or event in I3C to detect when the Controller is requesting data from the Target (i.e., a read request)?I'm using the I3C HAL/LL drivers, and I want to handle this case to prepare and send the correct response.Thanks in advance!
I have a stm32g071gbu6 , that is linked to an I2S amplifier TAS5722LPA5 (I2S_CK) -> BLCKPA15 (I2S_WS) -> LRCLKPB5 (I2S_MCLK) -> MCLKPB6 (I2S_SD) -> SDII use a divider bridge to pass my 3,3V stm32 output to a 1,8V which is the only voltage the TAS accept.I use a 10K and 12K ohm resistors to make my 1,8V.I had a problem to control all the I2S output but the BLCK one. To try the outputs, I disabled the I2S and changed all the pin to normal Output. I was still not able to have any control of the outputs.So I unsoldered resistor R28 on my MCLK output, and R32 on WS to be sure it didn't had any influence.I'm still not able to have 3,3V on my MCLK output, nor my SD and CS.As I saw a patern that the non working outputs were only on the same side of the MCU, I tried 3 of the 4 other pins from this side, I tried the UART one, it appear that the PB3 does not work either, but PB6 and PB7 seems to work.All the other pin that I could try seems to work fine.I tried a new project, and I tr
Hi, I'm trying to configure the internal RTC on the STM32H753ZIT6 development board, but the RTC isn't functioning correctly—the time doesn't increment. The code was previously working with Ethernet, and I attempted to configure the internal RTC to work simultaneously. However, after making these changes, neither the RTC nor the Ethernet functions are working. I’ve attached the code and output file for reference.
I used the NUCLEO-G474RE (NUG474RE$AT1) board to test the X-CUBE-EEPROM library. I did not notice that the STM32G474RBT3 had been soldered instead of STM32G474RETx. It appears it has been soldered to the PCB originally since there are no signs of PCB rework / IC replacement and we have never used this chip version in our company. Anyhow, while testing using the aforementioned processor, I encountered the following problems.I wrongly assumed first that the STM32G474RBT3 had 512 kB of Flash when it actually has only 128 kB. I set START_PAGE_ADDRESS to 0x0807C000, which is before the end of the 512 KB Flash. I encountered an issue with the PAGE(__ADDRESS__) macro. When the page address is too large, meaning it falls outside the Flash area, the current implementation truncates the value so that it falls within the area. However, it would make more sense to report an error.After I realized that my "test device" has only 128 kB of Flash, I changed the emulated EEPROM START_PAGE_ADDRESS to 0x
Hi, i'm working on connecting a multimeter to an stm32f2 via USB (STM32 as a HOST). The goal is to send SCPI commands to it (I easly did it in python just to chek the correct behevor of the multimeter).I implemented the USB Host lib but after few hours of debugging i cant figure out how to set the active class... (phost->pActiveClass != NULL) return false and i get "No registered class for this device". I have setup CDC in cubeMX but doesn't seems to work).I use the USBH_CDC_Transmit to send command to the multimeter but since the USBH_UserProcess state machine never reach APPLICATION_READY state it's not even a thing (i tryed sending commands in APPLICATION_START state but no success either).I get the folowing output with max lvl of debug :USB Device ConnectedUSB Device Reset CompletedPID: ea60hVID: 10c4hAddress (#1) assigned.Manufacturer : Silicon LabsProduct : METRIX MX5060Serial Number : 10003926Enumeration done.This device has only 1 configuration.Default configu
Hi, I'm using STM32G47 MCU. I'm facing problem in my system, where I have to read data from two SPI_ADC's, one after one. Both are connected in a same SPI bus, with each have separate CS pin connected to MCU. The problem is that, I want to do everything using only by DMA. No cpu intervention or no isr should be used. The steps to be done are, 1. make CS1 low, CS2 high.2. Start reading ADC1 ic, using spi_dma.3. once the read completed, make the CS1 high, and CS2 low.4. Now start reading the ADC2 ic. and repeat the process. Here the above steps should happen continuously without any software processing. The data has to be updated in the background in the buffer. The dma has to be chained in such a way that, it happens in a sequence above. I have checked some posts, they suggesting to do using timers, but i don't think it's reliable. So, kindly provide me the best suitable solution available. Thanks in advance.
Hello, I am using the STM32F429I-Disc1 development board and am trying to communicate with the external adc "ADS131M06". In order to do so, it requires full duplex spi communication with 24 bit words. Our board does not have 24 bit words so instead I am using 8 bit words with DMA communication for minimal if not 0 delay between words. To test that I can properly communicate with the chip, I have set it up with CPOL=LOW, and CPHA=2 edge. I then send 0x00, 0x11, 0x00, (repeat 0x00 21 times). This is because a full communication frame includes an instruction, followed by data, followed by 6 received frames. When I send the reset command the response from the device is correct but in my memory I receive 0xFE27. Does anyone know what could cause the last bit of each word to be off? I noticed it is also random so sometimes it is correct. The device says it reads on a rising edge and writes on a falling edge, and here DIN transitions at the same edge as DOUT so maybe its that, but
I have 3 potentiometers, one on each channel of the ADC, that vary 3V. The ADC reads the values and converts to voltage.I have not been able by reading the datasheet and looking at some examples online to figure out how to get it to work using interrupts (with DMA it works).I attach the entire project, can you kindly check it? Thanks!
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 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!
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,
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.
ST Community highlights – April to June 2026
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.