Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hi ST Community,I'm working on an STM32H755ZIT6 project where I'm interfacing an SD card using SDMMC1 + DMA and FATFS (with exFAT) from the Cortex-M7 core. However, I'm facing a strange issue: the first time the board runs after programming, it writes and reads English text correctly to/from the SD card, but after one or two resets, the file content becomes garbled or shows Chinese-like characters instead of English. I suspect this may be cache, MPU, or alignment-related, but I'm not sure what I’m missing.Here is a detailed overview of my configuration and setup:1. MCU and Core ContextMCU: STM32H755ZIT6Core used for SD card operations: Cortex-M72. SDMMC1 Peripheral ConfigurationSDMMC Mode: SD 4-bit Wide BusSDMMC1 Clock Divide Factor: 0x04 (Targeting 50 MHz actual clock)SDMMC1 Interrupt: Enabled, priority set in NVIC to 143. Clock ConfigurationSYSCLK = 400 MHzCPU1_CLK (M7) = 400 MHzCPU2_CLK (M4) = 200 MHzPCLK = 200 MHzSDMMC1_CLK = 200 MHzActual SDMMC1 Clock = 200 MHz / 4 = 50 MHz4. FATF
Hello Experts,I see that in cmsis_oc.c that the function osThreadIsSuspended is disabled. The variable INCLUDE_eTaskGetState is responsible for it.But how do we enable INCLUDE_eTaskGetState to 1 by default? I see in FreeRTOS.h header than the macro is set to 0. Can i just force it to 1 in FreeRTOS.h? or do we need to enable any particular config parameters in the .ioc file ?Kindly Help!
Hi, there; I am using stm32u575zit6 to make a demo, I configured the threadx/filex/levelx for the system as I would like to have the filex on nand flash W25N01GVZEIG. Here I met a strange issues for the files opeations, I debugged for weeks, but I cannot figure it out. Here is the description1: I can successfully open/write/read/close the files2: I am sure that when I wrote into the file, it was written into the nand flash and made sure it was wirtting sucessfully as I read it back to confirm in nand flash driver level3: But when I reopen the files to read out , I found the files are still old ones.4: the nand driver is writted with reference to the examples of the Fx_Dual_InstanceIs it possible the stcubemx configuration issues or my driver's issues?thank you ChengtaoThe nand driver is as the following: u8 NAND_ReadPage(u32 PageNum,u16 start,u8 *destination,ULONG words) { u8 ret = 0; u16 load_len; flashPageRead(&spi_flash, PageNum); // Addr is column address flashDataBuffe
I have started looking at using the Azure RTOS package for my project but see it has since become Eclipse RTOS? Is STM supporting this RTOS anymore as I see the H7S3 Azure RTOS package was only updated seven months ago whereas the H7 branch as updated more recently? Is it still secure?
Hi all, the Modbus-serial bit sequence my Nucleo_H7A3ZI_Q is generating (as a client) looks good in the console terminal on my computer. However, at an oscilloscope, two of the bytes are missing: the function code 03 and the part of the CRC (cyclic redundancy check) section. Two images are attached. I build and flashed the program with Zephyr RTOS. Any help is appreciated. Thanks
Hi,I need to configure the I2C master on my STM32G491 to operate in a multimaster setup. It is currently connected to a slave device, but we also plan to connect another I2C master to the same bus. The slave device supports I2C multimaster communication.On the STM32 side, do I need to enable any specific settings to support multimaster mode? From community forums and FAQs, I’ve learned that I need to handle arbitration loss and bus errors, and then retry the transmission. Is that sufficient, or is there anything else I should check for?
Hallo,I try to use LwIP with freertos. The sw was generated via CubeMX.I have problems to get it running. So I did some investigations. I found some strange behavior of the overall timing.DHCP retrys when failling getting the IP-address. But the time between retrys are very long. The reason for this behavior seams to be a failure in"STM32CubeFX/Middlewares/Third_Party/LwIP/system/OS/sys_arch.c, Release v1.16.0! in function "sys_arch_mbox_fetch".It is the line 184 .... #else status = osMessageQueueGet(*mbox, msg, 0, timeout); if (status == osOK) .... As mentioned in the description of the function the value timeout is [ms]. The caller of "sys_arch_mbox_fetch" uses [ms] as it seams to me.But osMessageQueueGet expects [kernel-ticks] (CMSIS-RTOS2, RTOS V2). As long as kernel-ticks has a length of 1ms everything works as expected. I thing CubeMx generates the default value 1ms.But I changed the kernel-tick to 10ms; so the waiting time is 10 times of timeout. A proposal for correction: uint3
Hi,I intend to make an Ethernet to USB adapter by using a NUCLEO card (which already has the ports). The objective will be to communicate via USB between the nucleo and a PC, and from the nucleo to another PC. To develop this project I have a h563 and h755.If you have any ideas that can aid me in the development of this project, I would be pleased to test them.Gune,
Hello, I am having a difficult time with the WM8994 audio codec inside the STM32H747i-DISCO board, i am able to write to the registers and pass through analog audio through the speakers when avoiding any ADC and DAC signal routing but i am having a difficult time with setting those registers as im not receiving any speaker audio output when going through the mixer. ive tried setting the I2S CKIN as well as PLL clocks to SAI, configuring only SAI1 Tx and RX as well as DMA2 streams 4 and 1 but my audio buffers are empty. i have zero clue what is going on as ive re confirmed all the appropriate register writes are correct and signal paths are enabled. ive looked at the SAI and DMA settings of the BSP audio code and still no luck. I provided a link to my github to my main c file only. Please help https://github.com/Johan-Pirsch/ADC_WM8994/blob/main/src/main.c
Excuse me. I have some trouble in CORDIC function.I Config CORDIC by Q1.31 for input and output data format. CORDIC can't work and the return data is right.But I change the CORDIC input data to Q1.15 in config, It can't work. I always get 0.Below is my config ... LL_CORDIC_Config(CORDIC, LL_CORDIC_FUNCTION_COSINE, /* cosine function */ LL_CORDIC_PRECISION_4CYCLES, /* max precision for q1.31 cosine */ LL_CORDIC_SCALE_0, /* no scale */ LL_CORDIC_NBWRITE_1, /* One input data: angle. Second input data (modulus) is 1 after cordic reset */ LL_CORDIC_NBREAD_1, /* One output data: cosine, then sine */ LL_CORDIC_INSIZE_16BITS, /* q1.15 format for input data */ LL_CORDIC_OUTSIZE_16BITS); /* q1.15 format for output data */ and this is send data to CORDIC tempf = input_degree /180.0f; if(tempf > 1) { tempf = tempf-2; } else if(tempf <-1) { tempf = tempf+2 ; } temp_16 = (float)tempf * 32768; //for 16bit ANGLE_CORDIC = (temp_16); //for 16bit input /* Write angle
Hi everyone,I'm currently working with the STM32H573G-DK board using the Nx_WebServer example (NetX Duo HTTP server) provided in STM32CubeMX. During testing, I noticed what seems to be a blocking behaviour, and I’d like to verify whether this is expected or if there’s a way to handle it differently.Here's the scenario I tested:I modified the server to simulate a long-running request by adding a `tx_thread_sleep()` delay (~20 seconds) before sending the HTTP response.While this delayed request is being processed, the client sends a second HTTP request that should be answered immediately.However, the second request does not get processed until the first (delayed) request finishes and the response is sent.This suggests that the HTTP server is processing requests sequentially, and a single long-running request can block all other requests, which is problematic for use cases like long polling.Is this single-threaded, blocking behaviour expected for the NetX Duo HTTP server?Has anyone found
I am using the Nucleo-H7A3ZIQ for a project, utilising the Communication Device Class of the USB OTG-HS. Everything was working well, then there was an issue that the timers stopped taking inputs with the USB configured, while they worked fine when USB wasn't used. Due to this, I started tinkering and set the NVIC preemption priority for the USB to 1 (all others were 0). This resulted in a lot of program crashes, and the USB CDC not recognised even by the OS.It started working fine when I reset its priority. Any idea about this, and also the timers not taking inputs?
Previously, I used the HAL_DFSDM_FilterRegularStart_DMA method to enable each of the eight filters one by one. The result was a 2.4Mhz clock output, exactly as configured in CubeMX. Now, to achieve high sync between 8 filters, i referred to the synchronization content in the reference manual(RM0455): i followed the instruction and programmed as below:/** * @brief Configurate DFSDM Filter * @retval None */ void WJ_DFSDM_FilterSyncConfig(void) { // Disable Filter to set RSYNC hdfsdm1_filter0.Instance->FLTCR1 &= ~DFSDM_FLTCR1_DFEN; hdfsdm1_filter1.Instance->FLTCR1 &= ~DFSDM_FLTCR1_DFEN; hdfsdm1_filter2.Instance->FLTCR1 &= ~DFSDM_FLTCR1_DFEN; hdfsdm1_filter3.Instance->FLTCR1 &= ~DFSDM_FLTCR1_DFEN; hdfsdm1_filter4.Instance->FLTCR1 &= ~DFSDM_FLTCR1_DFEN; hdfsdm1_filter5.Instance->FLTCR1 &= ~DFSDM_FLTCR1_DFEN; hdfsdm1_filter6.Instance->FLTCR1 &= ~DFSDM_FLTCR1_DFEN; hdfsdm1_filter7.Instance->FLTCR1 &= ~DFSDM_FLTCR1_DFEN; //
Hi,I want to enable the onboard microphone sensor in STM32H757I-EVAL and code that for recording audio. I am struck here for some days. It would be great if anyone can share your insights on how to navigate through this. It would be appreciated if anyone can also share how to configure this in stm32cubeideThank you
I am currently working on initializing the Ethernet peripheral on the Nucleo-H723ZG using the following environment:CubeIDE Version: 1.17.0 (MacOS)STM32Cube Firmware Version: H7 V1.12.1While calling the MX_ETH_Init() function, I encountered an issue where HAL_ETH_Init(&heth) returns HAL_ERROR. Upon debugging, I found that the problem is related to the software reset step in the initialization process.Here is the relevant portion of the code from stm32h7xx_hal_eth.c: /* Ethernet Software reset */ /* Set the SWR bit: resets all MAC subsystem internal registers and logic */ /* After reset all the registers holds their respective reset values */ SET_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR); /* Get tick */ tickstart = HAL_GetTick(); /* Wait for software reset */ while (READ_BIT(heth->Instance->DMAMR, ETH_DMAMR_SWR) > 0U) { if (((HAL_GetTick() - tickstart) > ETH_SWRESET_TIMEOUT)) { /* Set Error Code */ heth->ErrorCode = HAL_ETH_ERROR_TIMEOUT
Hi, I am trying to interface the internal microphone sensor (MP34DT05TR-A) in STM32H757I-EVAL. The goal is to record audio from the MP34DT05 microphones, store it on a microSD card, and play it back on a PC. I'm not able to navigate through this; could you share some resources or the steps that need to be followed to configure this and to record the audio? Also, there are three different data formats: audio codec, DFSDM, and PDM. Which do you think will be suitable for the data acquisition part?
I'd like to adapt Openbootloader to the H523/H533 chip.In STM32CubeIDE, there are example applications for several microcontrollers/development boards. I noticed there was an example for the STM32H5731-DK, but I'd like to use it on the H523/H533 chips.It would be great if somewhere in the documentation there was information on what needs to change to adapt to other chipsI have been trying to edit openbootlader_conf.h, but have been struggling to find certain values in the H533/H523 reference manual or data sheetOB_SIZE (and other option bytes related fields)I see Table 51, which has option bytes listed, but when I count them I can't re-create the 432 number which is in the openbootloader_conf.h for the H573 chip. I also can't find references to OB_START_ADDRESS or OB2_START_ADDRESS when I search for the actual hex value in the openbootloader_conf.h for the H573 chip (0x40022050U)ICP_SIZEAlso ICP_START_ADDRESS. Searching the reference manual for ICP gives 9 results, none of which are re
Hi,I am trying to us X-CUBE-EEPROM to store a few variables.I would like to perform memory cleanup on startup. It is the only time I can reliably do that, since the operation is blocking read of instructions from flash.Is there any way I can tell the cleanup should be triggered? I need to know before writing new data. Only way I can see in documentation(AN4894) is to try to write and see if I get EE_CLEANUP_REQUIRED returncode.
Hey there, I recently started learning how to use Azure RTOS on STM32 with NUCLEO-h723ZG Board. While following this courseDeveloping with Azure RTOS on STM32 Series Microcontrollershttps://academy.st.com/s/learning-plan-detail-standard?ltui__urlRecordId=a6g3W000000k9jMQAQ&ltui__urlRedirect=learning-plan-detail-standard&tabset-7a350=2I came accross the FileX section in Session 6. At slide 31 the course wants me to delete a file and copy some other from a specific directory. As I'm using a higher version than the course I was not able to find the FileX folder in the directory mentioned. What can I do about this problem, because I can't proceed my learning process with FileX? Is there any up-to-date-Guide that I can follow along?
Good morning,I have a doubt regarding the behavior of the "HAL_FDCAN_GetRxMessage" routine of the HAL for the FDCAN peripheral.I am using an STM32H563VGT6 microcontroller.From what I can observe by inspecting the code, it seems that when overwrite is enabled and the FIFO is full, the first element in the FIFO is discarded.This happens without first checking if an actual overwrite has occurred via the RF0L/RF1L bits of the FDCAN_RXF0S/FDCAN_RXF1S registers.As a result, it might occur that no overwrite has taken place, but messages are still discarded and therefore lost.Am I missing something?
I have a project (STM32H7) using Eclipse ThreadX 6.4.0. I would like to use the safety certified version of ThreadX (6.4.2). How would I go about this transition? Is there an application note covering this subject? Thanks, Gil
Hi, I was working with Modbus Protocol with the external device(Aster TDS Meter). The Modbus External device Settings in 9600baud rate, 8bit,parity none and 1stop bit My Problem was when i connect the device with UART4 i am able to get the output properly but i need to use UART2 but while using UART2 not able to receive the data properly what i am missing? UART4 Configuration static void MX_USART4_UART_Init(void) { /* USER CODE BEGIN USART4_Init 0 */ /* USER CODE END USART4_Init 0 */ /* USER CODE BEGIN USART4_Init 1 */ /* USER CODE END USART4_Init 1 */ huart4.Instance = USART4; huart4.Init.BaudRate = 9600; huart4.Init.WordLength = UART_WORDLENGTH_8B; huart4.Init.StopBits = UART_STOPBITS_1; huart4.Init.Parity = UART_PARITY_NONE; huart4.Init.Mode = UART_MODE_TX_RX; huart4.Init.HwFlowCtl = UART_HWCONTROL_NONE; huart4.Init.OverSampling = UART_OVERSAMPLING_16; huart4.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; huart4.Init.ClockPrescaler = UART_PRESCALER_DIV1; hu
Hi there, I'm attempting to run an FFT on a sine wave input with frequencies from 0.1-1Hz however i seem to be getting incorrect frequencies from my FFT. Any help would be appreciated. #include "main.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include <stdio.h> #include <string.h> #include "arm_math.h" /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ /* USER CODE BEGIN PTD */ /* USER CODE END PTD */ /* Private define ------------------------------------------------------------*/ /* USER CODE BEGIN PD */ #define SAMPLE_RATE 200 // Adjust the sample rate (samples per second) #define DURATION 12 // Duration in seconds #define TOTAL_SAMPLES (SAMPLE_RATE * DURATION) #define FFT_SIZE 1024 // Define FFT size (must be a power of 2) /* USER CODE END PD */ /* Private macro -------------------------------------------------------------*/
hii everyone i would like to send an integer number that i get from the user on html webpage to the stm32 controllerlets say in the controller i just want to print the number that received from the webpage what is the method that i need to use in order to receive an integer number from a web page i saw once a method to send a string called CGI but i need to transfer an integer number not a char or a string how can i do this
Hi,Is there any RS485 example code available for STM32G497 ?I referred in community for sample code for enabling RS485, didn't get it.
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.