Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
I have been modifying the VENC_SDCard_ThreadX example to read in raw data through pipe0 with success. However, my bottleneck appears to be the SD card write speed; I understand that this example was designed to write compressed h.264 files - and it looks like it only writes at around 320 kB/s.Since I am capturing much more data, I would like to use exFAT instead of FAT32, and write to a UHS I card at max speed (SDR104). I defined FX_ENABLE_EXFAT within fx_user.h, but it I am still unable to write to an exFAT formatted card. fx_media_open() passes just fine, but upon inspection it appears that the available clusters always is 0. Am I missing any steps? Any insight would be appreciated.
Hi, I'm new to STM32 and FMC. I'm connecting STM32H755 to PCL6045, a motor controller which has data/address pins that can be access through FMC. This is what I've done so far:1) Configure the FMC inside CubeMX with clock set to 20MHz (max 20MHz reference clock according to PCL6045BL datasheet)I don't know why there's no unmuxed option in the CubeMX since I need to use the FMC_D instead of FMC_DA pins and the address pins start from FMC_A16 until FMC_A20. As for now I just connect FMC_DA to the data lines from PCL6045BL.2) Then, I try to write something to the selected register of axis XPclAxisWriteReg(ID_X, WRFL, 10);The base address that I use is 0x60000000. Every time I run the code related to PCL6045BL, it always gives a HardFault error. I have also edited the main.c to use FMC_DATA_ADDRESS_MUX_DISABLE manually but it does not seem change anything. I don't know if I miss something important or my steps are wrong somewhere.
Hi,I already have a codebase that uses the STM32L4R5ZI microcontroller. The codebase does not include an .ioc file, which we normally use to configure the pins and other related parameters. But the codebase seems to be compiling fine. I am working with a development board for our customer project (Nucleo-L4R5ZI-P).We are trying to establish SPI communication with an external chip via SPI1. The codebase currently configures the SPI1 interface, but the SPI_CLK function is assigned to PA1. I need to change this to PA5. Since I don’t have an .ioc file, how can I make this modification?
I procured an STM32F4VE 2.0 board *Details of board here:*https://stm32-base.org/boards/STM32F407VET6-STM32-F4VE-V2.0I managed to create a Basic STM32 Cube Project for this controller. (STM32F407VET6)From the Schematic on STM32base website, I see PA12, PA11 connected to the USB Connector...I have enabled USB_OTG_FS which corresponds to PA11, PA12 in hardware and schematic.And further, under "Middleware and Software Packs" I have selected "Communication Device Class (Virtual Port Com)"I am also able to successfully initiate two IO Line connected to LED on board as output and write a basic Blinky program too.However the USB COM Port is giving hell of a lot of trouble, with Windows being unable to get even the Device Descriptor from the board! What am I doing wrong? Any step I have missed or any configuration I have done wrongly? Thanks in advance:Nagendra R Settynagendra.setty@ideas-unlimited.in
I am working with an STM32U575, HAL version 1.5 and found the issue described below(Have checked the HAL code for the H5 and H7 and these contain the same issue)See picture below, when aborting an PSSI transfer, before checking the state on lines 1258 and 1277, the state of the PSSI is already set to HAL_PSSI_STATE_ABORT. As a result the DMA transfer is not correctly aborted since none of the two conditional paths are taken.
Hi,I want my slave device to be able to sniff packets destined for other slaves on the same bus. At the moment, communication management is based on HAL with interrupts, and I can see when the master sends requests to me because I enter the address match interrupt. I would like to take a step back and see where a wrong address is discarded, before answering with a NACK.I want my slave to be able to understand when the packets are intended for another slave with a specific address and from there monitor the communication to sniff the information.Is that possible?I can't find where an address that doesn't match mine is discarded. Thank you
Hi, there is this example for using the DAC with DMA for the NUCLEO-U575ZI:https://github.com/STMicroelectronics/STM32CubeU5/tree/main/Projects/NUCLEO-U575ZI-Q/Examples/DAC/DAC_SignalsGeneration_DMAIn the current V1.2.0 of file https://github.com/STMicroelectronics/STM32CubeU5/blob/main/Projects/NUCLEO-U575ZI-Q/Examples/DAC/DAC_SignalsGeneration_DMA/Src/linked_list.cin line 61 it says pNodeConfig.Init.Direction = DMA_PERIPH_TO_MEMORY;Shouldn't it be DMA_MEMORY_TO_PERIPH instead?Best wishes,Sebastian
HiWe are using STM32U073CC MCU in a project. Our development tools are:STM32CubeIDEVersion: 2.0.0Build: 26820_20251114_1348 (UTC) STM32CubeMXVersion 6.16.0 WE are using the HAL_RTCEx_SetWakeUpTimer_IT to wake up the mcu from stop mode. The code code works fine, bur some the RTC INT does not fire. Is there any official sample code for this application? Ou maybe some sort of bug with the new IDE? I also have noticed that HAL_RTCEx_SetWakeUpTimer_IT has a aditional parameter compared with am older ide. Coud you provide me some extre information on the correct usage of the WakeUpAutoClr parameter? BRGilberto
Hello,from recently I have a problem using STM32F407VGT6, moreover, I am unable to get consecutive conversions in the DMA buffer. For example I want to use Dual Regular Simultaneous ADC mode to obtain results from 4 channels (2 in ADC1 and 2 in ADC2). However, when I start my application only the first iteration is obtained, second part of the buffer is never filled(i.e. CHN3 and CHN4 are never read if CHN1 and CHN2 are rank 0 in ADC1 and ADC2).Setup:main(void)#include "main.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ /* USER CODE BEGIN PTD */ /* USER CODE END PTD */ /* Private define ------------------------------------------------------------*/ /* USER CODE BEGIN PD */ /* USER CODE END PD */ /* Private macro -------------------------------------------------------------*/ /* USER CODE BEGIN PM */ /*
stm32-hotspot BOOTLOADER_USB_MSC_STM32G0 can be used as a good starting point for a USB MSC bootloader. The provided examples work, but if the application size increases, the bootloader will be erased, finally causing a hard fault.It took a me while to find the reason: After loading the application the bootloader erases the unused flash memory. Due to an error in line 145 of main.c the wrong number of flash pages to erase is calculated:flashErase.NbPages = flashErase.Page - 24flashErase.Page is the first page to erase. For small application sizes the number of pages to be deleted will be small enough to not exceed the bank size and everything seems to be fine. But if the application size exceeds about 104K, the number of pages to be erased will get large enough to wrap around and also erase the boot loader. To calculate the correct number of unused pages, flashErase.Page should have been subtracted from the total number of pages.I didn't test what happens if the app
Hello,WORKING ON : STM32H753I am looking to implement a jump from one application to another on an STM32H7 (Cortex-M7), so that the new application starts as if the microcontroller had just been reset: MSP initialized, VTOR set, caches (and MPU maybe?) correctly managed, peripherals reset, SysTick and IRQs disabled.Knowing that my APP1 is a custom bootloader at address 0x08000000 and my APP2 is my main application with lots of peripherals, timers, DMA, etc. at address 0x08020000.I tried many sequences to make a jump without crashing.My jump from APP2 (app) to APP1 (bootloader) seems to work without bugs: //disable interrupts __disable_irq(); //disable Systick SysTick->CTRL = 0; SysTick->LOAD = 0; SysTick->VAL = 0; //deinit HAL_RCC_DeInit(); HAL_DeInit(); // __enable_irq(); // vide cache SCB_DisableICache(); SCB_DisableDCache(); __DSB(); __ISB(); // je définis ma table des vecteurs au début de mon IAP donc à IAP_ADRESS (0x08000000), ave
Hello Yes here we go again… I’m again busy with the implementation of PTP slave inside STM32H7, based on this GitHub: https://github.com/hasseb/stm32h7_ptpd I tried to port this to my own project based on STM32H7, I changed what was mentioned in the readme. And look inside the helper files to modify the necessary HAL stuff. After all this, everything is compiling, but it doesn't work… My setup: PTP master is Magwell Pro Convert AES67 and act as master, this master is sending all the necessary packets on the ethernet. Checked with Wireshark. When I run the PTPD in slave mode I get this output: (V) handle: something (d 1162345242.829138544) handle: ptpd_net_recv_event returned 0 (d 1162345242.834921492) handle: ptpd_net_recv_general returned 44 (d 1162345242.840950789) handle: unpacked message type 8 (d 1162345242.846096992) handle_followup: received in state PTP_UNCALIBRATED (d 1162345242.853011945) ptpd_servo_update_offset (V) ptpd_servo_update_offset: ingress_timestamp 875418629 secon
Hello, I have a project using the spirit MP3 Decoder. I am in the process of moving this project over to a FreeRTOS based project using the STM32F411. FreeRTOS only supports hardware floating point for this chip and the spirit MP3 decoder is provided as a library only supporting software floating point. What is required for me to get a new build of the Spirit MP3 deocder re-compiled supporting hardware floating point?Can ST provide this re-compiled library?ThanksStuart
I have STM32H753I-EVAL2 board and I want to set it up as an USB Speaker device. I see 3 protect that can make this as such, which are:NameBoardBoard TypeSTM32CubeMX VersionSW Package InstalledUx_Device_Audio_2.0STM32N6570-DKNucleo-64NATRUEUx_Device_Audio_2.0_StandaloneSTM32N6570-DKNucleo-64NATRUEUx_Device_Audio2.0_PlayBackSTM32H743I-EVALNucleo-646.15.0TRUE Two things...1) I don't want RTOS, but STM32H743I-EVAL has RTOS, and the one I'm looking for is on the wrong board. So... What advantage do I have using RTOS? Can I use the Standalone one and change the board somehow in the code? I haven't done much comparison to know, I've been overwhelmed trying to understand the organization of the project. 2) When I do download, install and run the Ux_Device_Audio2.0_PlayBack anyway, the program is running. I see the USB being enumerated as a speaker on my laptop. Issue is, everything is fine, but when I try to play an audio, it runs into a fault -- > `void HardFault_
According to RM0433 Rev 8:The Run* mode is entered after a POR reset and a wakeup from Standby. In Run* mode, the performance is limited and the system supply configuration shall be programmed in PWR control register 3 (PWR_CR3). The system enters Run mode only when the ACTVOSRDY bit in PWR control status register 1 (PWR_CSR1) is set to 1.andAs long as ACTVOSRDY indicates that voltage levels are invalid, the system is in Run* mode, write accesses to the RAMs are not permitted and VOS shall not be changed.Now, the startup code first jumps (bl ExitRun0Mode) to the C function `ExitRun0Mode()` which probably might involves writes to stack.Is this construct (calling a C function from ASM) just relying on the compiler not touching the stack or am I'm reading the docs wrongly?best regardsTorsten
Hi,I've installed the CubeIDe rel 2.0.0 and the CubeMX rel 6.16.0; when I build my project this error appears: undefined reference to `ExitRun0Mode'. May you help me ? Thank you, CarloV
Hello ST,I would like to report a bug in the <stm32g4xx_hal_dma.c> file (V1.2.5). In the function DMA_CalcDMAMUXChannelBaseAndMask(DMA_HandleTypeDef *hdma), there's an error in calculating hdma->DMAmuxChannelStatusMask. For DMA2 channels, the channel_number should be adjusted by adding 8, 6, or 7 according to the MCU category. Otherwise, it will NOT be able to correctly determine and clear the synchronization overrun interrupt of the corresponding channel.To give you a better understanding of the issue, I've included some relevant code snippets with comments at Line 32 below:/** * @brief Updates the DMA handle with the DMAMUX channel and status mask depending on stream number * @PAram hdma pointer to a DMA_HandleTypeDef structure that contains * the configuration information for the specified DMA Stream. * @retval None */ static void DMA_CalcDMAMUXChannelBaseAndMask(DMA_HandleTypeDef *hdma) { uint32_t dmamux_base_addr; uint32_t channel_number; DMAMUX_Channel_TypeD
Hello,I can't setup DCMI DMA in cubeMX because in DMA list there is no available handle, then I choose DCMI interface in DMA list is enabled DCMII_PSSI request, but there is no handle, all handles is inactive, how to setup ?
Please refer to this thread that, for some reason, @FBL accepted as an answer (it is not) https://community.st.com/t5/stm32-mcus-embedded-software/usbx-audio-class-frame-done-callback-not-called/td-p/855262I'm seeing that when I try to start an audio flux from my PC to the USB Audio driver, I'm seeing the error handler being called with the following stack:status = _ux_device_stack_transfer_request(transfer, max_packet_size, max_packet_size); triggers the error as the status is 38 (what does it mean?). Inside the function, I've foundstatus = dcd -> ux_slave_dcd_function(dcd, UX_DCD_TRANSFER_REQUEST, transfer_request);which is the one that returns 38.In ux_api.h, the only value I was able to find that matches the return value was#define UX_TRANSFER_BUS_RESET 0x26 From here, I'm stuck as the ux_slave_dcd_function is defined as typedef struct UX_SLAVE_DCD_STRUCT { UINT ux_slave_dcd_status; UINT ux_slave_dcd_controller_type; UINT ux_slave_dcd_otg_capabi
I am working with Zephyr RTOS on the Nucleo-H7S3L8 board and have successfully flashed and run the blinky example on internal flash. However, I noticed that Zephyr does not provide official documentation for flashing applications into external flash. My question: Does Zephyr offer any official method or west command to flash applications directly into external flash, similar to how west flash works for internal flash?
Hello, I am trying to configure my STM32H723ZG to be able to read the value of a few current sensors. My main concern at the moment is the speed at which I need to read these. I'm hoping to be reading upwards of rate of 20kHz. My questions are about which method might be best, the standard way of reading the ADCs seems insufficient, I've seen online some methods are DMA and injected conversions. If anyone could provide some insight into what might be best and how to go about implementing them that would be great.Additionally, I wanted to ask how to determine an appropriate sampling time of the ADC. Thank you in advance for your help!
I need Threadx CMSIS RTOS V2 support. Does the H5 V 1.5. (the latest) support CMSIS RTOS V2?
Hi ST Team,I am currently using STM32H563ZIT6 and STM32H755ZIT6 in my project. We are now preparing to move from prototype to mass production, with an estimated requirement of ~10,000,000 units per year.As we transition into production, I am facing some issues and have a few important questions:1. Industrial-grade reliability & supportAre STM32 devices supported at an industrial-grade level similar to NXP or TI?Since we are planning large-volume production, I would like to understand:What type of technical support can ST provide during production ramp-up?Is it possible to get a dedicated technical contact or mentor for guidance?2. LocationI am based in Coimbatore, India.Please let me know the support timeline and whether any local ST representatives or FAEs can assist.3. Current issuesFor reference, here are my recent queries on the ST Community, which are still unresolved:STM32H755 end-of-frame detection failing with EventFlags:https://community.st.com/t5/stm32-mcus-embedded-softw
Hello,Im beginner,STM32H753 on the EVAL BOARD,Objective:At startup, the IAP is ignored with a condition on the jumpToIAPFlag flag that checks whether the reset is related to POWER ON or NRST (hardware button), which would therefore be a normal startup. The flag is then initialized to 0 and we jump directly to APP. Once in my APP, I want to be able to return to the IAP (by reading a bit on frames). At first, I did the same as for jumping from IAP to APP, but in the end, a soft reset should be enough for the jumpToIAPFlag to remain at 1 and not pass through the POWER ON or NRST reset conditions, and therefore my IAP menu should open. Everything related to frame logic, etc. is functional, but my APP to IAP no longer works since I started using a variable (jumpToIAPFlag) that is common to both my IAP and my APP. The result is that when I send the frame to open my IAP, there is indeed a reset, but my IAP does not launch. Instead, my APP launches as if my jumpToIAPFlag value h
Post edited by ST moderator to be inline with the community rules for the code sharing. In next time please use </> button to paste your code. Please read this post: How to insert source code.i am trying to interface stm32f411ceu6 with sdcard using spi ,and i have successfully interfaced it but when i try to run this code using freertos by using another timer as timebase source it not works below code is in interrupt .c file . i wanted to use freertos just to make task but i dont know why my code not works when i enable freertos from stmcubemx void SysTick_Handler(void) { /* USER CODE BEGIN SysTick_IRQn 0 */ if(Timer1 > 0) Timer1--; if(Timer2 > 0) Timer2--; /* USER CODE END SysTick_IRQn 0 */ HAL_IncTick(); /* USER CODE BEGIN SysTick_IRQn 1 */ /* USER CODE END SysTick_IRQn 1 */ }
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.