Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Using Zephyr 4.1.99 and the STM32H735G-DK (Zephyr calls it stm32h735g_disco) results in a build failure. Has anyone else seen this or have a solution for it? (.venv) grunzasr@zephDev:~/zephyrApps$ west build -p -d H735_build -b stm32h735g_disco /home/grunzasr/zephyrproject/zephyr/samples/modules/lvgl/demos-- west build: making build dir /home/grunzasr/zephyrApps/H735_build pristine-- west build: generating a build systemLoading Zephyr default modules (Zephyr base).-- Application: /home/grunzasr/zephyrproject/zephyr/samples/modules/lvgl/demos-- CMake version: 3.25.1-- Found Python3: /home/grunzasr/zephyrproject/.venv/bin/python3 (found suitable version "3.11.2", minimum required is "3.10") found components: Interpreter-- Cache files will be written to: /home/grunzasr/.cache/zephyr-- Zephyr version: 4.1.99 (/home/grunzasr/zephyrproject/zephyr)-- Found west (found suitable version "1.3.0", minimum required is "0.14.0")-- Board: stm32h735g_disco, qualifiers: stm32h73
Hello,I’m working on an embedded project using ThreadX, and I’ve encountered what appears to be a queue memory overflow issue.I’ve created two queues: one for data messages and one for events. Both are configured to hold 100 messages of the following structure:typedef struct { ENGINE_ID origin; ENGINE_ID destination; EVENTS objectEvent; CMDVALUES command; } INTERNAL_QUEUE_OBJECT;All fields are enums or uint32_t values (implicitly 4 bytes each), so the structure size is 16 bytes. However, the compiler optimise it to 4 bytes total.here, I have the queue configuration (everything align with ULONGS):#define QUEUE_SIZE 100 #define QUEUE_MESSAGE_SIZE sizeof(INTERNAL_QUEUE_OBJECT) #define QUEUE_MESSAGE_SIZE_ULONGS ((QUEUE_MESSAGE_SIZE + sizeof(ULONG) - 1) / sizeof(ULONG)) TX_QUEUE dataQueueHandle = {0}; TX_QUEUE eventQueueHandle = {0}; ULONG dataQueueBuffer[QUEUE_SIZE * QUEUE_MESSAGE_SIZE_ULONGS]; ULONG eventQueueBuffer[QUEUE_SIZE * QUEUE_MESSAGE_SIZE_ULONGS]; tx_queue_create(&data
Hi,I am trying to setup an USB HS CDC example with NUCLEO-H7S3L8.After setting up the projects for both CDC_Standalone and NUCLEO-H7S3L8 board example (for the latter I manually enabled the USB HS Device from CubeMX), I successfully ran each example to run from the external OSPI memory connected to the XSPI2 port.STM32CubeMX standalone version is 6.13.0, while STM32CubeIDE version is 1.17.0.STM32H7RS package version is the STM32Cube_FW_H7RS_V1.1.0.1) I understand that setting up the CDC_Standalone example should result in a working example, but it does not.2) The USPD interface is an TCPP03-M20, the BSP included in the board example (not the CDC_Standalone example) comes with a driver for this device which I understand it is automatically used by quickly looking at the code, but it seems it is not working neither."Not working" means that the USB device is not detected from the PC.So for both cases, the function USBPD_DPM_Run() called into the main while loop hangs the execution of
Dear All,I am interfacing my STM32U5G9 device with VS1011 audio decoder, over SPI using DMA.My setup mostly works, I can configure the decoder send and receive data from the chip.But over a long period of time (hours of having the device running) I am no longer able to send data and I see that my SPI peripheral is effectively in a stuck state. The registers of the SPI and the DMA in that state are shown below and they are not changing over a reasonable amount of time:SPI1 peripheral configuration:and the SPI registers when the peripheral is stuck:DMA configuration:and the DMA registers when the device is stuck:From what I gather from the manual, at this stage the peripheral has 2 packets that it's supposed to send (DMA CBR1 register) and there is nothing happening based on the CSR register, is this correct?Is there a specific issue revealed by the values of the registers?Is there something that can be done configuration wise to avoid this issue?Is there anything that can be done at run
I've inherited some code, the original owner is long gone, and I'm trying to understand his code which has ZERO comments (I'm sure I'm not the only person who's been in this position)It's using the STM32H747IGT6 so it's dual core, got one M4 and one M7 core. They are using SRAM2 to communicate, but he's got it set up so the M4 (which is generating the data) writes a single uint32 of data into one location in SRAM2 and then triggers the MDMA to move it to another location in SRAM2 where the M7 can pick it up.I haven't worked with a dual-core STM32 before, but this feels like overkill. If both cores can read & write SRAM2, why bother with the MDMA? Why not just have the M4 write the data directly to where the M7 will be looking for it and skip the MDMA completely?And why is he setting the destination bus to AXI (and leaving the source bus at is default of AXI) when the system architecture diagram shows SRAM2 as being in the AHB bus matrix? I'm thinking th
I want to know what the C library in the GCC toolchain used by STM32 MCUs
I'm a starter in embeded systems and my teacher told me to write a code for this stm32 and add a button to in on breadboard then it needs to toggle with it ( one push on button turn on the light r5 or pc13 and another push to same button turns off the same led ) I'm sure its a easy task to do but as a person don't knows anything about writing a code or work with embeded systems i couldn't find it anywhere i hope someone can help me with that (also i bought a udemy course too but it starts all started its good to learn but i need to do this in hurry. I've been working on it like 2 or 3 days and how fast im complete how good its going) Thanks All Of You !!!
Hello, the problem here is that SPI works :) I am successfully using SPI on my STM32H743 MCU for many years now.Now I encountered the problem with the same code, the same configuration of SPI but the difference is that the slave SPI chip is not there ( a new module with the same chip is not yet assembled). I am running the same code to debug something else , yet this SPI communication returns HAL_OK ! No timeout!I never had this before ('cause I always had my slave chip connected) . The HAL_SPI_TransmitReceive() function of SPI library still returns HAL_OK :)Here is a fragment of my code (SPI configured duplex master, data 16-bit, FIFO =1, speed 1.875 MBits/s, software driving CS) :Spi4NSSEn; // chip select enabled// addr_cmd[] provides 2 addresses for 2 channels of ADC converter// pots_bin is a buffer for the ADC result in 0-256 range of POT sweepif(HAL_SPI_TransmitReceive(&pots_hspi, (uint8_t *)addr_cmd, (uint8_t *)pots_bin, 2, 5000) != HAL_OK ) // transmit and receive 2 dat
I am building MCUboot using Zephyr for some of the STM32 MCUs like `stm32f769i_disco`. MCUboot using zephyr client tested and working fine with the board `stm32f769i_disco`. Now I am trying to use that MCUboot with the User application I have written in STM32CubeIDE but the application hangs or nothing happens. The Bootloader output looks fine, but nothing prints from the application. What configuration steps am I missing on user application side or MCUboot side?Using the standard addresses:MCUboot: 0x08000000User Application: 0x08040000VECT_TAB_OFFSET: 0x40000I have attached my user application project as a zip file. *** Booting MCUboot xxxxxxxxxxxx *** *** Using Zephyr OS build *** I: Starting secure bootloader I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3 I: Scratch: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3 I: Boot source: primary slot I: Image index: 0, Swap type: none I: Validating primary image... I: bootutil_img_validate
Hello community,I'm facing a UART communication issue with my STM32F042K6T6 board and would appreciate any insights. Here are the details:Hardware Setup:MCU: STM32F042K6T6Peripheral: STPM3x Energy Metering ICConnection: 9600 baud, 8N1, no flow controlVoltage levels: 3.3V on both sidesThe Problem:My STM32 fails to properly receive data from the STPM3xHowever, when I check with a logic analyzer, I can see the STPM3x is transmitting valid data packetsThe STM32 misses packets entirely even max delay provided.Tried interfacing ESP32 → STPM3x works very fine.What I've Verified:Signal Integrity:Clean waveforms visible on logic analyzerProper baud rate (9600) confirmedCorrect parity and stop bitsBasic Tests:Loopback test (TX→RX) also not working properly as only the first byte is received others omitted.Different baud rates yield same issueTried multiple GPIO pins NOTE : The stpm3x.h & stpm3x.c library is ported manually from CPP. I also attached the original CPP files for the referen
Hi!I've been trying to insert FatFs in my IAR proyect for using a uSD for a while but it doesn't work.I tried by downloading FatFs from the Internet, but also creating a STM32Cube project for another board and putting it on mine, but when I rebuild all, there are many errors.I don't know if I have to activate something that I'm not minding or if there is something in those scripts I need to change before it compile. Could you please help me?
Hello,do you plan to release newer version of Eclipse ThreadX X-Cube packages?We are using x-cube-azrtos-f7 1.1.0 which contains ThreadX V6.1.10 which is outdated and insecure.Even remote code execution is possible: https://github.com/eclipse-threadx/netxduo/security/advisories/GHSA-m2rx-243p-9w64 and eclipse foundation only provides security support for ThreadX v6.4.x.SincerelyMo
I want to display "Hello, world" on the onboard screen of my STM32F429I-discovery board. Searching around the internet showed that the BSP has a library called "stm32f429i_discovery_lcd.h" that suits this purpose. Simply including the library with#include "stm32f429i_discovery_lcd.h"yielded build errors, because the compiler could not find the library file. In addition, even after adding the file location to my project's include path, I got warnings stating that "static SDRAM_HandleTypeDef SdramHandle" is not defined, which suggested to me that some associated source files might not be included in the build.After a long time I finally just decided to include the BSP/Components directory and the BSP/STM32F429I-Discovery directory to my project, add the include paths, and add the two folders to the source location.With this code, I had hoped that the screen would turn red, but unfortunately, it does literally nothing:#include "main.h" /* Private includes ---------------------------
hi ,i enable tamper4 and RTC in stm32mx and only enable bit RTC_CR_TAMPTS, TSE=0no other code add into rtc.c or tamper.c Using debug mode to clear TSF and CTAMP4F.when push button will happen hard fault. Only two code in main while loop "led" and "hal_delay", if i remove HAL_Delay , will not happen . someone can help me?HAL_Delay(1000);HAL_GPIO_TogglePin(GPIOA,GPIO_PIN_11);
Hello,I am utilizing the following components:Nucleo-H723ZH (STM32H723)eMMC: 4GBI have already created the following files:user_discio.cuser_discio.heMMC_Driver.ceMMC_Driver.hAfter connecting an SD card reader to the CN8 connector on the Nucleo STM32H723 board and using an eMMC card reader, the FATFs system is reporting that the eMMC is not ready. I am encountering problems when performing operations like f_mkfs or f_mount, receiving a "Not ready" error. Despite numerous checks of the configurations and parameters, I have not been able to resolve this issue.
I am currently trying to use the LCD screen of the STM32N6570DK development board. But when I integrate the relevant information from the official firmware package into my project and try to use CUBEIDE for DEBUG, an error message will appear like this:But this problem doesn't always arise, and for such a main function:When I ran the "UTIL_LCD_SetFuncDriver() "function, the LCD backlight screen seemed to have some reaction, but it couldn't perform the setbackcolorr or clear functions properly. My screen remained dark.Is it because my configuration is incompatible with the relevant BSP firmware library, as the corresponding CUBEMX configuration is not provided in the firmware package? These are all my files, I have tried my best to make everything in order but in vain:
I have tried the BSP example from the STM32CubeN6 package, and the LCD works correctly. However, I am trying to create the smallest possible code to make the screen work, and I started a project from scratch using STM32CubeMX and STM32CubeIDE.What I did was to enable the minimum amount of peripherals to make LCD work in CubeMX, and the code generator added the necessary HAL files, etc..Then I added the discovery_lcd BSP for this board among other needed files like stm32_lcd and the fonts...The code compiles, and the LED1 and LED2 blink as part of the while loop I coded.However, the LCD is blank (but I can see that is active because the backlight is on). I am expecting to see a white background with some text.You can find my code here: https://github.com/jpcano/STM32N6-digits/tree/lcd Do you have any ideas?
Hey , New to STM32 HereI was learning about the different DMA modes, and I came across a study case that compares the time taken by each mode in a DMA memory-to-memory transfer (from Flash to SRAM). Here's the comparison below:I'm using a Nucleo-F401, and I wrote a simple code to measure the transfer time using a timer, like this:I was surprised that the results were not as expected — for example, DMA MEM2MEM transfers with word alignment took longer than those with byte alignment. Can someone please explain because this is so confusing
Hi. I have a board with STM32G0 that I want to wake up from STOP mode via external signals. And so I used 16 interrupts from GPIO and they work correctly. However, I need one more external input for waking up. Specifically, I have a PA15 pin that has an external pull-up, and the signal that is supposed to wake up pulls this pin to GND. PA15 has AF: TIM2_CH1 and TIM2_ETR. I tried to use ETR, but I don't have the option to select the edge and I don't know why CubeIDE sets this pin as push-pull. Generally, I tried several modes/configs and none of them wakes up the processor, or even jumps to the interrupt from TIM2. Can you suggest something? Example? Tutorial? Because when I search for similar threads, I still come across cyclic timer wake-up every x seconds, and I need to wake up the timer the same way as with EXTI. If its impossible, i eventually can change pin and use UART to wake up (if it will work :)), but i think it should be possible using timer. Thanks in advance.
Hello Team,I have configured the lwip middleware but unable to ping with my laptop and when I connect ethernet cable from laptop to the stm32f769 controller I am getting pbuf error (Assertion "pbuf_free: p->ref > 0").Is there any need to configure MPU, if so also please let me know how to select base address..please find the attached screenshots.could you please help me in configuration when freertos is enabled. Thanksvamshi kumar
Hi all, I had created an example project Tx_Thread_Creation for NUCLEO-F767ZI board and enabled Threadx.I had also enabled the USART 2 peripheral and also enabled the USART driver under HAL Drivers under the software packages, but the USART Driver files are not added to the "Drivers/STM32F7xx_HAL_Driver/" folder. Attached the project for your reference as a zip file.Please check it once and let me know how to fix the issue. Thanks,
Hi,I don't understand the behavior of EOC bit of ADC_ISR register at the end of conversion process.My micro code is STM32H563VGT6.I start from example "ADC_SingleConversion_TriggerSW_Init".As the example I have to convert a single channel, single conversion mode.This the problem:after I start the conversion, the bit EOC and EOS go high togheter. But EOC then goes low, with no reset by software and any read of the register ADC_DR.The DMA is not active.Then when I loop with this condition:while ( ! LL_ADC_IsActiveFlag_EOC() )I stuck in the loop.Why this behavior?Thank you.
Hi,I'm using STM32H755 nucleo board. I'm having freertos + LWIP on M7 core and bare metal on M4. I'm using TCP command to start some real time test on core M4. I'm using shared memory to trigger test and also transmitting some data back to M7 core. I'm having occasional problem. I am getting hardfault on M7 core. I'm looking fault analyzer with following results:I'm not sure how I can find root cause for the problem? It seems that something goes wrong with tcpip_thread.
I am working on a project with a STM32H573, using the external tamper lines. CubeMX version 6.14.1.For configuring certain IN/OUT pins for the TAMP peripheral, RM0481 says that bits in the TAMP_OR register must be set:However, these bits are not set correctly in the initialisation code. Indeed, it seems that there is no mechanism in any functions in stm32h5xx_hal_rtc_ex.c to set TAMP->OR, and no relevant flags in RTC_ATampInputTypeDef or RTC_ActiveTampersTypeDef.There is obviously an easy workaround of setting the bits manually at initialisation.
Split from What RTOS is used on STM32F429i eval board GUI Demo?Thank you !I have saved the github page. Will try the examples there.Does the STM32429I eval board come with FreeRTOS installed ?
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.