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
Hello,I am using an STM32F777 with FreeRTOS and LwIP. A web server is running in a task, which has been working so far.Now I have updated to the CubeF7 firmware package 1.17.3 and migrated the firmware. Now there are build errors. In STM32CubeMX, the LWIP_SOCKET entry is disabled. It can no longer be activated because, as I have discovered, the entry NO_SYS=OS Not Used is set, even though I am using FreeRTOS. This was activated previously with CubeF7 firmware 1.17.2. However, I can no longer activate it.How can I switch LwIP to OS and activate sockets?I would appreciate some help.
Hello Folks I'm looking for suggestions / hints on what's the best way to troubleshoot a strange problem we're experiencing.We're running AzureRTOS/ThreadX + NetxDuo (Version 6.1.0) where we have a MQTT Client subscribing to a broker, waiting for a message and then reply back.As Phy, we're using LAN8742A. The problem we're experiencing is that while the application (based on pc) is flooding of messages the STM32F4 board, then it suddenly stuck somewhere on NetX side. The other part of application is correctly running, and in order to troubleshoot better the issue we're experiencing (which is highly replicable) we have: Increased the ip packet pool Increased the RX descriptors Disabled all the other task , just leave NetX ip instance and the task running the mqtt client(wait for message and then reply with a static message saying "Hello"). Force speed from 100MBit down to 10Mbit. None of the previous tries give us a clue on what's happening. The only thing we've noticed is that
I am reposting this issue because, while debugging, I've determined that the root cause is related to the Erase operation, not the reboot, as I had initially thought in my previous post. Previous post: https://community.st.com/t5/stm32-mcus-products/stm32h7-qspi-flash-incorrect-data-after-reboot-initial-write/m-p/830635#M284116 Board: STM32H747I-DISCODevelopment Environment: STM32CubeIDE 1.19.0Library: https://github.com/STMicroelectronics/stm32-mt25ql512abb My code executes in the following sequence:1. Initialize QSPI and the MT25QL512ABB flash memory.2. Erase a 4K block starting from address 0x0.3. Write 256 bytes (aTxBuffer) to address 0x0.4. Read back the 256 bytes from address 0x0 into aRxBuffer.5. Compare aTxBuffer and aRxBuffer.6. Erase a next 4K block starting from address 0x1000 (4096).7. Read the 256 bytes from address 0x0 again into aRxBuffer.8. Compare aTxBuffer and aRxBuffer. My expectation is that the erase operation in step 6, which targets the 4K blo
After updating the i2c library to the latest version, I got a write error. After reverting the library to the previous version, the error went away and the location where the error was returned is:stm32f3xx_hal_i2c.c / I2C_IsErrorOccurred()Line 7255It looks like there's probably something wrong with the acknowledge polling process to know when the write cycle is finished. CubeMX V6.13.0MCU Package STM32F3 Series V1.11.5STM32F334K6TxI2C EEPROM: AT24C16D
Dear ST Community,I'm trying to integrate I3C with DMA capability in my project (NUCLEO-H563ZI). Currently, I can run SPI/UART with DMA enabled, but I3C does not want to join the club (it works with IT, though).After I configure DMA for I3C in the STM32CubeMX interface (GPDMA1):RX CH2:TX CH3:And replace data transfer line:HAL_I3C_Ctrl_Transmit_ITtoHAL_I3C_Ctrl_Transmit_DMAI face issues with the later function. Particularly, it fails confirming the existence of the hdmacr handle:/* Check on hdmatx and hdmacr handle */ else if ((hi3c->hdmatx == NULL) || (hi3c->hdmacr == NULL))But I'm not sure what that means. The DMA handle from the DMA configuration tab is the same for both SPI/I3C since they both are in the same GPDMA 1:CH0: SPI TX.CH1: SPI RX.CH2: I3C TX.CH3: I3C RX.My first question would be, can SPI/I3C live with the same GPDMA resource?My second question, can I assign a different handle to I3C as they share the same names as in the SPI's TX/RX?TX: hdmatxRX: hdmarxAny ot
I'm doing some CAN messaging between the 2 CANs of F105 where I'm forwarding the message from one to the other but perform some modifications.Right now I set a flag in the FIFO callback functions that a message was received and the in the main while() I perform the actual work. Question is, is it safe to simply modify the original data param from HAL_CAN_GetRxMessage and then pass it to HAL_CAN_AddTxMessage or do I need to create a copy of the data and modify/pass that to HAL_CAN_AddTxMessage.Modifying the original data param works in development, but is it safe in real world application?
I am also failing in reproducing the DMA example from https://wiki.st.com/stm32mcu/wiki/Getting_started_with_HRTIM#To_go_further_about_DMA_burst. HAL_HRTIM_BurstDMAConfig() is mentioned in the text, but not present in the code example. Did you miss to put it into the example? Minor issue: I find it weird to edit HAL_HRTIM_MspInit() to change DMA_MEMORY_TO_PERIPH to DMA_MEMORY_TO_MEMORY as this gets overwritten by the next code generation. Would it be safe to put this in the user section below: /* USER CODE BEGIN HRTIM1_MspInit 1 */ hdma_hrtim1_a.Init.Direction = DMA_MEMORY_TO_MEMORY; if (HAL_DMA_Init(&hdma_hrtim1_a) != HAL_OK) { Error_Handler(); } /* USER CODE END HRTIM1_MspInit 1 */ This would result calling HAL_DMA_Init() twice. Is this OK? Kind regards, Guido
I've built a board around the STM32G0B1, hoping to get it to negotiate as much USB PD power as I can get. I've followed this tutorial: https://www.youtube.com/watch?app=desktop&v=-vsJhNIaHxE but see that some of the callback functions are deprecated: But this header doesn't say what the new function is or where to find out what the new interface is.This document is a lot of pages that don't tell me anything useful about how to actually use the library: https://www.st.com/resource/en/user_manual/um2552-managing-usb-power-delivery-systems-with-stm32-microcontrollers-stmicroelectronics.pdfThis one doesn't specify what are the functions to implement for the modern callbacks: https://wiki.st.com/stm32mcu/wiki/STM32StepByStep:Getting_started_with_USB-Power_Delivery_SinkCould someone point me to an up-to-date reference on what the requirements are to use this plugin?
Hey Team,I want to make LWIP and TouchGfx to work together for our next product. I have taken reference from here:https://community.st.com/t5/stm32-mcus/how-to-create-a-project-for-stm32h7-with-ethernet-and-lwip-stack/ta-p/493081. Touchgfx is working as expected2. I am not able to ping using etherenet. I am not sure the issue here.Please let me know what needs to be done here. Thanks.(Reposting this question as my previous post closed by mistake)
Hi all,I am using the MTFC8GAMALNA-AAT 8GB flash memory via SDMMC1, operating in MMC 4-bit wide bus mode, along with FATFS (M7). I now require the diskio.c file. Kindly provide it, or if you have any related example code, please share that as well. Please note that I do not want to use DMA or an RTOS for this implementation.Thanks
Hi everyone, I'm working on a project using an STM32H725 microcontroller running ThreadX and NetX Duo, and I've run into a persistent issue with the TCP server on port 502(Modbus). Setup: Networking handled by NetX Duo TCP server bound to port 502 listen_queue_size = 1 The socket is created once and reused (not deleted or recreated) Six other TCP ports are also in use and working without issues After running for a few minutes, Wireshark starts showing repeated [TCP Retransmission] packets being sent from the STM32, even though the socket on port 502 remains in the LISTEN state. At this point, the port stops accepting any new connections. Why is NetX Duo sending retransmissions when the socket is in the LISTEN state?How can I prevent the board from getting stuck and ensure it continues to accept new connections reliably? Any insights, suggestions, or similar experiences would be greatly appreciated!Regards, Rahul
NUCLEO F411RE I'm checking to see if I've got FreeRTOS integrated properly. So I've set up 2 tasks each with their own counter. In debug I was expecting to see the counter for Task1 to count up whilst Task2 never gets updated.When I step through the scheduler appears to set up just fine but when its to the call to start the first task (prvPortStartFirstTask()) it falls fowl to the HardFault_Handler.I initially had a stack size of 100 for each task & thought that maybe an issue but reducing the stack size to 30 hasn't made any difference.Any pointers (pun intended)? My code... * USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "main.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include "arm_math.h" #include "FreeRTOS.h" #include "task.h" #include <stdint.h> /* USER CODE END Includes */ /* Private typedef --------------------------------------
I create A project for STM32F411 Discovery board with STM32CubeIDE 1.19.0 and coding : while (1) { /* USER CODE END WHILE */ MX_USB_HOST_Process(); HAL_GPIO_TogglePin(LD3_GPIO_Port, LD3_Pin); HAL_Delay(500); /* USER CODE BEGIN 3 */ } and don't set anything else. (I saw that the connection settings for the leds were automatically created when Creating project) i Build and Run code sucessfully but i dont see led Blink. Thanks Edited to apply source code formatting - please see How to insert source code for future reference.
Hello. This is my first week with MCU's. I choose STM and want to stick with it. But it makes only pain :) So I was able to make some GPIO to work but have a complete disaster with LCD. The board came with some demo firm, and it was erased. So I am dealing with a complete new firmware. My helper is a chat GPT but he cant fix my Purple screen. I want to print some basic text like "Hello" and have no luck. Adding code here. Please advise that else I can share so there will be a clear mistake I made. Thank you. /* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2025 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file
Hi all static HAL_StatusTypeDef USB_CoreReset(USB_OTG_GlobalTypeDef *USBx) { __IO uint32_t count = 0U; /* Wait for AHB master IDLE state. */ do { count++; if (count > HAL_USB_TIMEOUT) { return HAL_TIMEOUT; } } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_AHBIDL) == 0U); count = 10U; /* few cycles before setting core reset */ while (count > 0U) { count--; } /* Core Soft Reset */ USBx->GRSTCTL |= USB_OTG_GRSTCTL_CSRST; do { count++; if (count > HAL_USB_TIMEOUT) { return HAL_TIMEOUT; } } while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_CSRST) == USB_OTG_GRSTCTL_CSRST); return HAL_OK; } at the USB_CoreReset function, my code keeps on getting stuck at the count++ and doesn't progress from there. I have even included RCC->AHB2ENR1 |= RCC_AHB2ENR1_OTGEN; // enable USB OTG HS clock RCC->AHB2ENR1 |= RCC_AHB2ENR1_USBPHYCEN; // enable ULPI clock before that function call but it does nothing.My board is stm32u5g9
Hello Community, I am trying to initialize SD card with FileX middleware standalone with my Nucleo-U545RET6Q board. I have initialized SDMMC1 with SD 4 bit wide , 48MHz with 0 divider. Later i had to put divider by 2 because the code was stuck at fx_media_open(); here is the picture: Later I have initialized the FileX middleware with SD interface, without changing any parameters. I then, edited the app_filex.c using code found with RTOS Based SD File edit program in U5 families. This is my app_filex.c file /* USER CODE BEGIN Header */ /** ****************************************************************************** * @file app_filex.c * @author MCD Application Team * @brief FileX applicative file ****************************************************************************** * @attention * * Copyright (c) 2021 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory
I am trying to use the available example from software package - Microphone streaming. I Have installed audacity app, and follows the documentation related to X-NUCLEO-AMICAM1. LINK: UM2649 - Getting started with the X-NUCLEO-AMICAM1 analog MEMS microphone expansion board based on MP23ABS1 for STM32 Nucleo STEPS followed as per the document - hardware changes.4 microphone acquisition configurationStep 1. Open SB24 and SB26 to disconnect M1OB and M2OB on-board microphones from the ADCStep 2. Close SB23 and SB25 to connect M1 and M2 external headers to the ADCStep 3. Mount coupon boards on the headersCaution: Do not close SB23 and SB24 at the same time to avoid potential short circuit between M1OB on-boardmicrophone and M1 external microphone if the coupon is mounted.Do not close SB25 and SB26 at the same time: it will result in a potential shortcut between M2OB onboardmicrophone and M2 external microphone if the coupon is mounted. I cannot able to read the micro
Dear all,could need some advice how to continue debugging, IO am using an STM32F4- TIM1 capture compare IR enabled with highest priority (even above Time Base) - c&c callback just toggles a PIN two timesinline void HAL_TIM_OC_DelayElapsedCallback(TIM_HandleTypeDef *htim) { HAL_GPIO_TogglePin(DEBUG_PIN_GPIO_Port,DEBUG_PIN_Pin); HAL_GPIO_TogglePin(DEBUG_PIN_GPIO_Port,DEBUG_PIN_Pin); return; }- IR is called every 13us. However, sometimes the pin seams stuck for ~10us and then recovers.checking carefully, the next double toggle is also a bit late but the overall timing for the over next is fine.So looks to me that something interrupts my interrupt and delays it. But what should this be if it has already highest priority ?Any suggestions ? BR,BastelBaus
Greetings, I have a question about the touchsensing module. I am using a stm32u585rit6 mcu in a custom-made board and making a project using azure rtos. I needed to add touchsensing. I watched the app_azure_rtos_config.h and noticed that there is static memory allocation via threadX memory pools (#define TOUCHSENSING_APP_MEM_POOL_SIZE 5000). Then, at the app_azure_rtos.c file there is the following: __ALIGN_BEGIN static UCHAR tsc_byte_pool_buffer[TOUCHSENSING_APP_MEM_POOL_SIZE] __ALIGN_END; static TX_BYTE_POOL tsc_app_byte_pool; if (tx_byte_pool_create(&tsc_app_byte_pool, "TOUCHSENSING App memory pool", tsc_byte_pool_buffer, TOUCHSENSING_APP_MEM_POOL_SIZE) != TX_SUCCESS) { /* USER CODE BEGIN TOUCHSENSING_Byte_Pool_Error */ /* USER CODE END TOUCHSENSING_Byte_Pool_Error */ } else { /* USER CODE BEGIN TOUCHSENSING_Byte_Pool_Success */ /* USER CODE END TOUCHSENSING_Byte_Pool_Success */ memory_ptr = (VOID *)&tsc_app_byte_pool; status = MX_TOUCHSEN
Hello, I am trying to utilize the USB peripheral in STM32cubeIDE with the STM32H7S78-DK. It hangs forever in MX_USB_INIT on a function USB CORE RESET. With FS and HS this same issue seems to be happening. Pictures show config in the GUI and the aforementioned function.
Dear supporters,In a project I want to create a feedback mechanism to keep the top of a pulse-shaped signal between boundaries. Most of this seems working, except the control of the DAC channel, that should output a voltage for the diode-laser which produces the pulse to be controlled. Whatever I try, I get a more or less constant block shaped signal of 3.3V during ~7us and 0V for 5us. I checked the Reference Manual for the STM32H723VG processor chapter 31 but did find any clue.In pseudo code I do the following: - declare a DAC variable (DAC_HandleTypeDef hdac1; , auto-generated) - initialize the DAC within 'main.c' ( MX_DAC1_Init(); , auto-generated)/** * @brief DAC1 Initialization Function * @PAram None * @retval None */ static void MX_DAC1_Init(void) { /* USER CODE BEGIN DAC1_Init 0 */ /* USER CODE END DAC1_Init 0 */ DAC_ChannelConfTypeDef sConfig = {0}; /* USER CODE BEGIN DAC1_Init 1 */ /* USER CODE END DAC1_Init
Hi,When I was using the STM32H743ZI chip, I set the system frequency of the chip to 160 MHz. Only enable the ICache, do not enable the DCache and the MPU.According to the prompt from CubeMX, the maximum peripheral clock is 240 MHz. Therefore, I configured HPRE as 1, as shown in the following figure:During the test, I found that if I disabled the ICache, LWIP was unable to obtain the IP address.If I configure HPRE as 2, LWIP can successfully obtain the IP.Using Wireshark to capture the data on the network, no DHCP protocol was found. That is to say, the Ethernet data was not sent out. However, during the debugging process, the Ethernet data was sent out through the sending function.Using a logic analyzer to test the data of the MDIO bus under the two configurations, I found that the MDIO versions automatically parsed by the logic analyzer were different. However, the values of all the registers of the PHY were the same in both cases, except for the status register. The test results of t
Hi All,I do struggle with high-cycle flash read.By using the example:https://github.com/STMicroelectronics/STM32CubeH5/tree/main/Projects/NUCLEO-H563ZI/Examples/FLASH/FLASH_EDATA_EraseProgramIt is doable to erase/write sector or halfword but reading from address (with simple memcpy) without writing/erasing it just before causes NMI_Handler().How to init/configure the EFLASH to simply retrieve data after startup?Write function: HAL_FLASH_Program(FLASH_TYPEPROGRAM_HALFWORD_EDATA, address, (uint32_t)&halfword)Read 'function':uint16_t halfword = *(uint16_t*) address;Regards,Mat
Hi,I have an issue with the UASRT communication being abnormal.First case:Access System Bootload Mode by Options bytesAccess the Main Application by the UART protocol ( UART2)Send the first UART packet to the ST MCU via UART2 that contains the UART error code: 0x4 (Frame Error)Send the same UART packet to the ST MCU via UART2 again without the UART error codeSecond case:Using IDE Debug Mode, break at main()Send a UART packet to the ST MCU via UART2 without the UART error codeI tried to De-Init and Re-Init the UART2, which I expect to reset all the UART2 register values before I send the UART packet. According to my test case, could I say that the UART error code 0x4 is due to System Bootload Mode?How could I fix the issue?Please let me know if more information is required.
Hi Team, I'm new to STM32H7 controller. I've started exploring the shared memory in this dual core controller. I found a great one from MAJERLE. Thanks for that. I used the same concept and made a Flag to check for new data to read and write, it was working okay. But, the time gap between write to read was so huge. I'm not getting why it's so. Then, I tried to poll the while(1) loop by toggling GPIO, to see how frequently it is polling the flag, but I found that the while(1) loop itself running very slow, unable to figure out what causing it slow. Please, guide me to resolve this issue. My requirement is that, I'm trying to share the some amount of data between M4 and M7 at very fast frequency. Suggest the best way to handle this problem.--------------------------------------------------------------------------------------------------------------------------------common.h /* Buffer from CM4 to CM7 */ #define BUFF_CM4_TO_CM7_ADDR MEM_ALIGN(SHD_RAM_START_ADDR) #de
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.