Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hello everyone,This is my first post here, so if there's anything wrong with the way I've formatted or presented it, please feel free to let me know.My current task involves switching from USB HOST to USB CDC. I used CubeMX to generate the necessary USB CDC-related files and integrated them into my original program.On my PC, the program works as expected and is recognized correctly as a COM port.However, on my coworkers' PCs, the device is not recognized as a COM port.Both our PC are win11, and after checking, win11 seems no longer requires the installation of the STM Virtual COM Port driver.Is there anything we can do to further clarify or resolve this issue?
Hello,I am working on an STM32F746 project where I have implemented a bootloader.The setup is as follows:Application image is stored in external QSPI flash.Bootloader copies the image from QSPI to SDRAM (IS42S32400F at 0xC0000000).After copying, I set SCB->VTOR = 0xC0000000 and jump to the application Reset_Handler.The copy is verified: I have cross-checked the SDRAM contents with the QSPI image, and the data is copied correctly.I also created a test application that only sets a GPIO pin high (no SystemInit(), no HAL_Init(), no HAL_RCC_DeInit()).Even in this simple case, after the bootloader jumps to the reset handler, I get this error: Break at address "0x242" with no debug information available, or outside of program code.The Reset_Handler address from the SDRAM vector table is correct (e.g., 0xC00002B5), and VTOR is updated to 0xC0000000.But execution always ends up breaking at 0x242.Has anyone faced this issue when trying to execute code from SDRAM after copying from QSPI?A
Hi,I need to enable wolfSSL to TCP/IP client and server program with LWIP stack without freeRTOS. How it can be done?. Need sample example for the same board.I'm attaching my code for which i need to enable wolfSSL.Thanks in advance.Thanks and Regards,Harshitha R
Hi, I'd like to have some feedback about the use of XCUBE-EEPROM library on STM32H563.Is it functionnal and reliable ? After digging into the code, i have few questions: MPU_init() In the MPU_init() function there's a configuration with no explanation ? /********************************************************************************/ ** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Number = MPU_REGION_NUMBER1; MPU_InitStruct.BaseAddress = 0x08FFF800; MPU_InitStruct.LimitAddress = 0x08FFF80F; MPU_InitStruct.AccessPermission = MPU_REGION_ALL_RO; HAL_MPU_ConfigRegion(&MPU_InitStruct); /********************************************************************************/ num_of_edata_page With the default settings, in the OB_init() function according to me there's a problem with the computation of num_of_edata_page. Indeed in the code below, after each reset the HAL_FLASHEx_OBProgram() is always called. /*
There's a serious bug in G4's hal(version 1.6.1) library in spi dma function.The problem is:1, user calls HAL_SPI_TransmitReceive_DMA2, after spi transmission finished, HAL will call HAL_SPI_TxRxCpltCallback3, user calls HAL_SPI_Receive_DMA inside HAL_SPI_TxRxCpltCallback, and will fail in a chance.The reason is:1, HAL_SPI_TransmitReceive_DMA will start both Rx and Tx dma, and after transmission complete, HAL_DMA_IRQHandler will be triggered to set dma handler's state to ready and unlock dma handler;2, If Rx dma complete first and trigger HAL_SPI_TxRxCpltCallback, user calls HAL_SPI_Receive_DMA in the callback, don't know why HAL will still start Tx dma which is still locked, that cause function to fail.3, if Tx dma complete first, the scenario above will be fine. Unfortunately, these 2 simultaneously started dma(Rx & Tx) seem to complete in a random sequence (most of time Tx dma complete first) in my observation, in a rare case Rx dma will complete fi
Hello,I am planning to build a cellular application using EC200 as my modem. I prefer to use in modem stack using AT commands due to memory constraint of my MCU. I have come across X Cube Cellular where it is mentioned this setting can be changed using compilation flag as per the release notes. Kindly guide me to achieve this. Thank you. Regards.
Hi, It works, apparently a different microSd card works. however, it is strange that, DATALOG2 could write into the card. May i know how shall i perform sd card format function or what to fill up in the function? Follow-up of the the topic below: Solved: Re: Standalone FileX SDIO SD Card Initializing err... - STMicroelectronics Community
There is no test.txt file in my USB drive after the example is run.The board sends this log**** USB OTG HS Dual_Class Host **** USB Host library started. Starting Application Connect your HID or MSC Device USB Device Enumeration FailureTried to attach the USB drive to both USB connectors.The last message is sent about 1.5s after the previous ones.Where can be an issue?
Hello, I'm currently testing a bootloader-XIP application architecture on a NUCLEO-H7S3L8 board. The MRAM (XSPI2) test works perfectly in the bootloader, but when I move the same code to the XIP application, the system hangs during XSPI2 initialization. I would appreciate any advice on this issue. System Environment MCU: STM32H7S3L8 Board: NUCLEO-H7S3L8 IDE: STM32CubeIDE v1.19.0 Firmware: STM32Cube_FW_H7RS_V1.2.0 Project Goal and Progress I have successfully completed all communication mode tests for the MRAM (XSPI2) in the bootloader (exercise_Boot). The bootloader runs from internal flash, and through mram_spi_test.c, it has fully tested the MRAM connected to XSPI2 in all SDR/DDR and SPI/DSPI/QSPI modes, confirming perfect operation. I have migrated the verified test code to the XIP application (exercise_Appli). The bootloader loads the application to the external NOR flash (connected to XSPI1) and jumps to it in XIP mode. I have successfully confirmed that the
Hi,Can someone help me how to use MbedTLS to my TCP Client Example. I haven't worked before . please tell me step by step. How can I proceed.I'm attaching the source code for the reference. Thanks,Harshitha R
Hi everyone,I am trying to generate sinewave using PWM mode of microcontroller.I am using Discovery Board having STM32F407 microcontroller. System clock and Timer clock are of 8MhzI am using two timers Timer1 for High Frequency switching (500Hz) and Timer2 for Low Frequency switching (50Hz).waveforms I am getting are OK but there is one issue, after every 7 cycles I am getting an extra PWM sample in my output.I don't know why it is so. I am attaching image of the output and code. may be there is a minor mistake which I am doing but not sure. can you guys let me know if there is an issue uint16_t sineTable[SINE_TABLE_SIZE] = {400,635,780,780,635,400,165,20,20,165}; // Initializing Timer1 void MX_TIM1_Init(void) { TIM_ClockConfigTypeDef sClockSourceConfig = {0}; TIM_OC_InitTypeDef sConfigOC = {0}; TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0}; htim1.Instance = TIM1; htim1.Init.Prescaler = PRESCALER_REQUIRED; htim1.Init.CounterMode = TIM_COUNTERMODE_UP; htim
The Cube-AZRTOS bundles cmsis_os2.c implementation has potential NULL pointer dereferences. There are many lines of the form:if (( attr->cm_mem == NULL) || (attr == NULL))in code that attempts to recover and de-allocate memory from a "create" call that failed. The order of comparisons should be reversed:if ((attr == NULL) || (attr->cb_mem == NULL))This happens for different structure members, not just the cb_mem.I've checked the F4 version 1.1 ZIP file and github repo, as well as the github H7 repo and they both have this issue. I suspect all versions do.
Hi, I using STM32H745I-Disco board and trying to do intercomunication using OpenAMP. But my generated code is compile sucessfully but it not working in coreM4 it stucking in the below function /* create a endpoint for rmpsg communication */ int32_t status = OPENAMP_create_endpoint(&rp_endpoint, RPMSG_CORE_M4_NAME, RPMSG_ADDR_ANY, rpmsg_recv_callback, NULL); if (status < 0) { Error_Handler(); } I have tried the example code Openamp_ping_pong example for STM32745I-Disco board, which is Working fine. But my generated code is not working. I have go through the already mention same issues in ST forum which link given belowhttps://community.st.com/t5/stm32cubemx-mcus/openamp-issue-on-stm32h745/m-p/794133?search-action-id=67994286745&search-result-uid=794133 and I have go through the OpenAMP document also which link mention below https://www.st.com/resource/en/application_note/an5617-stm32h745755-and-stm32h747757-lines-interprocessor-communications-stmicroelect
Hi,We are currently using STM32H7S7 MCU with display and similar USB C circuit from the developer board.I wanted to connect a Web camera and to be able to display video from the screen.I wanted some help and guidance on where to find the driver?does ST have any driver I can use for getting the USB web camera data. Thanks
Hello @D.Botelho @mƎALLEm I had an issue of ThreadX and FDCAN transmit as below. I use the stm32g474 and config a threadx and fdcan with stm32cubemx, so far it works well. but when i add some fdcan transmit code, it comes strangely. the code as below void appThread2(ULONG thread_input) { while(1) { if(fdcan1_RXFlag == 1) { fdcan1_RXFlag = 0; // Clear the receive flag for(int i = 0; i < 8; i++) { fdcan1TxData[i] = fdcan1RxData[i]+1; // Copy received data to transmit buffer } my_FDCAN1_Transmit(fdcan1TxData); // Echo back the received data printf("FDCAN1 Received data: "); for (int i = 0; i < 8; i++) { printf("%02X ", fdcan1RxData[i]); } printf("\r\n"); } // // 发送 0x12 fdcan1TxHeader.Identifier=0x012; fdcan1TxData[0] = (dis_sensor_data1.dis1 >> 0) & 0xff; fdcan1TxData[1] = (dis_sensor_data1.dis1 >> 8) & 0xff; fdcan1TxData[2] = (dis_sensor_data1.dis2 >> 0) & 0xff; fdcan1TxData[3] = (dis_sensor_data1.dis2 >>
Hello everyone,I am working on a custom board with STM32H723VGT6 and LAN8742A but after much troubleshooting, pinging has remained unsuccessful. I am trying to use LwIP without RTOS. I have a NUCLEO-H723ZG that I have been able to successfully ping without RTOS, but when I use the same CubeMX configurations (except the RMII pinout) on my custom board, it does not work. I tried to very closely follow the Ethernet schematic for the NUCLEO-H723ZG, the only main changes I made were the pinout (since I am using VG instead of ZG) and using two ESD protection diodes instead of one for ease of routing. The RMII pinout follows what is presented in CubeMX. Here are the following code modifications I have made, based on the H723ZG example in this repo https://github.com/stm32-hotspot/STM32H7-LwIP-Examples.git:Added to STM32H723VGTX_FLASH.ld: .lwip_sec (NOLOAD) : { . = ABSOLUTE(0x30000000); *(.RxDecripSection) . = ABSOLUTE(0x30000100); *(.TxDecripSection) } >RAM_D2 /*
Hello,On the STM32N6, I am using DCMIPP_PIXEL_PACKER_FORMAT_YUV422_1.I am seeing the correct coloring when using CMW_MIRRORFLIP_NONE and the incorrect coloring when setting CMW_MIRRORFLIP_FLIP. Any help getting the correct DCMIPP_ColorConversionConfTypeDef color_conf for the CMW_MIRRORFLIP_FLIP ? ... if (HAL_DCMIPP_PIPE_EnableRedBlueSwap(&hcamera_dcmipp, DCMIPP_PIPE1) != HAL_OK) { Error_Handler(); } #define N10(val) (((val) ^ 0x7FF) + 1) DCMIPP_ColorConversionConfTypeDef color_conf = { .ClampOutputSamples = ENABLE, .OutputSamplesType = DCMIPP_CLAMP_YUV, .RR = N10(26), .RG = N10(87), .RB = 112, .RA = 128, .GR = 47, .GG = 157, .GB = 16, .GA = 16, .BR = 112, .BG = N10(102), .BB = N10(10), .BA = 128, }; if (HAL_DCMIPP_PIPE_SetYUVConversionConfig(&hcamera_dcmipp, DCMIPP_PIPE1, &color_conf) != HAL_OK) { Error_Handler(); } if (HAL_DCMIPP_PIPE_EnableYUVConversion(&hcamera_dcmipp, DCMIPP_PIPE1) != HAL_OK) { Error_H
I just had a quick question to clarify my understanding of how byte allocation works for thread stacks in the ThreadX RTOS. I've seen the official examples use a byte pool and then allocate bytes from that pool before creating a new thread. However, in other places I've seen something as follows where the bytes are allocated statically: /* Private variables ---------------------------------------------------------*/ uint8_t thread_stack[TX_THREAD_STACK_SIZE]; TX_THREAD thread; /* Private function prototypes -----------------------------------------------*/ VOID thread_entry(ULONG thread_input); /** * @brief Application ThreadX Initialization. * memory_ptr: memory pointer * @retval int */ UINT App_ThreadX_Init(VOID *memory_ptr) { UINT ret = TX_SUCCESS; TX_BYTE_POOL *byte_pool = (TX_BYTE_POOL*)memory_ptr; (void)byte_pool; tx_thread_create(&thread, "thread", thread_entry, 0, thread_stack, TX_THREAD_STACK_SIZE, 15, 15, TX_NO_TIME_SLICE, TX_AUTO_START); return ret
Hi, I have been working with a STM32U575 MCU and something strange has happened that I spent a lot of time trying to find the root cause for it and I am not able to understand what is wrong. I work with I2C slave interrupts and have FreeRTOS running. I realized FreeRTOS gets stuck in checking priorities when a FromISR function is called from the I2C handler. Long story short, checking all the configs many times, I checked what are the priority of the IRQs? HAL_NVIC_SetPriority(I2C1_EV_IRQn, NVIC_IRQ_PRIOR_I2C_SLAVE_EV, NVIC_IRQ_SUB_PRIOR_I2C_SLAVE_EV); HAL_NVIC_SetPriority(I2C1_ER_IRQn, NVIC_IRQ_PRIOR_I2C_SLAVE_ER, NVIC_IRQ_SUB_PRIOR_I2C_SLAVE_ER); HAL_NVIC_EnableIRQ(I2C1_EV_IRQn); HAL_NVIC_EnableIRQ(I2C1_ER_IRQn); PRINT("I2C1_EV raw priority: %lu\n", NVIC_GetPriority(I2C1_EV_IRQn)); PRINT("I2C1_ER raw priority: %lu\n", NVIC_GetPriority(I2C1_ER_IRQn)); PRINT("__NVIC_PRIO_BITS = %d\n", __NVIC_PRIO_BITS); PRINT("configPRIO_BITS = %d", configPRIO_BITS); having
Hi, I'm running a (custom) board that makes use of an STM32H723VET and a LAN8742. A project is set up in CubeMX that makes use of lwIP together with this LAN-chip (there is an issue in CubeMX which deselects the LAN8742 on loading the CubeMX file, but this is something I have already catched). lwIP is configured to make use of a static IP. Now when I run my code in CubeIDE, I can see the interface is set up properly and it detects a 100 MBit duplex connection. Unfortunately that's all what works. In call of netif_set_link_up(), an ARP-request is tried to be transmitted. Some layers deeper, within the HAL-functions, this ARP-request can not be sent. Function HAL_ETH_Transmit() ends up in an timeout while waiting for these ARP-data being transmitted. That lets me assume, something wents wrong with the hardware initialisation. However, functions HAL_ETH_Init() and LAN8742_Init() go through without any error and function LAN8742_GetLinkState() returns a proper link state&nbs
Hello, I am starting a timer interrupt to send data over can data at 50 ms below is the configuration for the same and callback function when pulse is complete volatile uint8_t send_ch0_flag = 0; volatile uint8_t send_chx_flag = 0; volatile uint8_t send_relay_flag = 0; void MX_TIM2_Init(void) { TIM_ClockConfigTypeDef sClockSourceConfig = {0}; TIM_MasterConfigTypeDef sMasterConfig = {0}; htim2.Instance = TIM2; htim2.Init.Prescaler = 3999; // 80 MHz / (3999+1) = 20 kHz htim2.Init.CounterMode = TIM_COUNTERMODE_UP; htim2.Init.Period = 999; // (999+1) / 20kHz = 0.05 s = 50 ms htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; __HAL_RCC_TIM2_CLK_ENABLE(); if (HAL_TIM_Base_Init(&htim2) != HAL_OK) { Error_Handler(); } sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL; if (HAL_TIM_ConfigClockSource(&htim2, &sClockSourceConfig) != HAL_OK) { Error_Handler(); } sMa
I'm trying to go about creating a USB Audio interface on a NUCLEO-H7S3L8, receiving USB audio and forwarding it to the SAI, in order to send to an external DAC.Among other tests, I went back to checking when the functions in usbd_audio_if.c get called, to set up transfers of the packets received.And while in a previous version of the same project, on audio playback on the host, AUDIO_AudioCmd_HS() was called, allowing me to continue handling data accordingly, after a Cube MX update (6.14->6.15) and some changes on DMA (to get circular -> non-circular) and SAI (Output Drive enabled) settings, it no longer gets called on playback (a breakpoint within it never gets reached).Following the IRQ handler function for USB on either playback or idle, it only ends up within the code block for handling an incomplete "ISO OUT Interrupt", reaching the "__HAL_PCD_CLEAR_FLAG(hpcd, USB_OTG_GINTSTS_PXFR_INCOMPISOOUT)" macro.Since the changes I've made ever since it was functional seem mostly
Hello everyone, I need to install the firmware support package for STM32H7 series offline. On the website (STM32CubeH7 | Product - STMicroelectronics), I found both the "STM32Cube MCU Package for STM32H7 series" and the "Patch for STM32CubeH7". What is the difference between them ?
Hi, I'm facing issues while trying to interface a 32GB SD card with the STM32H753ZIT6 development board using SDMMC1 and FatFS. Below are the key problems observed:SD Initialization Fails:HAL_SD_Init() consistently returns HAL_ERROR (Status: 1).Card Not Ready:The card state remains 0, indicating that it is not ready or not properly initialized.Incorrect Card Capacity Reported:Despite using a 32GB SD card, the detected capacity is only about 1.8GB (1806848 KB).This suggests the card isn't being properly initialized or detected, and capacity detection is failing. Looking for help identifying the root cause—whether it's clock config, pin setup, timing issues, or something else.I have attached the code and output file.Pin connection between SD card to STM32:-------------------------------------------------------------DAT0 -> PC8DAT1 -> PC9DAT2 -> PC10DAT2 -> PC11CLK &n
I'm developing a project using an STM32 Nucleo board. At the core of this project is a UART-based communication protocol running in interrupt (IT) mode — not polling or DMA. This protocol is responsible for controlling multiple subsystems such as a relay module and a fan speed controller.However, most of these subsystem modules were previously written in polling mode.My question is:Can I integrate these polling-based modules into my current UART IT-mode communication system without causing issues? Or should I consider converting them to interrupt or DMA mode to prevent CPU blocking or communication delays?Additionally:What should I watch out for to ensure the CPU doesn't get blocked and UART interrupts don't get delayed in this mixed-mode setup?Extra context:There are 20 NTC temperature sensors in the system, and temperature from all of them is read once every second using ADC. The highest temperature value is selected and stored in a variable. Based on this value, the fan speed is adj
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.