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
I am developing an audio recording application that captures audio from a MEMS microphone, stores the data in DMA, and saves it as a .wav file using the QuadSPI protocol. I have integrated the FatFS middleware for file system management. While the code compiles without any errors or warnings, my PC fails to recognize the mass storage device when I attempt to read the recorded data.
Hi,I am a junior developer, and I am trying to get an SD card working on an STM32 U5 series MCU with SPI. I encountered a problem: in the middleware section of CubeMX, I don't see FatFS; instead, I only have FileX. However, FileX does not have an SD card interface in my case. I want to use FatFS, but I’m not sure how to implement it into the project.Is it possible to generate the FatFS code on another board that supports it and then transfer the files into the new project?What are my options?Thanks.
Hi,I try to migrate the UX_Host_HID example on STM32U575I-EV to nucleo-u575zi-q.STM32CubeIDE Version: 1.17.0STM32CubeMX Version: 6.13.0I duplicate all the settings relating to USB host options to mine.In the middleware:and then copy the source code from the Ux_Host_HIDAfter programming the firmware to my ev board, i plug the hid device to the CN15 USB connector. There is noting happened and no power react on my hid device.Did i miss any settings to setup the USB host example??how can i provide power to the hid device??? Any response will be appreciated.
Hello,I am using the STM32H7S78-DK board along with TouchGFX, and I am attempting to display a video on the board's LCD. I have attached an AVI video file that I am trying to play. However, I am facing issues as the video is not running on the display.Could you please assist me in resolving this issue?Thank you for your support.Best regards,Mehul
Dear Forum,I am preparing a hardware prototype for a visual inertial odometry project that highly requires realtime-ness.The planned system would comprise an MCU for gathering data (with some pre-processing such as FFT, Kalman Filter, ...) from various sensors such as IMU, barometer, magnetometer, .. then transferring to a Linux based platform (Raspberry Pi 4/5 for example) running ROS2. And it looks like that this would be more or less similar to certain open-source flight controllers (for drones, rockets, ...) making use of STM32F4 or STM32F7/H7 families and I would opt for the H7.In terms of firmware for the MCU side, I would use the microros middleware for timestamp synchronization and data publishing via ROS2 topics.However, handling multiple tasks such as data acquisition from various sensors and micro-ros communication with host ROS2 platform but still guaranteeing the realtime-ness (low latency in terms of data timestamping) would be a challenge in this project. Ther
Hello,I have been trying to make a driver for the Winbond W25Q512JV, It's works normally ( I can read/write data, erase sector/chip, can write image as external flash loader with Touchgfx) until one day I could no longer erase sectors or full chips ( My chip has been erased no more than 100 times). When erasing, it doesn't report any errors, it just responds to a successful erase very quickly (~ 0.5s) , almost immediately (previously it took ~ 140 seconds to erase a full chip). When I read back these memory areas, they are not equal to 0xFF. I understand that erase has not been performed yet.I checked by reading the registers status: reg1 = 0xFE, reg2 = 0x02, reg3 = 0x03 and compare with datasheet, it mean bit SRL = 0, SRP = 1, WEL = 1, TB = 1, BP[3-0] = 1 => My chip into protection stateI use STM32H723 on OSPI2 running with QSPI mode, how can i resolve this problem? please give me solution. Thank you for your help
I have an STM32H7 and I use USB MSC. I do not use an RTOS.If I plug in my USB thumb drive I append a counter to a file and close it.This works.If I remove the thumb drive very quickly at precisely the wrong moment I get a hardfault.if Appli_state == APPLICATION_READY I set a flag and call f_open in the main loop. But then the USB drive is already gone, but there is no NULL pointer check.We call the USBH_Process() and USBH_MSC_AppProcess() in a timer interrupt and have modified it to have non-blocking delays. I wonder if this could be the cause or if there is an actual bug in the driver that misses to check the USB drive is not available.The following modification made to USBH_MSC_RdWrProcess() fixes the problem of hardfaults. static USBH_StatusTypeDef USBH_MSC_RdWrProcess(USBH_HandleTypeDef *phost, uint8_t lun) { USBH_StatusTypeDef error = USBH_BUSY; USBH_StatusTypeDef scsi_status = USBH_BUSY; if (phost->pActiveClass == NULL) { error = USBH_FAIL; return
As for STM32H563 MCU, will it result in a system reset after executing the function HAL_FLASH_OB_Launch? From my experiment, before executing HAL_FLASH_OB_Launch, I can read data from MCU via I2C while all returned data become 0xFF(i.e. invalid data) after executing this function. It seems that the MCU is suspended or reset. When I tried to trace the code through Debugger Section in Keil, the code can run smoothly to subsequent routines. Here is my code below. void EnableWriteProtect(uint8_t image) { FLASH_OBProgramInitTypeDef OBInit = {0}; FLASH_OBProgramInitTypeDef sOBPrev = {0}; uint32_t WRPSector; /* Unlock the User Flash area */ HAL_FLASH_Unlock(); HAL_FLASH_OB_Unlock(); /* Get the boot configuration status */ HAL_FLASHEx_OBGetConfig(&OBInit); WRPSector = OBInit.WRPSector | BIT(0); OBInit.Banks = FLASH_BANK_2; OBInit.OptionType = OPTIONBYTE_WRP; OBInit.WRPState = OB_WRPSTATE_ENABLE; OBInit.WRPSector = WRPSec
Hi everyone,So, I have FDCAN working in internal and external loop back but when I connect it to an external CAN bus and switch it to standard operation I get nothing. I know there are messages on the CAN bus because I have a CAN scanner on the bus that is showing activity. However, the RX interrupt never goes off. My first debugging step was to remove the H7 from the bus and just see using an oscilloscope if the H7 was outputting anything (for loop with HAL_FDCAN_AddMessageToTxFifoQ and a 50ms delay) , I'm aware that two devices are needed for communication but from my understanding the FDCAN controller should still transmit until it reaches the ACK?I then plugged in my CAN to USB converter connected directly to the H750B Discovery, I had a look at the signals before and after connecting the H750B and there was no change in the packets, they were the same if there was the single device (the CAN to USB converter) or if there was two devices, both the H7 and the CAN to USB con
Hello, Right now I am working on a Riverdi display, actually the RVT101HVSNWC00-B.I was able to connect with their external loader and to save the firmware in Bin and Hex formats. I wanted to review the firmware, as loaded, in CubeIDE. How would I do that without having to go through the trouble of setting up the board/ peripherals and pins? I want to review and edit what is on the board. Most of what I would need to set the peripherals and pins is in the code.I have read through all sorts of documentation and there is no direct path that I have been able to find. Any assistance would be appreciated.I can't seem to add the hex file because of the following...(application/octet-stream) does not match its file extension Thanks
I've tried so much stuff from official examples, unofficial examples, AI, debugging, forum posts, etc., that at this point I think it might be best to describe my understanding of what should be necessary to access the onboard microphone, and hope that there's an expert out there who can correct my mistake.~~~~The goal is to set up an I2S channel to receive Pulse-Density-Modulated data from the microphone, which is then written by Direct Memory Access to a buffer in the main memory. Interrupt Requests must be configured to fire when the buffer is filled, because “Polling Mode” is deprecated.The I2S driver file instructs that the following must be done:Create an I2S handle to be used as a parameter in DMA-related functions.Call HAL_I2S_MspInit() to configure a DMA/SPI handle, among other things.Call HAL_I2S_Init()Call HAL_I2S_Receive_DMA(), specifying a destination buffer as a parameter.The DMA driver file instructs that the following must be done:“Enable and configure the peripher
Hi, I'm using STM32H745-Disco kit. facing some issues while testing, Initially able to configure in STM32Cube IDE software, STm32Cube programmer and STM32CubeMX software's tool without any issues. Now working on testing an hall effect sensor with STM32H745 board, here i'm able to write code in IDE and build the code without any errors, also .elf file is generated successfully. but when i connect STM32 board and try to flash the code, getting issues, not able to flash the code correctly, not understanding what i'm missing here.Can you please help me, how to resolve my issues and reset my STM32H45 developer board into Default settings/Configurations. Note: I verified connection in STM32cube programmer tool, i can connect via ST-link and tried Full Chip erase, able to erase but my STM32 board just turns on and shows White color Display with blank Screen. Please refer attached snapshot.
Guys, it was really hard giving birth to this proof of concept: - Every 100ms the timer hits the ceiling , lessons leaned : trigger event selection setting is irrelevant, it'll work- in the TIM2 ISR (more precisely : the user callback TIM2's ISR is calling) I start ADC-with-DMA (DMA destination buffer and length given)- DMA shovels as much results ("conversions" ) as one has confiured in the ADC(!) to DMA Buffer, irrespective of DMA Buffer size.The weird part is: you can have a 4 word DMA buffer and define only 1 conversion in the ADC setup.Every call DMA-start of the ADC will fill the NEXT space in the DMA buffer! E.g. DMA memorizes, that 100ms ago, it shoveled the (single channel) ADC result at say buffer[2] as as it was instructed that the buffer were 4 words long. Thus this time it will fill buffer[3] with the result value. Next iteration, even if a whopping 100ms later it will loop back to buffer[0].You can define an arbitrary number of conversion
I use a STM32H750 chip and I would like to use the emdedded bootloader with the FDCAN1 interface. AN2606 specifies pins PH13 and PH14 for this version. However, the package I use (STM32H750VBT6 LQFP100) doesn't have these pins exported. Does it mean that there is no FDCAN bootloader option for the 100-pin package?Thank you in advance for your answer,Dorian Bignet
Hi,We are trying to interface ST33KTPM2I3WBZA9 with STM32H735IGT3 using I2C communication.We have used following commands and logic for communication. #define TPM_I2C_ADDRESS 0x2e << 1 #define TPM_REG_ADDR_COMMAND 0x00 uint8_t command_data = 0x80; uint8_t read_data1; uint8_t TPM_WriteReadTest(void) { if (HAL_I2C_Mem_Write(&hi2c4, TPM_I2C_ADDRESS, TPM_REG_ADDR_COMMAND, I2C_MEMADD_SIZE_8BIT, &command_data, sizeof(command_data), HAL_MAX_DELAY) == HAL_OK) { //HAL_Delay(10); } else { return TEST_FAIL; } if (HAL_I2C_Mem_Read(&hi2c4, TPM_I2C_ADDRESS, TPM_REG_ADDR_COMMAND, I2C_MEMADD_SIZE_8BIT, &read_data1, sizeof(read_data1), HAL_MAX_DELAY) == HAL_OK) { if (read_data1 == command_data) { return TEST_PASS; } else { return TEST_FAIL; } } else { return TEST_FAIL; } } Here when initially tested the "HAL_I2C_Mem_Write" function gets passed for around 2 minutes of power on,after that function fails.With further evaluation t
I need to compress voice in STM32L4. Here are my requirements:* STM32L4 run at maximum 80 MHz* Voice to be sampled by ADC/DMA* Flash usage for voice compression < 50 kBytes* RAM usage for voice compression < 64 kBytes* Compressed data < 10% of orignal data* Compress library shall not be GPL (cannot disclose all source code in my project)* Compressed voice need to be decompressed at Linux OS So I have searched some libraries and here are my findings:* ST Opus Cube- Flash size to big, 163 kBytes* Speex_STM32_master- GPL license* STM32F10x_AN2812_FW_V2.0.0 (speex library)- Contains assembler files for STM32F1* ST X-CUBE-AUDIO- Only for STM32F4 and STM32F7 So non of these solutions fits my requirements. Any other ideas?
This behavior seems like a bug.I’m using USBX CDC ACM on a H723 nucleo board. I’m trying to work with the blocking nature of the ux_device_class_cdc_acm_read. For my application, I would like to get data as soon as up to 256 characters are received but the length will be variable. I’ve tried a few things and found this behavior that seems wrong. My application currently just loops back any strings received.The endpoint is set to 64 bytes. That was the setting from the example and seems ok. I’ve set the requested_length to 256 and have a buffer allocated to this. This is 4 times the size of the end point.I’m using Hterm 0.8.9 on Windows 10.STM32CubeIDE 1.13.2, STM32CubeMX 6.9.2-RC4, STM32Cube MCU Package for H7 1.11.1, X-CUBE-AZRTOS-H7 3.2.0.ThreadX and USBX is 6.2.1.When I send a 63 byte string, the read call returns with a length of 63. Data and length are good.When I send a 65 byte string, the read call returns with a length of 65. Everything is ok.However, when I send a 64 byte stri
Hi, I am running into an issue running developed firmware an STM32L452RE uC on a custom PCB. I am able to program the uC fine, and the debugger can open (I am running Keil). However, the firmware does not execute. It sits at a random memory position, and I dont understand why. As an aside, things that i know are correct -- the boot pin in hardware is tied correctly, the programmer is wired correctly (as I am able to program memory and verify the programming via a separate tool), and i know the developed firmware works as I have been running it on a L452 nucleo board for the last two weeks. I have tried all the normal things (power reset, software reset, toggling the reset line of the uC, restarting keil, etc etc etc), but none of this gets by the issue. When debugging, this is what the core registers list as: I have no idea why it is doing this, nor how to get by this issue. Can someone chime in if they have experienced this? Thank you
The USB_OTG_HS peripheral keeps timing out on init and hanging the whole program.I have created a STM32 project using the NUCLEO-H7S3L8 board from the new project menu. I have enabled the USB_OTG_HS as device only (but left the middleware disabled) and written a simple blinky main. The code always times out on the "MX_USB_OTG_HS_PCD_Init". Specifically USB_CoreReset() times out in "stm32h7rsxx>USB_CoreInit". I have tried multiple different USB clock configurations (HSE, HSE/2 and PLL3Q) but it still times out.Some people have suggested (Solved: STM32U595 timeout in USB_CoreReset() - STMicroelectronics Community) including the below in "HAL_PCD_MspInit" but STMCube cannot find it and I can't where to include it from_HAL_RCC_SYSCFG_CLK_ENABLE();I have included my project.zip but it is just the board default project. I have XSPI1, XSPI2 and ExternalMemLoader disabledExternal disabled., And have enabled the High-Speed Crystal/Ceramic Resonator, the blue LED and the USB_OTG_HS as device
Hi,Can you help me to find an example code for using websockets over WiFi connection on B-L475E-IOT01A please? couldn't find it in the Stm32CubeL4
Hi everyone,I'm new to STM32CubeIDE and encountering an issue with my code. It seems to halt at the following loop: while ((HAL_GetTick() - tickstart) < wait) { } I've attached the .ioc file for reference. Can someone help me identify why the program gets stuck here and suggest a fix?Thanks in advance!
I faced with an interesting issue. Here is the code:1. Working: void GameScreenPresenter::activate() { IScreen* scr = &view; scr->Func(); } 2. Doesn't work: void GameScreenPresenter::activate() { void* ptr = &view; IScreen* scr = static_cast<IScreen*>(ptr); scr->Func(); } Seems like in the second option scr just nullptr. Why?
Hello,I’m a beginner working with the STM32H723ZG, and this is my first time trying to implement USB functionality. I’m attempting to set up the USB peripheral in Device mode (CDC) to send audio data from a buffer (filled by SAI via DMA) to a PC.I’ve configured the USB in Full Speed (12 Mbit/s) mode using the internal PHY in STM32CubeMX and generated the initialization code. However, Windows fails to recognize the device, showing the error "USB device not recognized". I have also downloaded and installed the STMicroelectronics Virtual COM Port (VCP) driver to ensure proper communication.I found out that the error occurs specifically during the call to MX_USB_DEVICE_Init(); in the initialization process.After debugging, I traced the issue to the function USB_CoreReset() in stm32h7xx_ll_usb.c, which times out.USB Configuration in CubeMX:The clock for USB is set to 48MHz.I have no idea what I’m missing… Have you got an idea?PS: The main.c file of my project is attached for reference.
The FLASH has (what will become) a bootloader, and an application.I can successfully jump from bootloader to application without issue.The application communicates over USART, through a CP210x components, to a USB-A connector, and to an Android application I built for communicating over this serial connection.I copied the .ioc file from the application to configure the bootloader. And if I plug that USB-A connector into my desktop instead of the Android device, I can see the bootloader's messages over the USB-A connector. But I cannot see these on the Android device.So, the bootloader outputs over USART, through the CP210x, to the desktop (running Linux), and displays on the console. But if I follow the same exact steps to trigger the communication, and I use the Android app instead, it won't display the bootloader's output... but after the bootloader jumps to the application, it will display the application's output (both on my desktop, and my Android device).The fir
Hello,Where can I find documentation on the error counters of the FDCAN_ErrorCountersTypeDef structure? I would be particularly interested in how the incrementation of TxErrorCnt behaves if hfdcan1.Init.AutoRetransmission = ENABLE; (How often does the CAN peripheral attempt to transmit in the event of an error (e.g. no other node attached) and by how much is the TxErrorCnt incremented per transmission attempt?) I'm using STM32H755ZIMany thanks for any clarification
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.