Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hi, I tried to set up and use HPDMA with ADC on my Nucleo-H7S3L8,but I have some questions about how to use it.I could not find documentation on using HPDMA with STM32 MCU, only for GPDMA.I found an HPDMA example for the Nucleo-H7S3L8 (ADC_SingleConversion_TriggerSW_HPDMA), but I don't get the logic. Why are both HAL_ADC_Start_DMA() and HAL_ADC_Start() used together? Normally, you'd just use HAL_ADC_Start_DMA(), right? Continuing from my previous question, if I want to modify this example to support multiple channels, Continuous Conversion Mode, and DMA circular mode, how should I do it?I tried modifying the ADC parameters to Continuous Conversion Mode and DMA circular mode, but it still only runs once.Then I tried enabling Circular Mode in HPDMA, but it gets stuck at HAL_ADC_Start_DMA.If possible, could you teach me how to modify it for multiple channels? I'm not sure whether to use End of single conversion or End of sequence of conversion. I have 9 channels.I'm also not sur
Hello,I am looking for help debugging an issue with both ADCs running in continuous conversion mode with multiple channels, using DMA on an STM32H7 device.Hardware / ToolsBoard: NUCLEO-H7S3L8MCU family: STM32H7RSPeripherals: ADC1 and ADC2Mode: Continuous conversion, multi-channel (scan mode)Data transfer: DMAConfiguration OverviewBoth ADCs are configured in continuous conversion modeEach ADC scans multiple channelsDMA is used to transfer conversion results into memory buffersDMA buffers are statically allocated and placed in DMA-accessible memoryD-Cache is enabled on the H7Problem DescriptionBoth ADCs are running and DMA transfers are occurring, but the sampled data in the buffer is always 0In the SFR it shows that the ADC is working, but the DMA is idle/not set up correctly. Also the DMA buffers are in a non-cacheble region protercted by my MPU.static void MPU_Config(void) { MPU_Region_InitTypeDef MPU_InitStruct = {0}; /* Disables the MPU */ HAL_MPU_Disable(); /* Disables all MP
I am using two UARTs simultaneously.The CPU is STM32H743. One UART is on UART 4 that transmits information to pc uartAnd the other UART on UART 5 receives information from pcIf these UARTS function alone, they function well.I am using the DMA idle function on the receive and the DMA function on the transmitWhen they function together, the information is not properly received from the PC on UART 5.Please help me resolve this issue
Hello,I'm researching possibilites to teach DSP undergraduate course using boards STM32H750B-DK, that we alreadyuse in other courses related to low leve programming. So far, I've identified two possible workflows:1. it seems possible to create project for board to act as USB sound card that could be interfaced to GNU octave environment and first steps of audio processing could be done there2. we would like to create first simple audio pass-through app for our board with two inputs (MEMS mic or line-in) and several outputs, but mostly headphone output. 3. after initial example in 2., we could add also audio processing algorithms that could be prototyped in 1. and code in C on the board. We would also love to do some audio analysis (Amplitude response, Spectrograms etc)... I have found quote some starting points, but also a lot of questions raised that there is a lot of non-working examples. My starting points would be BSP package for our board, also some examples for STM32F769
Hey Folks, Description:I am using STM32N6570-DK with Azure RTOS (ThreadX + FileX) to store camera frames on an SD card using SDMMC2.Use case:Capture camera frames (RGB565, 320×240) using DCMIPPDisplay frames via LTDCContinuously write frames to SD card using fx_file_write()Issue:Small file read/write (text file) works correctly.When continuously writing video frames (~153 KB per frame), FileX fails after 2–3 frames.FileX returns FX_IO_ERROR (144).Failure occurs during media flush / directory update, not directly in application code. Configuration:From fx_stm32_sd_driver.h:#define FX_STM32_SD_DMA_API 1#define FX_STM32_SD_CACHE_MAINTENANCE 0#define FX_STM32_SD_MAX_TRANSFER_SECTOR 16#define FX_STM32_SD_DEFAULT_SECTOR_SIZE 512FX_STM32_SD_WRITE_CPLT_NOTIFY() waits on a ThreadX semaphore
Hello! Quick question about ST patches for MbedTLS 3.6.5 (stm32-mw-mbedtls).Why was the defined(MBEDTLS_MD_SOME_PSA) added here (in library/md.c)?When MBEDTLS_PSA_CRYPTO_C is defined, the only way to define MBEDTLS_MD_SOME_PSA is to define one of MBEDTLS_PSA_ACCEL_ALG_XXX which, I think, is an internal macro of MbedTLS. Should I just remove the patch or does it serve a purpose? Would it be better to define MBEDTLS_PSA_ACCEL_ALG_XXX?#if defined(MBEDTLS_PSA_CRYPTO_CLIENT) && defined(MBEDTLS_MD_SOME_PSA) int mbedtls_md_error_from_psa(psa_status_t status) { return PSA_TO_MBEDTLS_ERR_LIST(status, psa_to_md_errors, psa_generic_status_to_mbedtls); } #endif /* MBEDTLS_PSA_CRYPTO_CLIENT and MBEDTLS_MD_SOME_PSA */Thank you in advance.
Hello,I am using the VENC_RTSP_Server example located iSTM32Cube\Repository\STM32Cube_FW_N6_V1.2.0\Projects\STM32N6570-DK\Applications\VENCThis example shows how to use the VENC block and stream H.264 video through RTP/RTSP using Ethernet.I want to send the encoded H.264 video stream to another controller through SPI instead of RTP/RTSP.My questions are:1. What is the input data format of the H.264 encoder (VENC)? Is it receiving YUV420/NV12 from DCMIPP, or some other format?2. Is there an API in the VENC example that allows access to the encoded H.264 bitstream buffer (pointer + size), before it is sent through the RTSP server?3. Is there any example or documentation that shows how to use the H.264 encoder output without RTP/RTSP? For example: Camera → DCMIPP → VENC(H264) → SPII only need to sending the encoded H.264 data through SPI to another controller.Thank you!
I created project in stmcube32mx for h5 microcontroller and it works if I manually replace bl main to bl entryin file startup_stm32h563zitx.s.If this manual replacing is a bug or on purpose?Jan
Hi everyone,I’m setting up LVGL on a custom PCB using an STM32H747BIT MCU. The display is connected via LVDS, and I’m using DMA2D for transferring the framebuffer to the screen.The issue I’m facing is that the DMA2D transfer complete callback is never triggered, and as a result, lv_disp_flush_ready() is not called and the buffer is not pushed to the display.Below is the relevant initialization code: lv_init(); lv_tick_set_cb(HAL_GetTick); //FIXME: per ThreadX fer servir tx_time_get disp = lv_display_create(LV_DISPLAY_HORIZONTAL_RES, LV_DISPLAY_VERTICAL_RES); lv_display_set_buffers(disp, buf1, NULL, sizeof(buf1), LV_DISPLAY_RENDER_MODE_PARTIAL); hdma2d.XferCpltCallback = disp_flush_complete; lv_display_set_flush_cb(disp, my_flush_cb);The my_flush_cb() function is as follows:void my_flush_cb(lv_display_t * display, const lv_area_t * area, uint8_t * px_map) { lv_coord_t width = lv_area_get_width(area); lv_coord_t height = lv_area_get_height(area); SCB_CleanInvalidateDCache();
Moved from STM8 forum; STM32H7 Label added.Hello everyone, i am trying to get the data from my http my data will be around 6 KB i can able to receive the data but imediately after receiving the data all the other threads except the MQTT thread(I have the HTTP function inside the MQTT thread) is suspended.I can notice that the interupt is also triggering properly but other threads are running i am attaching my MQTT file with this can you please help me to solve this issue.
Hi All, I'm building an instrument that needs to stream data to a PC at ~4Mbps. People were claiming nearly twice this with USB CDC so I chose the nucleo-h533 board and started with the Ux_Device_CDC_ACM example. I disconnected the USART code and added a loop that calls ux_device_class_cdc_acm_write and then I measure the rate at which I receive data on the PC. I can't get past ~1.8Mbps. I have tried the following: varying the size of the buffer passed in from 64 to 2048 enabling ZERO copy in the driver UX_DEVICE_ENDPOINT_BUFFER_OWNER=1 and defining UX_DEVICE_CLASS_CDC_ACM_ZERO_COPY setting USBD_CDCACM_EPINCMD_FS_BINTERVAL to 1 instead of 5 In all cases, the baud rate remains about the same at 1.8Mbps. Is there anything I can do to improve this? Best, Marc
I am using the STM32U585RIT6 MCU with the B-U585I-IOT02A development kit. My primary focus is on USB, and in my project, I have enabled USB CDC-ACM, through which data and messages are transmitted over USB.For this project, I need to enable firmware update support. I have been searching for a suitable example, but most available examples require manual interaction with the hardware—such as setting the BOOT0 pin high and resetting the board, or pressing a user button to jump to the bootloader and perform the firmware update via a programmer.However, I do not want any physical interaction with the board. I need the firmware update to be triggered purely through software, perform the update, and reset the device without manually changing the BOOT0 pin or pressing any buttons.Is this possible? If so, what are the steps that need to be followed, and are there any reference examples available for this approach?
Hello, dear colleagues!If my request seems inappropriate to you, I apologise — but I had no other choice.I've been struggling with this for a week now.Please, if anyone has a ready-made working project, share it or give it to me. I need a ready-made project for Nucleo-STM32H753ZI (MB1364-H753ZI-E01) that includes FreeRTOS with USB-CDC or Ethernet support.I have tried many times, but I still cannot get past the FreeRTOS initialisation stage. Thank you all. *This post has been translated from Russian to comply with the ST Community guidelines.
Hello,I'm trying DUAL BOOT on STM32L471 and having a problem with SYSCFG->MEMRMP FB_MODE bit.I modified Dual Boot Bank Swap Boot Loader Example for STM32G4 project to fit my board, and everything goes well when the firmware put from the start of BANK1 (0x08000000). It starts from BANK1 and copies itself to BANK2, sets BFB2 of OPTION BYTES and calls HAL_FLASH_OB_Launch(). Then it starts from BANK2 (with address of 0x08000000 since FB_MODE=1) without problem.Then I put it from 0x08070000 (the last sector of BANK1) and adjusted VTOR, so that it's called as a sub-program from main which is positioned at start of BANK1(0x08000000), copies itself to 0x08080000, sets BFB2, and calls OB_Launch() but it doesn't boot from BANK2.VTOR must be set at the beginning of main like this:uint8_t bank = getActiveBank();if (bank == 1) SCB->VTOR=0x08070000;else SCB->VTOR=0x08000000; and modified linker script too.After calling HAL_FLASH_OB_Launch() to set BFB2, FB_MODE is also s
Hi, I have started from a project by Adam Berlinger.I have two UDP sockets, one receiving data max 500 bytes/s one sending data 200 bytes every 5 seconds and one TCPIP sending 4K every 20 ms.Netconn Api I have no problem. With BSD sockets, If I work receiving data from UDP socket from a single or maximum 2 clients the UDP socket works well, but if I have 3 or more clients sending data on that UDP port, after a while the sockets returns no data even if they are.If I ask to print stat at display everything seems to be correct and as I imagined there is full of available memory and of all, no error at UDP level.Do you have any idea on what is happening? I used the same code on LWIP 1.1 on another microcontroller slower with less memory but no dma, and everything worked very well.Best Regards
Just wanted to see if anyone could point me in the right direction regarding a problem I'm having with implementing a USB device using MSC in standalone mode. The code initialises correctly as far as I can tell but as soon as it gets into the main loop, a HardFault is generated - this seems to be because ux_device_tasks_run() is trying to access ux_system_slave->ux_system_slave_dcd which is not initialised. I cannot see a function in the CubeMX (v1.5.1) code base that performs this. I have a reference project for the U385 micro and have confirmed the ioc files for USBX are essentially identical. I can't see a DCD registration function in that project either but apparently it works (I have no way of confirming without the hardware). I think in previous Cube versions, a function called ux_device_stack_dcd_register() was exposed but that no longer seems to be the case. The intention must be for it to be carried out another way but I'm having a hard time working out what this
Hello. I have two setups: one STM32H5 Nucleo eval board and a custom STM32H5 board. The Nucleo runs with the LAN8742 PHY while the eval board runs with the KSZ9567R switch. Both are configured to use RMII. I'm using the NetXDuo stack for both. The Nucleo board works just fine, but the custom does not. The custom board SW is based on the Nucleo SW, except removing the LAN8742 interface. I've checked out the HW on the custom board and it looks fine. I'm trying to do a simple ping from the PC. The first message is an ARP message. I see it on Wireshark and it arrives just fine on the STM32. I see the MAC address and the source and destination IP which look correct in _nx_arp_packet_receivemessage_type : 1sender_physical_msw : 11352sender_physical_lsw : 3116224427sender_ip_address : 3232235781target_ip_address : 3232235787Then the SW creates the ARP reply and calls _nx_driver_packet_send. I can see the RMII Tx lines toggle after the ARP packet is sent, but for
Good morning, I've been trying to create a simple program for several days that allows me to ping from my laptop to my Nucle F767ZTI board, but to no avail. I'm using CUBE IDE 1.18. I initially followed a tutorial and was able to do it, but only in debug mode, not with the board in running mode (normal operation), without using FreeRTOS but only by enabling ETH and LWIP. Is there a project I can import and then continue making my subsequent changes from there? This is because the ping is only the initial part of my project that I'm about to create. Can you send me a link where I can download and import the project? Thanks in advance.Here some lines codes that I use: /* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2025 STMicroelectronics. * All rights reserv
Hi Is it possible to run Zephyr RTOS on the STM32F411RET6 Nucleo board? If it is possible, how can I set up and use Zephyr RTOS on it? Please suggest the steps.
During stress testing involving repeated startup and shutdown, a fatal error was encountered in the STM32F407 Ethernet (ETH) module.The issue was observed during the startup phase, where a problem occurred in the ETH DMA. The DMASR register indicated a Fatal Bus Error.The following are the ETH register values captured when the error occurred:MACCR : 0x0200CE0CMACFFR : 0x00000000MACHTHR : 0x00000000MACHTLR : 0x00000000MACMIIAR : 0x000007D0MACMIIDR : 0x00001058MACFCR : 0x00000080MACVLANTR : 0x00000000MACRWUFFR : 0x00000000MACPMTCSR : 0x00000000MACDBGR : 0x00000000MACSR : 0x00000000MACIMR : 0x00000208MACA0HR : 0x80000103MACA0LR : 0x0AE18000MACA1HR : 0x0000FFFFMACA1LR : 0xFFFFFFFFMACA2HR : 0x0000FFFFMACA2LR : 0xFFFFFFFFMACA3HR : 0x0000FFFFMACA3LR : 0xFFFFFFFFMMCCR : 0x00000000MMCRIR : 0x00000000MMCTIR : 0x00000000MMCRIMR : 0x00020060MMCTIMR : 0x0020C000MMCTGFSCCR : 0x00000000MMCTGFMSCCR : 0x00000000MMCTGFCR : 0x00000001MMCRFCECR : 0x00000000MMCRFAECR : 0x00000000MMCRGUFCR : 0x00000003PTPTS
Split from Zephyr RTOS on Nucleo-F411RE ? - which has been answered.This is a new question.Hi T_HamdiThank you for your response.I have installed the Zephyr IDE and used the Blinky LED example. The firmware was flashed successfully; however, the LED is not glowing.I have attached an image for your reference. Please take a look.
I am trying to launch a dma of the input capture of the timer2 ch2 latched captured register to a memory buffer. I am using the DMA to allow me to record 75 captures so as to be able to determine the time for 75 cycles of a 500 KHz input signal. Set up is - TIM2 - internal clock (250MHz) - ch2 input capture direct modeIC CH2 - rising edge - direct - no division - filter 0GPDMA1 CH0 - standard - circular disable - request TIM2_CH2 - DMA Handle hdma(TIM_DMA_ID_CC2) - Block single - Priority low - Transaction normal - Dir p to m - Source increment disable - Width word - Burst 1 - Port 0 - Destination increment enabled - Width word - Burst 1 - Data handling disable - Trigger disable - Transfer event half endAt the moment Icache is disabled but I have tested in all three options. I am using HAL_TIM_IC_Start_DMA(&htim2, TIM_CHANNEL_2, periods, SAMPLE_SIZE) called from an interrupt routine triggered by a separate timer. Periods is my memory buffer and SAMPLE_SIZE is set to
Hi all,I failed to run Nucleo-G431RB board using Simulink "Monitor & Tune" mode via Simulink XCP protocol.I've got the error message at Simulink,"Could not connect to target application: XCP internal error: timeout expired, in response to XCP CONNECT command"There has been no problem for Simulink "Build, Deploy & Start".I followed an example from the link below.https://www.mathworks.com/help/ecoder/stmicroelectronicsstm32f4discovery/ug/STM32F4XX-ADC-example.htmlI've already changed Simulink model configuration to run Nucleo-G431RB LPUART.- Hardware board = STM32G4xx Based- Hardware board settings> Build options> Create> Select hardware = NUCLEO-G431RB- Connectivity > USART/UART = LPUART1- Connectivity > Serial port = COM1 (same port for STMicroelectronics STLink Virtual COM Port)MATLAB related version:- MATLAB 2023a- Embedded Coder Support Package for ARM Cortex-M Processors V23.1.0- Embedded Coder Support Package for STMicroelectronics STM32 Processors V23.
I am currently using the STM32N657 on the NUCLEO-N657X0-Q board to drive an 800x480 pixel display with 24-bit color. The display that I am using is the NHD-7.0-800480EF-ASXV#-T. I’m using the built in LTDC controller on the chip. I do know that the controller is working because the entire screen is black, the screen would be showing the backlight if it wasn’t. The problem is that I am unable to display anything at all when writing to the screen buffer.Here are the configuration parameters that I am using based on the data sheet:Here are the layer settings that I am using:Here is the clock configuration for the LTDC: Here is the code that I am running:main.cint main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration--------------------------------------------------------*/ HAL_Init(); /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); /* USER CODE BEGIN SysInit */ /* USER CODE END SysI
I'm curious how hard of a task would it be to get UCPD working with the STM32N6 with zephyr. I see it's supported with the G0* https://docs.zephyrproject.org/latest/boards/st/stm32g071b_disco/doc/index.html From my understanding the UCPD hardware block is the same between the two chips?
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.