Developer support experience survey - We value your feedback
Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hi,Observed ProblemHAL_ADC_Start_DMA() returns HAL_OK, TIM2 starts, ADC begins converting (confirmed via ADC_ISR in debugger), but HPDMA1 Channel 0 immediately raises a DTE (Data Transfer Error), triggering the error callback. EnvironmentMCU: STM32N657X0HXQBoot mode: Two-stage boot — FSBL + XIP Application (external flash via XSPI2, mapped at 0x70100400)Toolchain: STM32CubeIDE / GCCHAL: STM32CubeN6 (latest)Security mode: Full Secure — all code runs in Secure Privileged mode, no NonSecure worldProject DescriptionThis is a minimal reproduction project containing only:ADC1 — single channel (PA8 / INP5), triggered by TIM2 TRGO, DMA circular modeHPDMA1 Channel 0 — linked-list circular mode, PERIPH_TO_MEMORY, ADC1 → AXISRAM2TIM2 — provides ADC trigger at fixed rate (Period=799, no prescaler)No ETH, no LwIP, no NPU — deliberately stripped down to isolate the DMA issue.Memory Layout (Linker Script) ROM (XIP) : 0x70100400, 511K — code in external flashRAM (FLEXRAM) : 0x34000000,
Hi Support,I am unfamiliar with this project structure where the generated project contains separate boot/ and appli/ directories. I created the project using STM32CubeMX with the CMake toolchain selected, and noticed that two separate .elf files are produced after building.I am unsure which of these should be used when flashing the board using STM32CubeProgrammer. Currently, I am able to successfully flash the device using the .elf located in the /boot/ build directory, but I cannot flash the .elf located in /appli/.Could you clarify the purpose of the boot/ and appli/ directories and which firmware image is intended to be flashed? Additionally, is there a way to generate a more traditional single-application project structure (i.e., without separate boot and application directories) when targeting the STM32H7S3L8?Any guidance or suggestions would be greatly appreciated.
Post updated by a ST moderator: 1- Title translated from Chinese to English. 2- Used </> button for the code. I am attempting to transplant the latest FreeRTOS kernel program on the basis of the project generated by CubeMX. When FreeRTOS uses HSI, there is no problem and it runs normally. However, when using HSE, an initialization timeout occurs. Without transplanting FreeRTOS, HSE can pass the initialization normally.My approach was to incorporate the xPortSysTickHandler, xPortPendSVHandler, and vPortSVCHandler required by FreeRTOS into the three functions in the it file. Then, I found that it was the xPortSysTickHandler() within the systick_handler() that was causing the issue. After commenting it out, the HSE could be initialized normally. So, I'm asking on the forum what the reason is and if there's a way to solve it. AI is not reliable. void SysTick_Handler(void) { /* USER CODE BEGIN SysTick_IRQn 0 */ /* USER CODE END SysTick_IRQn 0 */ HAL_IncTick(); /* USER CODE BEGIN
So, when I was actually trying to work on the STM32F103CBT6TR MCU which is placed onto the custom board while I tried to toggle PA1 in it which only gave floating values then in debug, I found out it is going into Hard Fault Handler so then again I replaced them with new IC but again it is coming as same Hard Fault Handler. I also tried for pin 0 too. What can we do to solve this?
What is recommended way to change or override the 'SYSTEM_CLOCK' symbol defined in 'tx_initialize_low_level.S' , that feeds into the threadX systick period calculation? I could change the SysTick after threadX is started -- that is probably the easist fix. I dont want to modify the threadX submodule in my project, as its pulled from the internet at some pinned version. I've currently made a local copy of 'tx_initialize_low_level.S', and then I use CMake to select that particular S file - so that solves the problem, but I dont like having a personal copy of a file from the submodule. After experimenting for some time, and then scouring the web, I cant find any suggestions on this issue, there are some changes that can be imported via having your own 'tx_user.h' -- but I cant see anything that can override the SYSTEM_CLOCK. Cheers, Nick
HI, I'm capturing image as RGB565 using camera over DCMI on DMA. Capturing is complete and data is available. Now I need it to convert into JPEG format. But, the JPEG in/out DMA is not working. Any help will be appreciated. snippet: MX_DCMIQueue_Config(); HAL_DMAEx_List_LinkQ(&handle_GPDMA1_Channel12, &DCMIQueue); __HAL_LINKDMA(&hdcmi, DMA_Handle, handle_GPDMA1_Channel12); MX_JPEGInQueue_Config(); HAL_DMAEx_List_LinkQ(&handle_GPDMA1_Channel13, &JPEGInQueue); __HAL_LINKDMA(&hjpeg, hdmain, handle_GPDMA1_Channel13); MX_JPEGOutQueue_Config(); HAL_DMAEx_List_LinkQ(&handle_GPDMA1_Channel14, &JPEGOutQueue); __HAL_LINKDMA(&hjpeg, hdmaout, handle_GPDMA1_Channel14); Thatnks-Shubhendu Using following:1. STM32CubeIDE, Version: 1.16.12. MCU: STM32U5G9BJYXQ3. Camera: OV7725 @devjeet-adben
I am trying to develop a GUI application with the STM32H7S78-DK. I want to send uart data from the board over wires to a raspberry pi. To simplify the process without graphics I'm just trying to send a simple "Hello" string over UART7. From what I can see from the data sheet, UART7 is connected to pins PE7 and PE8, which correspond to D0 and D1 on CN14 on the arduino headers by default. Please correct me if I am wrong. So I first am just initializing those pins with uart on STM32CubeMX then I was just sending a simple HAL_UART_Transmit() with a 2 second HAL_Delay(). However, I see no data coming through when putting a logic analyzer on those pins. What am I doing wrong? Here is the very simple basic uart code in main. /* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************
I am running the FLASH_EraseProgram example code provided by STM32CubeU3. the code fails in erasing the flash and enters ErrorHandler. I have verified the FLASH_USER_START_ADDR & FLASH_USER_END_ADDR. it is set as follows. #define FLASH_USER_START_ADDR ADDR_FLASH_PAGE_128 /* Start @ of user Flash area */#define FLASH_USER_END_ADDR (ADDR_FLASH_PAGE_255 + FLASH_PAGE_SIZE - 1) /* End @ of user Flash area */I have tested in both debug and run mode, it is not working as expected. Is anything to be modified to run the code. regards,Rajath
Hi, I am currently working on a project where I want to adjust the duty cycle and trigger an ADC measurement on every counter rollover. I managed to get the PWM running in center-aligned mode, but I’m having trouble triggering the counter rollover at the correct moment. To verify whether the trigger is correct, I routed the output compare signal to an external pin and observed it on an oscilloscope. The basic idea is to run an additional counter alongside the PWM. This counter should count up to ARR and then generate a trigger that starts the ADC conversion. Becuase in the center aligned mode two update event occurs both on CNT=0 and CNT=ARR. On the oscilloscope, it looks like the trigger—presumably when CNT = 0 (at least that’s my assumption)—produces an edge. Im using NUCLEO-G491RE. What could I be missing here? What might be causing this behavior? Yellow (PWM TIM8 Channel3), Blue (PWM TIM8 Channel1), Orange (Capture Compare TIM8 Channel 4) Thank you in advance!
I think this is a very similar (perhaps the same) problem as described here. I replied to that thread but was asked to start a new thread - here it is. I'm reposting because I didn't feel the prior thread has a satisfactory answer (de-initialize and re-initialize the UART). HAL_UARTEx_ReceiveToIdle_DMA() seems to be intrinsically a very fragile function. If I call `HAL_UARTEx_ReceiveToIdle_DMA()` when the UART receive line is actively receiving data (when the other end is transmitting). A good percentage of the time it returns HAL_ERROR.I'm using STM32L4 HAL 1.13.6 (Cube 1.18.2).The problem is that the UART generates an overrun error immediately when `UART_Start_Receive_DMA()` enables the overrun error. The overrun error overwrites `huart->ReceptionType = HAL_UART_RECEPTION_STANDARD` which causes `HAL_UARTEx_ReceiveToIdle_DMA()` to return HAL_ERROR as shown in the code snippet from `HAL_UARTEx_ReceiveToIdle_DMA()` below: /* Set Reception type to
I am trying to use the microSD card on the STM32H753I-EVAL2 board with ThreadX and FileX.I generated the base project using CubeMX with the following configuration:Board: STM32H753I-EVAL2Peripheral: SDMMC1 enabledMiddleware: ThreadX + FileXOption "Is external transceiver present?" = Yes (since the board uses the IP4856CX35)Default CubeMX clock configurationHowever, the generated code fails during initialization at:HAL_SD_Init(&hsd1);inside:MX_SDMMC1_SD_Init()After debugging further, I found the failure occurs inside SD_PowerON() when sending CMD55 (APP_CMD).The error returned is:HAL_SD_ERROR_CMD_RSP_TIMEOUTFrom stepping through the code:SD_PowerON()-> SDMMC_CmdAppCommand()-> CMD55-> HAL_SD_ERROR_CMD_RSP_TIMEOUTSo the card never responds to CMD55.Additional observations: CubeMX configures the SDMMC1 kernel clock to 150 MHz. From the reference manual / datasheet, it seems the maximum SDMMC kernel clock should be around 125 MHz.I am not sure if this clock configurat
I've been able to get USB Host working on Nucleo F767I board, but I can seem to get it working on STM32WBA65RI part. I've tried the following two boards combinations:MB2130A on MB1801D (STM32WBA65I-DK1)MB21230A on MB2143A (Nucleo-WBA65RI) I've tried the following projects:STM32CubeWBA/Projects/NUCLEO-WBA65RI/Applications/USBX/Ux_Host_HIDSTM32CubeWBA/Projects/NUCLEO-WBA65RI/Applications/USBX/Ux_Host_HID_StandaloneMy own STM32CubeMX based project.I've done all my builds (both the working F767 and failing STM32WBA) using STM32CubeIDE. I've been able to build, flash, and debug into the executable in all cases. A fresh clone of STM32CubeWBA from github, I see the expected printed out:USB Host library started.Starting HID ApplicationConnect your HID Device**** USB OTG HS in HID Host ****However, plugging devices in CN9, does not result in them getting detected. Placing a breakpoint on _ux_hcd_stm32_interrupt_handler does n
Split from this post. Hello, Sorry to bother you again, but it seems that since yesterday (when I enabled the CAN bus), the UART on my Nucleo has stopped working, even though I haven’t touched anything since then. To be precise, I’m monitoring my UART signal and I’m only getting ‘framing errors’, obviously, I’ve checked and the baud rates are the same on both sides. Could activating the HSE clock have disrupted the operation of my UART ? Thank you in advance for your help,
Dear ST Community,I have successfully run the Object Detection Application on the STM32N6 Discovery Kit using the reference firmware from the STM32AI ModelZoo.As part of extending its functionality, I am looking to implement the following two features:Convert the captured RGB frame to JPEG formatStore the JPEG image onto the SD card available on the Discovery KitFor the RGB-to-JPEG conversion, I have referred to this JPEF Encoder example and integrated this JPEG encoding logic into the object detection firmware. Specifically, I am feeding the nn_in buffer (used as neural network input) to the JPEG encoder. However, during execution, the program gets stuck at this line:jpeg_encode_processing_end = JPEG_EncodeOutputHandler(&hjpeg);The jpeg_encode_processing_end flag is not being set to 1, indicating that the encoding process does not complete. I suspect either the JPEG input handling is not progressing, or the DMA isn't properly triggering the required callbacks.Could you kindly
HiI'm create a project that sending data from RFID reader (RS232) to PC (via USB HID) as a keyboard.I using RS232 to TTL for STM32 can read data and using USB HID to send it to PC.My code is working but a character sending is slow, but when i remove delay, character is missing. Ex: data from RFID: 4F002F144EWhen I have 15ms delay, my PC receive all characterBut when remove 15ms, some character is miss.So I want to ask have anyway to speedup ?This is my loop: while (RingBuffer_Availabel(&ring)) { uint8_t data; RingBuffer_Pop(&ring, &data); if(data == '\r'){ send_enter(); break; } keyboardhid.MODIFIER = (data >= 'A' && data <= 'Z') ? 0x02 : 0x00; keyboardhid.KEYCODE1 = ascii_to_hid((char) data); USBD_HID_SendReport(&hUsbDeviceFS, (uint8_t*) &keyboardhid,sizeof(keyboardhid)); HAL_Delay(15); usb_ready = 0; keyboardhid.MODIFIER = 0x00; keyboardhid.KEYCODE1 = 0x00; USBD_HID_SendReport(&hUsbDevic
Hello everybody I'm building the device with power delivery sink function. I need the 21V (PPS). I done the configuration with STM32CubeMX and wrote some code in STM32CubeIDE. Unfortunately, after about 14 s of estabilishing connection, the source send hardware reset. What is the problem? In the attached file is the trase from STM32CubeMonitor-UCPD. I use STM32CubeIDE v. 2.1.1 and STM32CubeMX v. 6.17.0. void USBPD_DPM_SNK_EvaluateCapabilities(uint8_t PortNum, uint32_t *PtrRequestData, USBPD_CORE_PDO_Type_TypeDef *PtrPowerObjectType) { /* USER CODE BEGIN USBPD_DPM_SNK_EvaluateCapabilities */ //DPM_USER_DEBUG_TRACE(PortNum, "ADVICE: update USBPD_DPM_SNK_EvaluateCapabilities"); USBPD_SNKRDO_TypeDef rdo; rdo.d32=0U; rdo.ProgRDO.ObjectPosition=6U; rdo.ProgRDO.OutputVoltageIn20mV=1050U; //21V rdo.ProgRDO.OperatingCurrentIn50mAunits=60U; //3A rdo.ProgRDO.NoUSBSuspend=USBPD_ENABLE; rdo.ProgRDO.USBCommunicationsCapable=USBPD_ENABLE; *PtrPowerObjectType=USBPD_CORE_PDO_TYPE_APDO; *Ptr
Hi I would like to check if it is necessary to call MX_RNG_Init() after the MCU exits STOP MODE to reconfigure the RNG? BR Gilberto
I downloaded the STM32C5 software package from st.com, but I am unable to use IAR. How can I import the CMake project?
Hello all,I've been using this U5 chip for a couple of years but I am just now trying to update all of the packages to start working on the project again. I have the U5 firmware at 1.8.0, AZRTOS-H7 at 3.5.0 (I'll explain why I mention that), FileX is 6.4.0 and the CubeIDE is 2.0.0.When I started this project, I was using an H7 chip and that is where the Azure implementation started. Now things seem integrated and those choices in the software packs selection in CubeMX don't seem to matter...I assume. The H7 package is the one still loaded to my hard drive. I've tried creating a new project and setting everything up again but nothing has changed from my original project. I tried to apply some U5 patch with version 2.2.0 or something like that. MX took it and made it disappear into the void. Again, maybe I don't need to care about manual package setup anymore.ThreadOS works great and everything has been working great for me. I added USBX, F
According to Page 1354 of rm0394, setting LDMA_TX bit must occur only when SPE=0.However, from my reading of the function HAL_SPI_Transmit_DMA, this bit may be set or cleared when the DataSize <= 8bit and MemDataAlignment == HALFWORD, even if SPE=1.This looks like a bug.Am I correct?STM32Cube MCU Package for STM32F4 STM32L4, version 1.28.3
Hello, I tried to program a MSD on an STM32C071. My computer "sees" the USB device but didn't recognized it as a storage device. I use the NUCLEO-C071 and have setup the following: RCC:High Speed Clock(HSE): Crystal/Ceramic Resonator Clock Configuration:Input frequency: 8HCLK: 48ToUSB(Mhz) HSIUSB48: 48 CubeMX USB:Mode: Device_Only,USB interrupt enabled CubeMX USBX:UXDevice memory pool size: 1024*5USBX Device Generate Core Init code: yesUSBX Device System Stack Size: 1024*5 In CubeIDE:main.c: /* USER CODE BEGIN 2 */ MX_USB_PCD_Init(); // Line 94 /* USER CODE END 2 */ /* USER CODE BEGIN USB_Init 2 */ HAL_PCDEx_PMAConfig(&hpcd_USB_DRD_FS, 0x00 , PCD_SNG_BUF, 0x20); // Line 180 HAL_PCDEx_PMAConfig(&hpcd_USB_DRD_FS, 0x80 , PCD_SNG_BUF, 0x60); HAL_PCDEx_PMAConfig(&hpcd_USB_DRD_FS, 0x81 , PCD_SNG_BUF, 0xA0); ux_dcd_stm32_initialize((ULONG)NULL, (ULONG)&hpcd_USB_DRD_FS); HAL_PCD_Start(&hpcd_USB_DRD_FS); /* USER CODE END USB_Init 2 */ In ux_device_msc.c /* USER CODE BEGIN P
I am trying to run a ADC+DMA program inside application based program. (generated FSBL+Application project)While debugging the application project, it automatically jumps to somewhere else as shown in screenshot and is unable to debug the application one.The prgram is stucking at for loop which is not inside application code.
I am trying to implement TFTP file transfer on my STM32 module (Nucleo-H723ZG). I have taken reference from:https://github.com/STMicroelectronics/STM32CubeF4/tree/master/Projects/STM324xG_EVAL/Applications/LwIP/LwIP_IAPhttps://github.com/JoeMerten/Stm32-Tools-Evaluation/tree/master/STM32Cube_FW_F4_V1.9.0/Projects/STM324xG_EVAL/Applications/LwIP/LwIP_TFTP_Server For file transfer I am using tftpd64 software. I used the software for PC-PC file transfer which were on the same local network and it was successful. But when I am trying to send file from PC-STM32 module I am only receiving write request from the client (PC). After that I am suppose the get a block 0 acknowledgement from the server (STM32 module) which I am not receiving. I tried debugging the code but in the code the acknowledgement is being sent successfully. For more information:- my ethernet is up - I have successfully ping the IP address that I have assigned or configured for the module. - Moreover, I am using
Hello, As part of a new project, I'd like to use DFU mode for programming my STM32F303VET6. I have a button that controls BOOT0. If the button is pressed during the microcontroller reset, there's no problem; I successfully enter DFU mode and can reprogram without any issues. I'd like to be able to perform this step without any physical intervention on the board, but rather by creating a 'jump' from my application to the internal ST Bootloader. My board is connected to the PC via a CDC connection. Using HyperTerminal, I send a command that calls a JumptoBootloader function. My function is as follows: void JumpToBootloader(void) { // 1. Stop USB peripheral RCC->APB1ENR &= ~RCC_APB1ENR_USBEN; // Disable USB clock RCC->APB1RSTR |= RCC_APB1RSTR_USBRST; // Reset USB RCC->APB1RSTR &= ~RCC_APB1RSTR_USBRST; // 2. Put USB pins (PA11/PA12) in analog mode RCC->AHBENR |= RCC_AHBENR_GPIOAEN; GPIOA->MODER |= (3U << (11 * 2)) | (3U << (12 * 2)); // Ana
Hi everyone,As part of one of my projects, I have to use an SD card to store my data. Since the final board has not yet been manufactured, I started developing my software on the STM32303E-EVAL evaluation kit.For reference, it uses the same microcontroller that will be on my own board.Back to the STM32303E-EVAL. When I received this board, the provided demo worked correctly (GUI display and so on).I wanted to test the examples dealing only with the SD card (FAT32 format), which are available in the repository:→ STM32Cube_FW_F3_V1.11.0\Projects\STM32303E_EVAL\Applications\FatFs\FatFs_uSDImported into CubeIDE, it does not compile, files are missing – in short, it is a mess.So I started over from scratch, installed AC6, opened the project, flashed it, started a debug session, and I get stuck in f_mount().The SD card is correctly inserted.Could you help me?Or, failing that, provide me with a working example?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.