Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hi everyone,I'm working on an audio acquisition project using the STM32H743ZIT6 microcontroller. The goal is to build a microphone array with 8 digital MEMS microphones (MP34DT05-A), connected via DFSDM and streamed over USB to a PC using the USB Audio Class (UAC). At the moment, I'm starting small and testing with one or two microphones.So far, I have successfully configured one DFSDM filter and one channel using regular conversion with DMA, and I'm receiving valid audio data.Now I would like to add a second microphone, which is connected to a second DFSDM channel (with opposite clock edge). Both channels should ideally be handled by the same DFSDM filter.I'm currently wondering:What is the best approach to sample two channels using a single DFSDM filter?Is it necessary or recommended to use injected conversion for the second channel in this case?How would I properly configure DMA and interrupts if both regular and injected conversions are used?Are there any known working examples for
Hi,I'm trying to get LPBAM Low power timer capture to work in a frequency measurement application. The intention is to use LPBAM to write input captures from LPTIM3 to a buffer in SRAM4 while in Stop mode 2. The app loop just sets a wakeup via the RTC of 500mS, then enters Stop Mode 2. On wakeup, it does a few GPIO read/writes and I2C3 writes amongst other things, then loops,That all works fine, and the system is in Stop Mode 2 95% of the time.LPDMA1 CH0 is enabled in the non-LPBAM IOC configuration editor in Linked-list and circular mode.I've created an LPBAM application/scenario with just one queue, and LPTIM3 channel2 set for input capture clocked by external clock (LSE crystal 32.768KHz).(ScreenShots below)This passes 'CHECK LPBAM DESIGN' in the editor, and generates code without errors.I've then added the LPBAM init/build/link/start calls to main before the main loop starts:/* LPT3App application initialization */MX_LPT3App_Init();/* LPT3App application LPT3Sce
We develop a measuring device which should be capable of SIL 2. It would be possible to fall back to SIL 1 only. STM32F4 MCU is used with STL-Safety-Library.Has anybody qualified the gcc for that? Or did you replace the compiler by already qualified products from Keil, IAR?If you have qualified the gcc, have you done it yourself or used commercial tools?
Looking to add a 4 mic pdm array setup to livetune environment. Had questions on how deep into the environment we need to go for the changes. Is it just a matter of changing the # of channels for the sysIn, # of slots and active slots on the pdm interface? or do we need to drive deep as address the audio buffer as well. At one point I thought I read the audio buffer was allocated dynamically. We are just looking for a little guidance before we start changing things as there might be a simple way to achieve our goal vs us guessing and creating issues.
Hello, I am currently using the NUCLEO-U545RE-Q and trying to set low-power modes with FreeRTOS. I have already seen videos from official ST channel and read documentation but I cannot get to set this functioning when using FreeRTOS and RTC. My goal is to blink an LED every 5 seconds and in the reamaining time go to STOP mode for low power consumption. This are my functions: void StartDefaultTask(void *argument) { /* USER CODE BEGIN defaultTask */ /* Infinite loop */ while(1) { osSemaphoreAcquire(BinarySemaphoreHandle, osWaitForever); printf("Toggle Led\n"); BSP_LED_Toggle(LED_GREEN); } /* USER CODE END defaultTask */ } /* Private application code --------------------------------------------------*/ /* USER CODE BEGIN Application */ void HAL_RTCEx_WakeUpTimerEventCallback(RTC_HandleTypeDef *hrtc) { printf("RTC Callback\n"); osSemaphoreRelease(BinarySemaphoreHandle); } void PreSleepProcessing(uint32_t ulExpectedIdleTime) { HAL_SuspendTick(); /* Start low power timer
Hi everyone,I am developing a project on the STM32N657X0H3Q where I need to implement a Dual CDC ACM composite device.I am following the "Standalone" implementation to avoid a full ThreadX dependency, as I plan to integrate this with a FreeRTOS project (using X-CUBE-FREERTOS).While looking at the USBX configuration in CubeMX and the ST Wiki (Introduction to USBX), I noticed the option USBD_COMPOSITE_USE_IAD ( As seen in the picture).If I enable USBD_COMPOSITE_USE_IAD , can I simply increase the number of CDC ACM class instances in CubeMX to 2?Does CubeMX automatically handle the IAD grouping for the second CDC instance, or do I need to manually adjust the interface descriptors in the generated ux_device_descriptors.c ?Can you provide an approach to configure this using MX? Which are all the files that should be edited to configure this.
Hi Community,I am working on STM32H747I-DISCO Board and trying to bringup digital MEMS Mic (MP34DT05) which is integrated on STM32H7-DISCO Board.I am trying to record random voice for 5 seconds and need to play back via audio jack out which is connected to codec also it is integrated on the board. I am sharing you schematic of the board as below:MP34DT05 is connected to MCU directly with SAI4 Interface and Solder Brifdges are provided to connect via codec Here I developed the application code to interface and record via MIC and playback via Audio Jack out./* Includes ------------------------------------------------------------------*/ #include "main.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "stm32h747i_discovery_audio.h" #include <math.h> #include"log.h" #include<string.h> #include "pdm_config.h" #include "pdm2pcm_glo.h" #include <stdio.h> /* USER CODE END Includes */ /* Private t
Hi, I try to get the USB-Host running with USBX. Hardware is a custom board with TCPP02 and STM32U575. Init process is running, but I never get an interrupt (ux_host_event_callback) when plugging in a USB stick. Any idea? ioc file and schematic are attached. Best regards, Achim
The MCU I use is H533, but I guess the SPI peripheral in other MCUs would be similar.I'm looking for the recommended way to regularly transmit over SPI "small" data frames (in the sense that one frame fits into the FIFO) that can vary in size. For example, in response to different events I would be updating values of different DACs or shift registers and they all have their own data frame format and size, usually between 16 and 32 bits.SPI peripheral has TSIZE and DSIZE settings seemingly exactly for that, but they require disabling the SPI peripheral to be changed (for TSIZE it's documented, for DSIZE, it seems not), and it adds latency to transfers.So far it seems the optimal approach in my case is to as follows. Please bear with me for a moment and let me know if I'm missing something.1. Keep DSIZE at 8 bits.2. Keep the SPI enabled and set CSTART once at the beginning.LL_SPI_Enable(SPIx); LL_SPI_StartMasterTransfer(SPIx);3. When transferring, manually fill the FIFO with the data fra
Hello, I want to use an I2C port of a STM32F411 MCU (MCU_A) in target mode to receive data from another MCU (MCU_B), MCU_B code already existing and verified with other receivers.I configured the project with STM32CubeMX, with interrupts enabled to handle communication in interrupt mode.I used MX standard settings to generate CubeIDE project with HAL code.With some effort for setting up the initialization and other code for MCU_A in CubeIDE, communication looks ok from sending MCU_B perspective.Additional check of SDA and SCL signals with DSO looks ok to. But the problem was: No data was transfered to the receive data buffer in MCU_A. After several hours of debugging, I found a suspicious code section in the HAL code (stm32f4xx_hal_i2c.c).In the HAL function static void I2C_Slave_ADDR(I2C_HandleTypeDef *hi2c, uint32_t IT2Flags)which is called in HAL_I2C_EV_IRQHandler ()when adress matches, the direction flag received from MCU_B
Hello, I am searching for a example project to integrate a camera (e.g OV-Series) via DCMI interface. Can someone recommend an ST-Project or else? Thanks in advance!
Hello, Started to dwell info embedded development and got my hands on a NUCLEO-H7S3L8 development board. Firstly wanted to analyze the example code that comes with the development board and modify it a bit. But when started to debug, it seems to stop at I and D cache enable functions, and example LED blinking disappeared. Has anyone encountered something similar and could help to fix this problem? Only change I made to the example code is set-up a PC8 as a PWM to drive a LED switch. Additionally, tried a mass erase and re-flashing, but still nothing, the problems remains the same as I mentioned.
I would like to use some of your standard serial page eeprom'shttps://www.st.com/en/memories/standard-serial-page-eeprom.html The problem is that i don't understand how to use your memory loader with these chipshttps://github.com/STMicroelectronics/stm32-mw-extmem-ldr/tree/main The problem is that this library expects the chips to have 4 byte address and just doesn't work with 3 address chips. If you go through and just change all the call's to 3 byte address in the library i can make a STLDR file to talk to the chip. Just trying to see if there's a better way. You have this custom memory section that would help i just don't know how to use it? So i'm hoping for some help there.https://github.com/STMicroelectronics/stm32-mw-extmem-mgr/tree/main/custom
Hello everyone,I am currently trying to create a CMake based C-project for the ST Evaluation board STM32H757I-EVAL, that allows me to render a UI on the MIPI DSI connected display, that comes with it.Due to other work related requirements, I don't want to use TouchGFX, but will later try to add the LVGL framework to create our UI.However, at time of writing I have been unable to configure my project in such a way, that I can manually fill a Framebuffer and have that have any effect on the display. I have created a github repo with a "minimal" example of the configuration efforts so far.A "short" overview:I tried to create said CMake project through the STM32CubeMX code generator, and after a lot of trial, error and misunderstanding what is and isn't generated, I added the ST libraries for the external SDRAM "IS42S32800J" as well as the display driver IC "OTM8009A" and tried to configure the clocks and configurations of the following components:GPIO of the attached display pinsFMC to en
Hi, I’m working on a custom board based on STM32H757BITx using an external NOR flash Micron MT25TL01GBBB8ESF-0AAT TR (Dual bank with Quad Lines)Current usageAt the moment, the external flash is mainly used to store UI assets (images/fonts/etc.) for a display. I’m not using the full flash capacity, so I’d like to use an unused region to store a small persistent structure (configuration/status/log header).To keep things organized, I created a partitioning scheme using the linker file, reserving separate address ranges:UI assets region (read-only at runtime)User structure region (needs occasional write/erase/program)How it’s configured right nowSince up to now I only needed runtime reads, the flash is configured in Memory-Mapped Mode (DTR, QPI). I enable it with:MT25TL01G_EnableMemoryMappedModeDTR(&hqspi, MT25TL01G_QPI_MODE);This works great for reading UI assets through the mapped address space. ProblemI now need to write into the user structure region, but I unde
I'm trying to compile a basic blinky application for the N6 and failing. I open the latest CubeIDE, import the GPIO_Toggle project (or any other one for that matter) and try to build. I get an error about no rule to make target. Please provide guidance on how to build the basic examples 13:47:52 **** Build of configuration Debug for project GPIO_InfiniteLedToggling_Init_FSBL **** make -j11 all make: *** No rule to make target '/Users/workspace/STM32CubeN6-git/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_ll_exti.c', needed by 'Drivers/STM32N6xx_HAL_Driver/stm32n6xx_ll_exti.o'. Stop. "make -j11 all" terminated with exit code 2. Build might be incomplete. 13:47:52 Build Failed. 1 errors, 0 warnings. (took 83ms)
HelloCurrently I am working with NUCLEO-N657X0-Q by using STM32CubeIDE_2.1.1 STM32Cube_FW_N6_V1.3.0MxCube v6.17.0Trying to investigate and migrate CDC ACM feature in to the my own project. As basis I am using Ux_Device_CDC_ACM Example provided by ST as reference.It was discovered that Ux_Device_CDC_ACM example would not work properly after MxCube project regeneration -- it goes to the HardFault_Handler() at some point (not defined currently at which point)The investigation showed that the issue is connected with the Optimization level (MxCube updated STM32CubeIDE project files) just only for the one single source file: "stm32n6xx_hal_rcc_ex.c". If optimization level is set to "-O0" for the mentioned file -- HardFault_Handler() is observed. By changing it to the "-O3" -- the application works successfully.Could you please explain this "hidden" dependency, and what is the reason of this?
Hello everyone,I am developing a firmware for an **STM32U5** microcontroller using Azure RTOS (ThreadX / USBX). I am implementing a USB Composite Device with two classes: **CDC** (Virtual COM Port) and **MSC** (Mass Storage Class). The MSC is interfaced with an eMMC using an 8-bit bus for data communication.I am facing a persistent issue that I cannot seem to resolve: the device drops the USB connection after about 5 to 10 minutes of operation. By debugging the code, I noticed that the disconnection is triggered because the device eventually calls the HAL_PCD_DisconnectCallback() function.My main concern (and source of confusion) is that this behavior is highly OS-dependent. For instance, on my dual-boot PC, the device works flawlessly without a single disconnection on **Ubuntu 22.04**, but it consistently crashes/disconnects on **Windows**.### What I see on Windows (Event Viewer)Right before the disconnection occurs, Windows throws several SCSI timeout errors in the Event Viewer. Spec
Hello everyone, I am trying to bring up a NetX Duo TCP Server on the STM32H755ZIQ Nucleo board using Azure RTOS ThreadX + NetX Duo, but I keep running into issues during initialization and runtime. Unfortunately, I haven't been able to find any fully working examples for dual-core H7 devices using NetX Duo. Most examples online are either for single-core MCUs or for different boards. Here is what I am trying to achieve: STM32H755 Nucleo board M7 core running ThreadX + NetX Duo Basic TCP server (listening on a port, accepting connections, sending/receiving data) Using STM32CubeMX for configuration LwIP is NOT used — only NetX Duo Ethernet driver: nx_stm32_eth_driver (CubeMX generated). It seems like the current CubeMX-generated NetX Duo code for the STM32H745/H755 series might be incomplete or not fully compatible. My questions: Has anyone successfully created a NetX Duo TCP Server project on the STM32H745/H755 Nucleo boards? Is there an official working example
Hello,I am working on an STM32F7 project where I need to sample multiple ADC peripherals using DMA triggered by a timer. Problem: No ADC data is being written to ADC_BUF or ADC3_BUF even though main loop runs (buffers ADC_BUF and ADC3_BUF remains zero while counter increases) Current Setup:ADC1: 1 Channel, DMA2 Stream 0, triggered by TIM2 TRGO UPDATE ADC3: 2 Channels, DMA2 Stream 1, triggered by TIM2 CC2 DMA: Circular mode, DMAContinuousRequests enabled TIM2: 10 Hz update event Mode: ContinuousConvMode is Disabled, ScanConvMode is Enabled What do I need to change to fix this? /* USER CODE BEGIN PV */ volatile uint16_t ADC_BUF[ADC_BUF_LEN]; volatile uint16_t ADC3_BUF[ADC_BUF_LEN]; uint16_t counter = 0; /* USER CODE BEGIN PV */ /* USER CODE BEGIN 2 */ HAL_CAN_Start(&hcan1); HAL_ADC_Start_DMA(&hadc1, (uint32_t*)ADC_BUF, ADC_BUF_LEN); HAL_ADC_Start_DMA(&hadc3, (uint32_t*)ADC3_BUF, ADC_BUF_LEN); HAL_TIM_Base_Start(&htim2); /* USER CODE END 2 */ /* USER CODE BEGIN
Hello,I am working with the STM32H7B3I-EVAL boardI have I2C slave model work properly the default adress used by contoller given in schematich work on 84 aand 85 adress but the other peripheral adress not get give me the roadmap for the coding of communication protocolsI2C Slave Address detect. how can i code done for other peripherals using mfx expander give me solution didnt solve the issue.Thank you
New question split from this post. OK THANK YOU @mƎALLEm , CAN U SHARE THE RMII CONFIGURATION FOR STM32H745BIT6?
I've developed on an STM32U5A9J-DK using ThreadX, which, via USBX, creates a loopback audio interface between the PC and the device in the way: PC->speaker on device->microphone on device->PC.The devices are correctly seen and are working, as I'm able to enumerate them on the host and the device correctly receives audio frame,s and I'm able to process them into the device.Now, the issue is that I'm unable to send the audio packets back to the host.My implementation is pretty simple: I'm using the USBD_AUDIO_PlaybackStreamFrameDone function to read the audio frames and send them back to the microphone interface withVOID USBD_AUDIO_PlaybackStreamFrameDone(UX_DEVICE_CLASS_AUDIO_STREAM *audio_play_stream, ULONG length) { UCHAR *read_buffer; ULONG read_length; UCHAR *write_buffer; ULONG write_length; AUDIO_FRAME_MSG frame_msg; AUDIO_FRAME_BUFFER *frame_buf; /* -------------------------------------------------------------------------- */ /* STEP 1: Get A
We are currently using LPTIM1 to measure the time period. As this operation needs to be performed frequently, we are using the following APIs: HAL_LPTIM_TimeOut_Stop_IT(&hlptim1) HAL_LPTIM_TimeOut_Start_IT(&hlptim1, 0xXXXX, 0xXXXX) During this process, the LPTIM_Disable() function temporarily disables all interrupts using PRIMASK while waiting for the LPTIM_FLAG_ARROK and LPTIM_FLAG_CMPOK flags. This global interrupt masking is causing data loss on LPUART1, which is operating at 115200 baud. As a result, we are encountering ORE (Overrun Error) due to missed UART interrupts. Given this behaviour, we would like your guidance on the following: Is it safe to modify the LPTIM_Disable() implementation by removing or commenting out the PRIMASK-based global interrupt disable? Alternatively, is there a recommended approach to avoid this blocking behaviour while still ensuring correct LPTIM operation? We are concerned about maintaining real-t
Hello ST Community,I M USING STM32H745I-DISCO (MB1381-H745XI-B02), WHICH COME DEFAULT MII MODE, TO CONFIGURE IT ON RMII, WHAT CHANGES I HAVE TO DO IN HARDWARE, IOC. AS THIS BOARD HAVE ETHERNET IC LAN8742A-CZ-TR WHICH HAVE BOTH MII,RMII PROTOCOLS.AS I HAVE SEEN SOME VIDEOS ON ETHERNET FOR DIFFERENT STM32 CONTROLLER IN RMII, I M NOT ABLE TO GET RESULT. I WANTED TO KNOW DO THIS BOARD CONFIGURE IN RMII, IF YES THEN TELL ME HOW I CAN DO. HERE IS CONFIGURATION I HAVE DONE IN MY PROJECT. PG11 ETH_TX_EN ARM Cortex-M7 n/a Alternate Function Push Pull No pull-up and no pull-down Very High n/a true PG14 ETH_TXD1 ARM Cortex-M7 n/a Alternate Function Push Pull No pull-up and no pull-down Very High n/a true PG13 ETH_TXD0 ARM Cortex-M7 n/a Alternate Function Push Pull No pull-up and no pull-down Very High n/a true PC5 ETH_RXD1 ARM Cortex-M7 n/a Alternate Function Push Pull No pull-up and no pull-down Very High n/a true PC4 ETH_RXD0 ARM Cortex-M7 n/a
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.