Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hi, Is there any code for driving vd55g1 in STM32N6570-DK? It is stated in STMicroelectronics/stm32-mw-camera that vd55g1 is supported, but I have not found the demo for its use. Could you please provide the demo?
I had a look at the published SBOMs for Series like STM32U5They all include the the package name, license, sometimes a supplier.And all have a BlackDuck-Component and BlackDuck-ComponentVersion.Hower, only a few external components have a cpe or purl entrySo I am wondering if ST has published any information about how we would use these BlackDuck-Component IDs? Is any information about these public, or is it an ST internal ID or do I need any subscription with BlackDuck to make a sense of it?Have you considered assigning CPEs or PURLs for all the packages in the Stm32cube package?
Hello everyone,in my current project, I'm working with a Nucleo H743ZI2 (with an STMH743ZIT6). My goal is to read audio data from MEMS microphones using DMA and DFSDM filters. The ultimate aim is to build an 8-microphone array, but for the first step, I only want to read data from a single microphone. And this is exactly where my problem lies: currently, no data is being saved in RAM. I suspect the problem is with DMA, as I've observed the following:DFSDM:The following bits are set in the DFSDM control register: DFEN (DFSDM_FLT enabled), RCONT (continuous mode), and RDMAEN (DMA channel enabled to read data for the regular conversion).The value of the RDATAR register changes continuously => data is being read by DFSDM.In the ISR register, REOCF (end of regular conversion) is set, followed by ROVRF (regular conversion overrun) => REOCF should be cleared by DMA (it might be cleared and set again, which goes unnoticed during debugging, but i don´t think so as the DMA is not sta
Hi!i have managed to port the exisiting example of USBX device printer to the H563 micro and use it.now i'm trying to do the same thing with the USBX HOST printer class.but there are two problems:1) there isn't an example2) if i create a new project and select USBX HOST printer i think there are some missing files in the cube generationfor the device printer class the cube generate app_usbx_device.c app_usbx_device.h ux_device_printer.c and ux_device_printer.h for the Host printer the cude generate only app_usbx_host.c and app_usbx_host.ham i missing something?my cube ide is 1.18.0 release thank you !
Hello All,I am new to embedded systems.I am trying to enable ethernet communication in stm32f746 discovery board.But I am failing to achieve this, sometimes I am able to ping the device and sometimes not.I came across a thread https://community.st.com/t5/stm32-mcus-embedded-software/how-to-make-ethernet-and-lwip-working-on-stm32/m-p/261456 which mentions faults in LWIP and documentation.Even when I am using the example project STM32Cube_FW_F7_V1.17.0\Projects\STM32746G-Discovery\Applications\LwIP\LwIP_HTTP_Server_Netconn_RTOS I am able to ping the device sometimes only.Please guide me accordingly, I am not asking for a complete working project only a healthy documentation and links. Thankyou
I need to send a single address byte with write bit and read bit.For the write, I'm using HAL_I2C_Master_Transmit_IT(&hi2c4, I2C_ADDRESS, (uint8_t*)i2c_buff, 0)It works perfect, it sends a start, single address with write bit cleared, slave device ACK's and stop works fine.I need the exact same thing, but with the read bit set.I tried:HAL_I2C_Master_Receive_IT(&hi2c4, I2C_ADDRESS, (uint8_t*)i2c_buff, 0)It just sends the start, address, read bit set, slave device ACK's ok, but then MCU doesn't do the stop bit, gets stuck infinitely waiting. I've tried using the LL drivers too, and also played around with disabling AUTOEND and using SOFTEND to try to manually generate start, send addr and then stop, no go, just waits for the I2C_ISR_STOPF flag to be set, which never happens. On the scope, SCL goes high, but SDA stays low.Any ideas? Using STM32U535, I2C4
Can someone please guide me with 8KHz audio, echo cancellation is almost perfect for 16khz audio on stm32u5, but seems problematic at 8KHz, i've tested pass-through (loopback, mic connect to speaker) at 8Khz and it is clear when AEC is disabled, also when pre-processor is disabled and AEC is enabled, it can remove the echo but I need pre-processor for agc, ns related stuff.#ifdef SPX_EC_FS_8000 #define ECHO_BUFF 128U #define NN_MAX 128 #define NN 128 #define FS (uint16_t)8000 #elif defined (SPX_EC_FS_16000) #define ECHO_BUFF 128U #define NN_MAX 128 #define NN 128 #define FS (uint16_t)16000 #elif defined (SPX_EC_FS_32000) #define ECHO_BUFF (32*8) #define NN_MAX (32*8) #define NN (32*8) #define FS (uint16_t)32000 #elif defined (SPX_EC_FS_48000)I've tried to change ECHO_BUFF to 64 as well, but no success so far, maybe this library isn't tested for 8KHz audio, but speexdsp support 8KHz, reason I'm trying to achieve aec at 8KHz is because VOCODER for audio compression supports o
Current Situation: I have implemented a bootloader that receives a .hex file and writes the application starting from Sector 2. After successfully jumping to the application, the system runs as expected. The Problem: Once the application is running, if I send a new .hex file, it is not accepted by the bootloader unless I perform a hardware reset. Currently, I can only reset the board manually using the reset button. What I Want: I want a software-controlled reset mechanism. When the application is running and a new .hex file is sent (or an update request is detected), the system should trigger a software reset (NVIC_SystemReset()), switch to the bootloader, and allow the new .hex file to be processed automatically—without requiring a hardware reset.
Good afternoon,I'm using the STM32H723ZG Nucleo Board, and I'm trying to collect data using I2S + DMA coming from a PCM1803AEVM that is a 24-bit ADC used mostly for audio purposes.I've set the PCM1803 as controller (MASTER), it is generating the BCK, LRCK and SDO and I can see these three signals using the oscilloscope. I see also the correct frequencies.BCK:3.072MHzLRCK: 48kHzSDO: digital values equal to -1,0.+1 as expected since there is no input signal.Now, from the STM32 board I've set the .ioc file related to the I2S part in this way:DMA:The main code is the following, very simple: #define BUFFER_SIZE 100uint32_t samples[BUFFER_SIZE] = {0};int main(void){ /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MPU Configuration--------------------------------------------------------*/MPU_Config(); /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Sys
I am using STM32G030 for my project when using version Z (REV_ID 0x1001) the functions in the firmware run as required. But when using the same firmware, the above hardware loads version Y (REV_ID 0x1003) the functions run incorrectly, especially the timing functions using RTOS. Has anyone ever encountered a similar case and has a solution as well as knows the cause of this error? Thanks
Hi everyone, I was wondering if is it valid to allocate DMA buffers for USART/SPI etc.. on the heap using aligned_alloc() function?My board is the NUCLEO-H743ZI2 If its possible - is it good practice?Thanks, Ariel
I have some code on the STM32G030 processor using only LL drivers.I need to write on some area in the flash of the processor.I undestood that there is no LL driver for Flash, but the proble is that If I try to use some HAL functions, like HAL_FLASH_Unlock I get that the linker does not find it.So the question is how can I add HAL Flash support (.h and .c) in a project that have only LL drivers?Thank you.Regards.Mau.
Hello, I'm running into an issue interfacing the STM32H7R3V8H6 with a MAX31856 where whenever I try to use any sort of SPI functionality, it returns HAL_Error. This issue surprises me because the code that I am using is identical to the code I used on another H7 chip and that worked. Things I have tried:1. Lowering the SPI clock speed.2. Ensuring that the SPI and CS pins were set up correctly (CS pin was set to digital output and the GPIO was configured for the application not the boot. Same for the SPI pins.)3. Changing the SPI GPIO pin speed to very fast.4. Probing the signals with an oscilloscope (I couldn't get very good results since I'm probing the pins on a custom board, but I was able to verify that SCK was working, but I couldn't determine if MISO or MOSI was functional)5. Switching SPI from SPI1 to SPI3.For reference I am using SPI1/3 on pins PB3, PB4, and PB5. #include "main.h" /* Private includes --------------------------------------------------------
Hello ST Community,I’m currently working on integrating the MX25QL128 NOR Flash (connected over QSPI) with the STM32F746 microcontroller. My goal is to use it with Azure RTOS FileX and LevelX for filesystem access. I’m using STM32CubeIDE and the latest version of Azure RTOS.Setup:MCU: STM32F746NGExternal Flash: MX25QL128 via QSPIMiddleware: Azure RTOS (ThreadX, FileX, LevelX)Interface: QSPI in Memory-Mapped ModeGoal: Format, mount, and use FileX filesystem stored on MX25QL128Request:I’m looking for:Sample code/project showing working integration of FileX + LevelX + MX25QL128 via QSPI on STM32Any ST reference projects or application notes specific to this setupClarification on required QSPI mode/timing/memory map settingsCommon pitfalls (e.g., erase before format, QSPI memory-mapped setup timing, etc.)Any working FileX + LevelX configuration example (even with another STM32 MCU) that could help me align my integration. Any working example or advice would be very helpful. Thanks in
Goal: to use embedded STM32H673/563 bootloader commands: read, write, verify flash with simple GUI on PC side. Do you have full algorithm description/implementation/full code example?
I'm developing a project with the dual-core STM32h755zi-q, but when I run the m4 core while debugging, I encounter the error, "Break at address "0xa05f0000" with no debug information available, or outside of program code." I've configured the debugging settings according to the documentation and video shared by ST. I'm currently working on the m4 core, and I'll switch to the m7 core later, but I'm not making any progress due to the error I mentioned above.I would like to express my gratitude to everyone who helped.
I’m using the NUCLEO-N657X0-Q board and I'm creating a custom NN project using lwIP (that has the necessary weights stored at 0x7100 0000 - external Flash) and I'm trying to make it run when booting from Flash.I am currently using the “Template_FSBL_LRUN” example from STM32Cube_FW_N6_V1.2.0 as my first-stage bootloader. The FSBL correctly copies my main application from external Flash (mapped at 0x7010 0000) into internal RAM and then jumps to it. But then I noticed my app crashed when including parts of the code related to lwIP or the NN and after reading some XSPI2 registers I saw that the SR register had a value of 0x 0000 3C20 when entering my application which means the XSPI2 is already busy and its FIFO is full, so every fetch hangs.When trying to debug to see when the XSPI2 gets busy I noticed it was after this line in stm32_boot_lrun.c:source = (uint8_t*)(MapAddress + EXTMEM_LRUN_SOURCE_ADDRESS);Also when running the application straight from the STM32CubeIDE I noticed that the
Greetings! I am testing a touch button in a custom board using stm32u585 mcu. I try to follow the following workshops available on YouTube: Workshop 1 Workshop 2 The thing is, I tested in Debug Mode like in Workshop 1 in minute 15 and I could see the Delta value changing. Since the thing was working I try to implement the touch in my project. The thing is, now Delta is staying fixed, and I have absolutely no idea why it is happening. I can see the p_Data->StateId changing (PROX, DETECT, etc) but Delta value is the same. Any clue where I could be having the problem? I did not do the "MyTKeys[0].p_ChD->Delta /= 3;" in tsl_user.c, nor in the first test, and it worked at the first time.So basically my code in main.c was something like this: #include "tsl.h" #include "touchsensing.h" ... int main(void) { "ALL THE INITS" tsl_user_Init(); tsl_user_status_t status; while(1) { tsl_status = tsl_user_Exec(); if(tsl_status != TSL_USER_ST
Hi all, SynopsisI have just found a severe error in FileX that looks like buffer overrun in fx_file_read(), but the problem is much deeper. This function leads to the function sd_read_data() which when invoked with use_scratch_buffer = 0 reads sectors to a user buffer directly. Unfortunately caller of the sd_read_data() (function fx_stm32_sd_driver()) checks buffer alignment for 4 only despite if project uses data cache or not. What happens next is very simple: sd_read_data() invalidates the cache for the entire buffer. If it is not aligned to cache line size then some bytes around it are also invalidated. If these bytes were dirty in cache they are lost. If the user buffer is allocated in the heap it hopelessly corrupts it. Workarounds In the function fx_stm32_sd_read_blocks(), in /*USER CODE*/ section BEFORE the call to HAL_SD_ReadBlocks_DMA(), add the following code:clean_cache_by_addr(buffer, 1);clean_cache_by_addr((((char*)buffer) + hs
Hello,I'm working with STM32H745ZITX on a dual-core setup. I configured USART3 on the CM7 core. The communication flow is:TX: Using HAL_UART_Transmit (polling)RX: Using HAL_UART_Receive_ITThe first message reception works correctly. The HAL_UART_RxCpltCallback function is triggered as expected — however, the received data buffer remains empty (i.e. I can't read the data).On subsequent transmissions, no interrupt is triggered, and the RX remains in HAL_BUSY state. As a result, no new data is received, even though I can see the incoming data on the RX pin via an oscilloscope.I verified:USART3_IRQHandler is implemented and calls HAL_UART_IRQHandler(&huart3)Only the CM7 core handles UART3; CM4 does not touch itHAL_UART_Receive_IT returns HAL_BUSY after the first useQuestion: Is there any dual-core-specific configuration I need to apply to use UART interrupts reliably on CM7?Could D-Cache or I-Cache being enabled affect UART RX interrupts even when not using DMA?If yes, what is the
Subject: STM32F746G‑DISCO | SDMMC + DMA + D‑Cache – hangs at state 5, FR_DISK_ERR / empty files → root‑cause & minimal fixesCube / HAL versionsCubeF7: v1.28.0CubeMX: 6.11Board: STM32F746G‑DISCOMiddleware: FatFs R0.14, _USE_LFN = 3, _MAX_SS = 512Cache: I‑ & D‑cache enabled (default)1 – Read path: card never leaves RECEIVING (0x5)SymptomHAL_SD_GetCardState() polled after HAL_SD_ReadBlocks_DMA() stays at 0x05 → loop never exits.Root causeSD_DMAReceiveCplt() does not re‑enable the DATAEND interrupt, so the SDMMC ISR never runs and HAL state is never cleared.Fix (HAL driver)File: stm32f7xx_hal_sd.c/* inside SD_DMAReceiveCplt() */ __HAL_SD_ENABLE_IT(hsd, SDMMC_IT_DATAEND); /* <- add this line */After this patch the DATAEND IRQ fires, HAL_SD_IRQHandler() sends CMD12, sets hsd->State = READY, and the read loop exits.2 – Write path: f_sync() returns FR_DISK_ERR / file size stays 02.1 Cache coherencyBefore starting a DMA write, the sector buffer FatFs passes to disk_
I am currently using the v1.6.1 of STM32CubeIDE and a STM32G473 MCU.I have implemented an I2C bus and have noticed a major bug with the I2C_WaitOnFlagUntilTimeout functions. There is this condition:if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U)) which is supposed to guarantee that the program doesn't get stuck into the while loop above (while (__HAL_I2C_GET_FLAG(hi2c, Flag) == Status)), but the tick value stop incrementing as soon as the program enters the function for a reason I don't understand. I have tried to increase the preempt priority of System tick timer (by lowering the value) but it didn't change a thing.Does anyone know how to fix that?
Hello,I'm slowly losing my sanity so I figure I'd make a post here. I set up SAI4 to interface with BDMA, hoping to retrieve data from the onboard MEMS microphone and store it in a buffer in RAM_D3. Ideally I'd like for that data to be processed by the CPU, but I can't even get the buffer to fill up.The following code produces the output below:audio_buffer[0] = 5; audio_buffer[1] = 6; audio_buffer[2] = 7; audio_buffer[3] = 8; // ... // Inside main loop: printf("SAI State: %d \r\n", HAL_SAI_GetState(&hsai_BlockA4)); printf("SAI Error: %lu \r\n", HAL_SAI_GetError(&hsai_BlockA4)); printf("SAI Buffer Address: 0x%08lx\r\n", SAI4_Block_A->DR); printf("DMA State: %d \r\n", HAL_DMA_GetState(&hdma_sai4_a)); printf("DMA Error: %lu \r\n", HAL_DMA_GetError(&hdma_sai4_a)); printf("Pointer location: %p \r\n", audio_buffer); printf("Audio Buffer Data:\r\n"); for (int i = 0; i < 10; i++) { printf("[%d]: %d\r\n", i, audio_buffer[i]); } As you can see, SAI4 is in HAL_SAI_ST
Hello,Working on STM32F767BITx and using Free RTOSEnable USART2, here is the init codestatic void MX_USART2_UART_Init(void) { huart2.Instance = USART2; huart2.Init.BaudRate = 115200; huart2.Init.WordLength = UART_WORDLENGTH_8B; huart2.Init.StopBits = UART_STOPBITS_1; huart2.Init.Parity = UART_PARITY_NONE; huart2.Init.Mode = UART_MODE_TX_RX; huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE; huart2.Init.OverSampling = UART_OVERSAMPLING_16; huart2.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; huart2.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; if (HAL_RS485Ex_Init(&huart2, UART_DE_POLARITY_HIGH, 0, 0) != HAL_OK) { Error_Handler(); } }So I can see even just after init or even after some times, the gstate == 0x20 always, and thats why unable to transmit any message over uart as it is not ready.Please guide me what is missing here.Thanks,Nitin
Hi,I'm using an STM32F746G-DISCO board and I'm just trying to build a build a simple project with LWIP and FreeRTOS using CMSIS V2 however after enabling the minimum hardware using CubeMX I am unable to get any ping replies from the board. If I use CMSIS V1 for the config, then the board responds with ping.The reason why I want to get this working with V2 is that I'm planning to use TouchGFX in my project and when creating project using the TouchGFX, it defaults to CMSIS V2 and I've not seen any option to change that. I've tried generating project using TouchGFX and then changing it using CubeMX to CMSIS V1 however then the project falls apart and it seems like HAL_Delay which is used in some of the initialisation functions stops working.I'm using CubeIDE 1.16.0.Attaching the project for reference.
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.