Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hello,I have a NUCLEO-F767ZI I am trying to integrate an SD card with for data storage. The SD card is a Kingston CANVAS Select Plus 64GB in ExFAT format.I am connecting it to the NUCLEO board through an Adafruit SD card module which has pullup resistors on all lines, including the detect pin, and I am using the internal GPIO pullup resistors too for D0, CMD and SD_DET to make sure the communication is uninterrupted. Below you can see the FATFS configuration printf("Mounting filesystem...\r\n\n");FR_Status = f_mount(&FatFs, "", 1);if (FR_Status != FR_OK){printf("Error mounting SD card! Code: %d\r\n\n", FR_Status);break;}printf("SD card mounted successfully\r\n\n"); FR_Status returns FR_NOT_READY (3 in console). The hardware configuration is correct as I can read the capacity and some other data from the SD card, but I cannot access the card itself.Does anyone have any suggestions?
I am trying to interface DP83848 ETH PHY chip with STM32H743BIT6 MCU. actully my previous project (STM32F746+DP83848) working fine and I shifted to STM32H743. below I am uplaoding my project of STM32H743.I have generate the code with availble LAN8742 PHY. but generate the code . import the file for dp83848. Can someone check and let me know where is error . what should i change while generate the code from CubeMX?
Split from old (2020), abandoned thread: https://community.st.com/t5/stm32cubemx-mcus/uart-emulation-an4457-is-it-possible-to-use-it-via-cubemx/td-p/310812 for better visibility - and to enable marking a solution...Hi,I have the same problem, trying to reverse engineer the AN4457 example for an H7xx MCU using with STM32CubeIDE. Currently my problem is that I need to "#define HAL_UART_EMUL_MODULE_ENABLED " in stm32h7xx_hal_conf.h, but there is not "USER CODE" field, so the define gets overwritten each time I change the IOC file.I guess the proper approach would be to select the UART_EMUL module in the device configuration tool of the GUI, but I do not know how to make it visible there ...Did anyone implement this example using an IDE? It would be really helpful for the CubeIDE users.Thanks!
Hello,I am implementing a WEB Server with my STM32H743 board.(AzureRTOS, NetXDuo, FileX using microSD)I have referenced the example implemented in STM32H735G-DK board.Refer to the belowhttps://github.com/STMicroelectronics/x-cube-azrtos-h7/tree/main/Projects/STM32H735G-DK/Applications/NetXDuo/Nx_WebServer The webpage opens the index.html file and the delays by more 10 seconds before opening other files. Does it take a long time to open large files( 65 kbytes ) from SD Card? I wonder how I can improve this.
Hi. I am programming a board with STM32G0, which is battery powered. All processor pins are used. Overall, the device works without any problems. In normal operation mode, only STM draws about 3.5mA. However, I wanted to put the device to sleep and:1. In Shutdown mode, STM draws 40nA (according to the documentation), and the entire device 720uA, which is satisfactory for me, but I want to be able to wake it up from a dozen or so GPIO pins, so I tried to start Stop mode and:2. In Stop mode, STM draws 600nA (more than the documentation indicates, but still quite good). I have the ENABLE pins of the additional LDO and charge pump connected to the PB9 pin through 100R resistors, which are on the PCB and power other systems. There is also a 4k7 pull-down on the ENA pins. During normal operation, PB9 is in a high state, and before sleep it is set to a low state to turn these systems off. And here comes the problem: when I leave PB9 in the high state before switching to Stop mode, the cu
I am looking for help solving a CDC-ACM problem with Azure Rtos ThreadX, and the USBX Middleware for STM32F4.My device is an STM32F427VGTx.I currently have a project that uses the USBX host library. I am connecting up to 4x CDC-ACM devices through an off-the-shelf USB Hub.I had problems connecting multiple devices through the hub, but I have solved that after following the solution to update the USBX core bsp from the stm32-mw-usbx repo. (STM32H7 and USB2514 Continued Problems) I can connect to all 4x CDC-ACM devices (data class instance and control class instance enumerate successfully on all devices).I can send commands to all devices using the control interface by sending a transfer request to the control endpoint.I can read from up to two CDC-ACM devices, but the third and fourth device will timeout after calling ux_host_class_cdc_acm_read. The function returns a transfer-request-timeout after failing to retrieve the ux_host_semaphore. The status of ux_host_semaphore_get is al
Hello Community,I’m working on a custom board using the STM32G474VET3 MCU and encountering an issue with the ADC readings. I’m consistently getting a raw value of 4095 on all the ADC channels I’m using. It seems like something might be misconfigured, but I haven’t been able to pinpoint the cause.Any insights or suggestions would be greatly appreciated.Thank you!
I use JumpToBootloader() to jump to bootloader, device enters bootloader and shows devicei then send it this commanddfu-util -d 0483:df11 -S 305737513432 -a 0 -s 0x08000000:leave -D fw.binand device resets Erase [ ] 0% 0 bytesdfu-util: Error during special command "ERASE_PAGE" get_status: -9 (LIBUSB_ERROR_PIPE)If i enter the bootloader via the BOOT pin it works fineIt is like something else needs to be reset ? dfu-util 0.11-devFound DFU: [0483:df11] ver=0200, devnum=44, cfg=1, intf=0, path="20-1.2.1.2", alt=0, name="@Internal Flash /0x08000000/8*128Kg", serial="305737513432"Found DFU: [0483:df11] ver=0200, devnum=44, cfg=1, intf=0, path="20-1.2.1.2", alt=1, name="@Option Bytes /0x5200201C/01*88 e", serial="305737513432" Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.Copyright 2010-2021 Tormod Volden and Stefan SchmidtThis program is Free Software and has ABSOLUTELY NO WARRANTYPlease report bugs to http://sourceforge.net/p/dfu-util/tickets/&
I am currently working on interfacing a 2.83-inch TFT display (320x240 resolution) with the STM32U5F7VJT6 microcontroller using the FMC parallel 8080 interface. I have successfully configured the FMC in STM32CubeMX with the following settings:Mode Configuration: NOR Flash/PSRAM/SRAM/ROM/LCD1Chip Select: NE1Memory Type: LCD InterfaceLCD Register Select: A16Data Width: 16 bitsAfter generating the code, I utilized the ST7789 driver to fill the screen with solid colors using the function ST7789H2_FillRect(0, 0, 320, 240, 0xFFFF);, which worked as expected.Subsequently, I aimed to integrate TouchGFX to enhance the graphical interface. I configured TouchGFX accordingly, added an image using ApplicationTemplate.touchgfx.part, generated the code, and flashed it to the device. However, the image does not appear on the TFT display.I would appreciate your guidance on the following:TouchGFX Integration: Are there specific steps or configurations required to
This is not a question, but a solution to a problem that took me forever to solve. This may be evident to many, but it was not to me, soI hope this will save others (and my future self) a lot of time...I was trying to implement a custom bootloader, where I could not even get the minimal implementation working: a slowly blinking LED when doing nothing and staying in the bootloader, or a quickly blinking LED when jumping to a different application.The issue is that this is tricky for the STM32F030/070 on which I am developing, because it does not have a VTOR register and the few code examples I found did not work, or did jump, but interrupts stopped working.The bootloader only needs to jump to the new reset vector:#define APP_ADDRESS 0x08004000U void JumpToApplication(void) { __disable_irq(); if (*(uint32_t*)(APP_ADDRESS + 4) == 0xFFFFFFFF) { return; // invalid reset handler } uint32_t jump_address = *(volatile uint32_t*)(APP_ADDRESS + 4); void (*app_reset_handler)(void) = (
Dear ST community,I noticed that the CRC API is forcing the input buffer to be aligned 32 bits, which can be understood in order to be generic, but in the majority of the case we have a byte buffer which could be stored in unaligned in the memory or it's taken from frame where storage address is unaligned, till now it's not a problem we can cast (uint32_t *) and everything should work, except the case where the core of STM32 is Cortex M0 or M0+ so unaligned access is not supported and will lead to hard fault if the InputDataFormat is not selected to be CRC_INPUTDATA_FORMAT_BYTES .In my opinion the exposed API with forced aligned buffer can be an error prone, there is for sure a lot of workaround that can be applied but I could prefer to add to the API CRC_Handle_8 and CRC_Handle_16 to the exposed API, with that it will solve immediately the problem and remove any usage ambiguity.Maybe I'm wrong and I miss something.Best regardsBassem Taamallah
Good morning everyone, I have been trying for two days now to perform a communication between the two cores of STM32H747I-DISCO. Being my first time to try my hand at dual core Processors I decided to start from tutorials:- https://www.youtube.com/watch?v=MLcULDnF5ic- https://www.youtube.com/watch?v=miUzjoe3rAo&t=561s (Also the precendent videosAlthough I followed these tutorials step by step (without even changing the names to the variables) I could not get it to work at all.I then also tried with the "PingPong" example directly from STMCubeIDE but with both RTOS and bareMetal versions it didn't work...The only thing I can think of is that maybe I need to move some jumpers on the board or something....Thanks in advance to everyoneP.S.FW H7 Version 1.12.1STMCubeIDE Version 1.18.0STMCubeMX Version 6.13.0Translated with DeepL.com (free version)
I'm working on a project involving the SD card on the STM32F407VET6 Black board Project. I would greatly appreciate your expertise and guidance in connecting and writing the necessary code to get the stepper motor running. If anyone has experience with this setup or can share sample code and wiring diagrams, it would be incredibly helpful. Your insights would make a significant difference in advancing my project. Thank you in advance for your support!
Hi everyone,I'm new to embedded systems and file systems, and I'm currently trying to integrate LittleFS into the STM32H573-DK board using SRAM3 as storage.I’ve looked at some examples and documentation, but I’m still confused about how to set things up correctly. I would really appreciate a step-by-step guide with simple explanations—not just how to do things, but also why each step is necessary.Specifically:How do I configure the memory and file system in STM32CubeIDE?How should I implement the block device functions for SRAM3?What are the important parameters when initializing LittleFS?How do I actually test if LittleFS is working?I'm using STM32CubeIDE for this project, and for now I’d like to stick to SRAM3 before later trying OSPI.Any help, examples, or explanations would be greatly appreciated! Thank you in advance.
Hi folks.I am trying to optimize (by time) the following piece of code. for (uint32_t i = 6 + adc_data_index; i < 35 + adc_data_index; i++) { raw[0] += (adc_data[i]); raw[1] += (adc_data[i + 35]); raw[2] += (adc_data[i + 70]); raw[3] += (adc_data[i + 115]); }For now it takes 3.5 micro-second at 250 MHz clockI want to make it less by at least factor of 2.Do you have any ideas?What I tried:1. Change the optimization to be -Ofast2. Using pointer3. Also, thought about FMAC and DFSDMHow can I achieve that?ThanksYonatan
Hello ST Community,I’d like to report an issue observed with HAL_UARTEx_ReceiveToIdle_DMA() on STM32L433RCT6P using STM32CubeIDE v1.17.0 and the latest STM32CubeMX code generator (L4 series).Setup:Board: NUCLEO-L433RC-PIDE: STM32CubeIDE 1.17.0HAL version: STM32CubeL4 latestUART: USART2DMA Mode: CircularBaudrate: 115200Buffer size: 128 or 256Code: Generated with CubeMXWhat we do:Call MX_USART2_UART_Init()Immediately call HAL_UARTEx_ReceiveToIdle_DMA() without delayDo not send any UART data to the boardWait...What we expect:The callback HAL_UARTEx_RxEventCallback() should not trigger until at least one byte has been received, followed by line idle.What actually happens:Immediately after startup, without any incoming UART data:The callback fires onceSize == RX_BUFFER_SIZE (e.g., 128 or 256)Additional Observations:The issue doesn't occur at very low system clock frequenciesOn STM32L4 series: it triggers when running on HSI (16 MHz)When using MSI @ 4 MHz, the issue does not occurOn ST
Hello, So I'm tackling a DMX512 project using an STM32G0C1CE with Zephyr OS v4.1.0 and I'm running into a bit of a snag with detecting the BREAK and Mark After Break (MAB) signals to start receiving the DMX slot data via USART. I've already tried a couple of things: Using the framing error detection, but that didn't seem to work out. Since I only have the USART3_RX pin available at PB11, I tried configuring it as a GPIO input to catch the BREAK and MAB using a GPIO interrupt. After detecting them, I switched it back to USART_RX mode. This allowed me to see the BREAK and MAB, but I couldn't reliably grab the subsequent DMX slot data within the USART interrupt. Code: #include <stdio.h> #include <string.h> #include <zephyr/kernel.h> #include <zephyr/device.h> #include <zephyr/devicetree.h> #include <zephyr/sys/util.h> #include <zephyr/sys/printk.h> #include <zephyr/shell/shell.h> #include <zephyr/logging/log.h> #include <ze
Hello,I am interfacing with a sensor via I2C, with my STM32G0 MCU as the master. The sensor (Panasonic SN-GCJA5 air particulate sensor) requires a 500us delay between the I2C address read byte, and the data being read from that register: This is definitely an uncommon requirement, but here we are. To be clear, this is not clock stretching. It appears the device expects a hard coded delay for some kind of internal processes to complete before data is available. I have tried without the delay, and sure enough no data from the sensor is presented. I have found other forum posts that have similar questions, with no answer yet:https://community.st.com/t5/stm32-mcus-products/i2c-delay-between-address-byte-and-first-data-byte-when-reading/m-p/743724#M266420https://community.st.com/t5/stm32-mcus-products/i-want-to-make-a-delay-between-the-slave-address-and-the-data-in/td-p/159249I have gone below the I2C's HAL to see if there are register level manipulations that can make this p
Hello everyone, I’m currently working on developing a USB audio device with multichannel audio functionality using the STM32H7S78-DK in combination with the X-CUBE-AUDIO-KIT. My goal is to use LiveTune to build audio flows and to implement USB Audio Class 2.0, potentially with extended multichannel support. Unfortunately, I haven't been able to get the provided example projects to work correctly on my board. I’ve run into several issues using both STM32CubeIDE and STM32CubeProgrammer, and I’m hoping someone with experience using this specific board or the X-CUBE-AUDIO-KIT can help me move forward. What I’ve tried so far: Flashed the bootloader (X-CUBE-AUDIO-KIT-STM32H7S78-DK-BL.hex) to address 0x08000000 (internal flash) using CubeProgrammer Flashed the LiveTune firmware (X-CUBE-AUDIO-KIT-STM32H7S78-DK-Designer.bin) or other .bin files to 0x90000000 (QSPI flash) Verified that BOOT0 is set to 0 Current status: The board is detected correctly via ST-LINK The boo
The reason is that the update of the HAL library caused the SD card problem, which led to bus_hault after the restart. The SD card will only be restarted when there is a read/write issue. The reset process is deinit followed by init.Later, it was found that DPSM was an unexplainable setting, causing the driver to believe that there was data directly read from the fifo, but the data program was written to DPSM in conjunction with SDMMC_CK.Then I changed the driver code to seem to have solved the problem, and restarted the code by adding abort before deinit and init.1、Why does the SD card often malfunction? Is it caused by the clock waveform? Is this waveform setting incorrect for DPSM?I adjusted the frequency to 4M, but the Voltage overshoot was very large.Yellow represents CK and pink represents 3.3V voltage2、I used a soft restart for the SD card, but it seems to be of no use. Is there a way to solve the problem of the SDMMC getting stuck at a certain state due to being stuck at the DP
Hi I am having problem while including folder path, After including the folder path for my project it is not building.Below I have attached my project, Can anyone help me with this?
Guys, unfortunately I don't know what to do. A few days ago I updated to the latest HAL version for the F4 series (1.8.3). With 1.8.0 there was a big change in the Ethernet driver, so some adjustments were necessary. I already used the low_level_...() functions from ST, which are included in the examples and are also generated by CubeMX.Since the upgrade I always get DMA errors in the function HAL_ETH_Transmit(). More precisely at the following point:/* Wait for data to be transmitted or timeout occurred */ while ((dmatxdesc->DESC0 & ETH_DMATXDESC_OWN) != (uint32_t)RESET) { if ((heth->Instance->DMASR & ETH_DMASR_FBES) ! = (uint32_t)RESET) { heth->ErrorCode |= HAL_ETH_ERROR_DMA; heth->DMAErrorCode = heth->Instance->DMASR; /* Return function status */ return HAL_ERROR; } [..]heth->DMAErrorCode then contains the following value: 0x1886486The strange thing is, simple pings, UDP and TCP echo servers work. However, as soon as the amount of data increase
Example SD Card file write example using Azure RTOS FileX with SDIO is not working for STM32F767ZI Nucleo board. Please let me know how to fix it. I used the Fx_uSD_File_Edit example is used. It is failing in getting the SCR register value on the SD Card. Anyone have any idea on this issue? Am I missing anything? Even the same thing is happening with the project created by myself for STM32F767ZI Nucleo board. What can be the solution?
Hello,I was looking at the UsbX middleware source code and noticed that the memory pools are split in 2. a) non-cached memory poolb) cached memory poolThe STM implementation doesn't seem to use this code and just places everything into the non-cached memory pool.So my questions are:1- has anyone used the split memory pools, and does it actually work? -OR- it doesn't work and that's why it was disabled by ST.2- if it is enabled, how much of a performance boost will it provide? and is it worth the time and effort to split the pools?thanks, Matt
Hello. I'm upgrading from version 1.0.0 to 2.0.0 of the X-CUBE STL for STMF4, but I'm struggling to resolve this warning:Warning: L6775W: stl_sch_main.o(.debug_frame) has FDEs which use CIEs which are not in this section. The warning disappears when turning of debug symbols. I'm using Arm Compiler 6.16.2 with Keil Uvision and an STM32F437. The STL version is V2.0.0 / 19-December-2022The example projects that follow the STL package also have debug symbols enabled and produce the same warning. Is this an issue with how the library has been compiled, or is it possible to resolve this without disabling debug symbols or just suppressing the warning? Any inputs would be greatly appreciated.
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.