Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
I'm trying to transmit a bitmap via USART. The bitmap transmits correctly in HAL. My project is register-based, written from scratch. The issue is that my USART has a speed synchronization problem—meaning:When my C# terminal is set to 57600 BAUD, it reads one byte correctly, but an additional zero byte is received and written to the buffer index.At equal speeds (115200 BAUD) for both the MCU and the terminal, it incorrectly reads the bitmap byte, and still receives an extra empty byte in the buffer.I can't figure out what's wrong. I suspect it might be a misconfigured clock system. My board is Nucleo-F303RE (STM32F3xE). I’d appreciate your help!void USART2_EXTI26_IRQHandler (void) { if(USART2->ISR & USART_ISR_RXNE) { dl_znak[ind++] = USART2->RDR; memcpy(dl_znak+ind,temp,1); if(++ind >=20) ind=0; //USART2->RQR |= USART_RQR_RXFRQ; if (USART2->ISR & USART_ISR_ORE) { USART2->ICR |= USART_ICR_
Hi,I am running a simple TCP server using the lwIP stack and no RTOS. I got help from the "Echo_Server" example offered in most ST eval board packages, everything works fine.I need to accept a single socket connection from the outside and maybe also establish one as a client.I understand that because sockets are sort of blocking, they are often implemented in a multi-thread environment. I am trying to not use any OS. Any type of the F series microC will do.Has anyone ever implemeted lwIP sockets without any OS? Can it be done?Thank you.
Moved from TouchGFX forumGreetings Community, I need advice on data logging multiple ADCs and/or ADC Channels to interface 40+ Train Gauge Values on an MCU that can show data on LCD or transmit Data over USB or serial to a PC.
Hello,I am currently trying to do the following with the System's FBL on the stm32l151zet6:Steps:1.- Send 0x44 0xBB (extended erase)2.- Send the following 2063 Bytes: (send the number of pages to be erased plus the pages in two bytes per page, plus CRC, as mentioned in AN3155) 04 05 00 00 00 01 00 02 00 03 00 04 00 05 00 06 00 07 00 08 00 09 00 0A 00 0B 00 0C 00 0D 00 0E 00 0F 00 10 00 11 00 12 00 13 00 14 00 15 00 16 00 17 00 18 00 19 00 1A 00 1B 00 1C 00 1D 00 1E 00 1F 00 20 00 21 00 22 00 23 00 24 00 25 00 26 00 27 00 28 00 29 00 2A 00 2B 00 2C 00 2D 00 2E 00 2F 00 30 00 31 00 32 00 33 00 34 00 35 00 36 00 37 00 38 00 39 00 3A 00 3B 00 3C 00 3D 00 3E 00 3F 00 40 00 41 00 42 00 43 00 44 00 45 00 46 00 47 00 48 00 49 00 4A 00 4B 00 4C 00 4D 00 4E 00 4F 00 50 00 51 00 52 00 53 00 54 00 55 00 56 00 57 00 58 00 59 00 5A 00 5B 00 5C 00 5D 00 5E 00 5F 00 60 00 61 00 62 00 63 00 64 00 65 00 66 00 67 00 68 00 69 00 6A 00 6B 00 6C 00 6D 00 6E 00 6F 00 70 00 71 00 72 00 73 00 74 00 7
Hi, I have a problem with CMSIS RTOS v1 using STM32F103RET6. I have about 6 - 7 tasks. The first task is the StartDefaultTask, after finishing initializing, when running to osSemaphoreRelease, it gets to configAssert(pxQueue) and loop forever. The semaphore is reference to another task, which the task combines at least two semaphores to work. Can anyone meet this before? Also the task which combines two semaphores work like this, where the callback_timeout is released from the StartDefaultTaskif(osSemaphoreWait(save_data, osWaitForever) == osOK){ if(osSemaphoreWait(callback_timeout,osWaitForever)==osOK){
Hi STM Team, I am using STM32H723ZGT6 Microcontroller for my new project, I am using Azure RTOS for My application.I required to copy my data to Pendrive (I am using USB Host Only Mode and USBX and FileX).As well as i also required to use USB CDC ACM for my other device Virual COM Communication as USB Device mode.When I select USB OTG Dual Role in STM Cube MX, there is no applications and examples given to use dual role as USB Host and Device at same time.Is Any Hardware Changes are required? Now I am using Nucleo-STM32H723Z Development Board for this testing.Can you Help On this.
Hello, I am currently using a STM32l433 with the following configuration: CAN_FilterTypeDef CAN_FilterInitStructure = {0}; CAN_FilterInitStructure.FilterBank = filterNum; CAN_FilterInitStructure.FilterScale = CAN_FILTERSCALE_16BIT; // 11-bits StdId left-aligned on the 32-bits word register CAN_FilterInitStructure.FilterIdHigh = id << 5; CAN_FilterInitStructure.FilterIdLow = 0; CAN_FilterInitStructure.FilterMaskIdHigh = mask << 5; CAN_FilterInitStructure.FilterMaskIdLow = 0; CAN_FilterInitStructure.FilterFIFOAssignment = CAN_FILTER_FIFO0; CAN_FilterInitStructure.FilterMode = CAN_FILTERMODE_IDMASK; It globally works. So if my ID is 0x701 and my mask 0xFFFF, the callback will be called for every message ID 0x701. However, when I change the mask, for exaple to a value like 0x700, in order to only get the '7' from the standard ID, my callback is not called for every message with ID 0x7__.I also notice the that the 16bit filter lenght require the RTR, IDE and E
Hello all,We are currently using the STM32G0B1RE in our design, where both HSE and LSE external oscillators are used. The PLL is configured to multiply the 8 MHz input to 64 MHz. All clock configurations are performed via STM32CubeIDE and HAL, and the system is functioning normally.I intend to implement a Clock Security System (CSS) mechanism to detect oscillator faults. The goal is logging and allow system to switch to an internal oscillator (HSI or LSI) without performing a system reset and resume its working.I’ve configured the HAL_RCC_NMI_IRQHandler() to handle these events, and depending on the source of the failure, either HAL_RCC_CSSCallback() or HAL_RCC_LSECSSCallback() is called.I am testing with shorting oscilators probs. When HSE failure dedected, switching to HSI works fine with callback. However, when an LSE failure occurs, transitioning to LSI requires reset to the backup domain. So, Is it safe to use method I use in my code? If there are better suggestions would be
Thank you very much for your help. However, I still haven't been able to fix this issue — the Linked List mode simply doesn't work in my case.I've searched through many posts but couldn't find any similar problems, and honestly, I'm not sure what to try next.I would really appreciate it if someone from ST could provide some guidance or suggestions.Any help would be highly appreciated!
Hello,I am a beginner trying to create my first STM32 project using the STM32F407G Discovery Board. I am trying to receive audio input through I2S, delay one of the channels, and then output the result to the audio jack. I can get a simple sine wave to play through the headphones, but when I try to use two SPH0645LM4H-B microphones, I only get a beeping noise through the headphones. This even happens when I don't use the delay and simply try to play the microphone input through the headphones. Sometimes making noise near the microphones has an effect on the volume of the noise. I have the microphones connected just like it says to on the datasheet and I have been trying to fix the problem for weeks with no progress. Any help or suggestions would be greatly appreciated, I am coming up on a deadline for the project and I don't know what to do. I've attached the main file and the I2C drivers to this post. Thank you for any help!
Moved to main forum from How to create a file system on a SD card using STM32CubeIDE for better visibility & discussion.Hi @ST AME Support NF ,Is there any guide on using SPI to create a file system on SD card?
Hello, hello.In the STM32CubeH7 Firmware Package V1.12.0 and earlier is a demo applicationunder Projects/STM32H747I-DISCO/Applications/FPU/FPU_Fractal.The app waits in an endless loop in line 252:while(pending_buffer != 0) { } A breakpoint in the callback functionvoid HAL_DSI_EndOfRefreshCallback(DSI_HandleTypeDef *hdsi) { ... }is never reached where pending_buffer should be set to 0.I also flashed CM4 and CM7 code. I did not test every example, some work.Board version is: MB1248-H747I-D03Did anyone try this example?
Hi,I am implementing CDC ACM on STM32C0x series with USBX standalone. I searched for many examples but could not find a single example for USBX standalone for CDC ACM. There are examples with USBX standalone for HID Mouse. Wherever, I find example of USBX for CDC ACM, it is always using ThreadX.Can anyone please point me to example for USBX Standalone for CDC ACM?Thanks,Pradeep
Hello Community;we are trying to integrate INMP441 microphone on Nucleo H755ZI-Q board via I2S2 and USART3 through DMA.I2S2 configuration: Clock configuration: USART3 configuration: Output: We tried to get the audio signals via I2S DMA through ping-pong buffer, the serial monitor output we are getting is just zeros.We have checked the hardware and DCache is disabled. We have attached the project for your reference. Kindly provide us a solution.
I'm trying to test out Full Speed USB Communication with the STM32F407 DISCOVERY board.I'm sending 1 MB of data to the serial port of the computer and receiving them and saving the data using a python script. The speed I'm getting is close to 350 kB/s (~0.34 MB/s), but USB FS theoretical speed is 1.2 MB/s. Is there a way to increase the speed or am I doing something wrong to get such a lower speed?In the clock configuration, HCLK is 168 MHz (max) and PLLQ is set to 7, giving a 48 MHz USB clock.This is the function I'm using to send the data.void send_very_large_data(){uint8_t chunk[64]; // 64-byte chunk (USB FS max packet size)memset(chunk, 'A', sizeof(chunk)); // Fill with 'A' for testinguint32_t totalSize = 1 * 1024 * 1024; // 1MB for testing (change as needed)uint32_t sentBytes = 0;// Loop to send data in 64-byte chunkswhile (sentBytes < totalSize){// Wait for USB to be ready for the next transmissionwhile (CDC_Transmit_FS(chunk, sizeof(chunk)) == USBD_BUSY);sentBytes += siz
I would like to implement a HID composite device (e.g., mouse + keyboard) using USBX on an STM32U5.However, calling ux_device_stack_class_register() twice (once for the mouse and once for the keyboard) returns an error. I assume this is because USBX supports only a single instance of the HID class by default.Our existing product is recognized by the host as a composite HID device (with separate interfaces for mouse and keyboard), and I would like to replicate the same structure.My environment:STM32CubeIDE Version 1.17.0STM32Cube MCU Package for STM32U5 Series 1.7.0Board: NUCLEO-U5A5ZJ-QCreated via:Project Explorer -> New -> STM32 project -> Board Selector -> NUCLEO-U5A5ZJ-Q -> FinishUSBX middleware enabledChecked all HID class options in the middleware configurationIs there a recommended way to create a HID composite device (multiple HID interfaces) with USBX?Should I modify the report descriptor to include multiple Report IDs, or is there a way to register multiple HID
It is really sad that ST decided to not implement this requested and really helpful feature: https://github.com/STMicroelectronics/STM32CubeG4/issues/23Maybe we can change their minds by creating some more attention to this topic here? Leave a comment, when you also find this useful ;)Example solution for the I²C driver by adding a void* to the handle: typedef struct __I2C_HandleTypeDef { /* Rest of struct... */ #if (USE_HAL_CALLBACK_CONTEXT == 1) void *UserContext; #endif /* USE_HAL_CALLBACK_CONTEXT */ } I2C_HandleTypeDef;
1.Details: Board ( NUCLEO-H755ZIQ)IDE/Tools (STM32CubeIDE 1.18.0),(STM32CUBE MX 6.11.0)Middleware/Stack ( NetX Duo, ThreadX) I implemented the Ethernet connection using the Net x duo stack with the board NUCLEO-H755ZI Q Board. Here 2 cores are there M4 and M7. By using LWIP Stack I got the output for the ethernet i.e the board is pinged. Now i implemented with the Net x Duo stack the there are lot of configurations are there for the memory configurations and ethernet i am unable to ping the board. If you already implemented this one provide the step by step configurations for this one.2. And also after establishing the ethernet successfully. I need to implement the HTTP AND HTTPS using the Net x Duo. In the HTTP implementation i need to create the web page by pinging the ip address. According to that if you have any configurations please provide that also. And also for the html page i have an html code for this how to add this html code in to the embedded code and also how to
Hello, I am working on NUCLEO-F070RB board, I have developed the Custom Bootloader Code to test the Bootloader functionality I am using blinky application with HAL_Delay(1000); When I run the blinky application independently the application is working fine. When I remove the HAL_Delay(1000); function and use for(int i = 0; i< 1000000; i++); for the delay, the Bootloader is successfully jumps to application and led starts blinking from above cases I observed that there is issue with HAL_Delay() function with jump from bootloader to application Can you explain what could be the issue and how to resolve it. following is the function to jump from bootloader to application . void Bootloader_JumpToApplication(void) { #if DEBUG_ENABLED UART_Debug_Print("Gonna Jump to Application\n"); #endif void (*app_reset_handler)(void) = (void*)(*((volatile uint32_t*) (APP_START_ADDRESS + 4U))); __disable_irq(); /* Jump to application */ app_reset_handler(); }
I am experimenting FreeRTOS to learn how to use it and CubeIde. Simple stuff right now. I am attempting to implement the runtime stats as described in V10.1 FreeRTOS Reference Manual (p 86) and am having two problems.First, the TaskStatus_t {pxTaskStatusArray[ x ].ulRunTimeCounter ] reurns 0 for ulRunTimeCounter. so the runtime_percent is always zero. I have configGENERATE_RUN_TIME_STATS set to 1 in FreeRTOSConfig.h. Any clarification would be appreciated
Hi everyone, I am using STM32H745BIT6 and programming using W25Q128. I am trying to upload the code but always get an error at the last step.STMicroelectronics ST-LINK GDB server. Version 7.10.0Copyright (c) 2025, STMicroelectronics. All rights reserved.Starting server with the following options:Persistent Mode : DisabledLogging Level : 1Listen Port Number: 61234Status Refresh Delay : 15sVerbose Mode : DisabledSWD Debug : EnabledInitWhile : EnabledWaiting for debugger connection...Debugger connectedWaiting for debugger connection...Debugger connectedWaiting for debugger connectio
It is my understanding from watching this video from ST: https://www.youtube.com/watch?v=Kx7yWVi8kbUThat many STM32 chips come with a built in bootloader in ROM that can be accessed by pulling the BOOT0 pin high. However, I just took a couple of brand new STM32 blue pills out of the package and was not able to see the USB device enumerated, and when I opened STM32 Cube Programmer and select USB, it sees nothing and says "NO DFU DEVICE FOUND" The blue pills are a super basic board and have jumpers to pull BOOT0 and BOOT1 high, so I would think this would work. ST Application Note AN3156 says that the STM32 chip on this board support the DFU built in bootloader, so I'm not sure what's going on here. Anyone have any light to shed on this?
Hi, I'm running the following example project:STM32Cube_FW_F7_V1.17.0\Projects\STM32F769I-Discovery\Applications\mbedTLS\SSL_Clienton the development board STM32F769I-Discovery.Seems like the application uses the .h file STM32Cube_FW_F7_V1.17.0\Middlewares\Third_Party\mbedTLS\include\mbedtls\config.hto configure the embedTLS module.The project also includes this .h file for configuration of mbedTLS:STM32Cube_FW_F7_V1.17.0\Projects\STM32F769I-Discovery\Applications\mbedTLS\SSL_Client\Inc\mbedtls_config.hBut it doesn't seem like it's used, why is that? BRJonas
HI I m implementing a project using H753 to control a DC motor via a H bridge motor driver, which can stop motor by pull high both AN1 and AN2 pins, i m required to brake within 200m sec, can anyone advise how accomplished this?using FreeRTOS task or Semaphore or osDelay(200) ?
Hi! I am looking for help with my own PCB design first running process. I have PCB with STM32F407VG and LAN8742A PHY. I lost the whole day trying to run it without any effect. After powering on, the orange LED is on constantly, and nothing else. I tried it with the program, and the behavior is the same with an erased chip. I have attached schemat parts, clock configuration, and the board state photo.I tried to set multiple clock configurations, but nothing came up. Maybe I need to add some power sequence at the start of the MCU. I tried many configurations of reset line and the same effect, just nothing. I don't have any idea what I should do more.I will be grateful for any help and suggestions! Thank you so much for your attention and participation.
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.