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
Hi all,is it possible to connect a SDCard to the stm32f723e-disco [1] board? The webpage [1] is talking about some microSD connector, but I do not really find one. So is this a mistake on the webpage?Additionally, I would like to ask, if it is possible to expose the SDIO pins (CLK, CMD, DATA[0:3]) through the GPIO pins such as the Arduino header for example. This would allow us to connect an SDCard through a external break out board [2]. If so, would it be possible receive an example code how to do so?Ideally would be some device tree configuration how to configure the PINCTRL, because I develope the application with Zephyr RTOS [3].Thanks in advise.RegardsAndi[1] https://www.st.com/en/evaluation-tools/32f723ediscovery.html[2] https://learn.adafruit.com/adafruit-microsd-spi-sdio[3] https://zephyrproject.org/intro-to-zephyr-rtos/
Hello,i am porting a project made initially on STM32H750, but because of the semiconductor shortage on the market, the only available part was a stm32H725IGK6, which i started working on.Regarding the usb connection, i have the following pins used:PA9 - connected via 10k resistor to 5VusbPA10 - connected to ID usb pinPA11 - connected to DN usbPA12 - connected to DP usbDoes this devices supports VCP over usb? Because i am trying to work with some usb cdc examples, but so far i am not able to make it visible on the computer.
Hi i would like to have an example code or something that helps me out, I wanna know how to use HAL functions in AZURE RTOS ,When i try to use HAL_UART_TRANSMIT(&huart2,pdata,size,timeout) i get an error that huart is not defined like wise same for PWM generation.all this are done in app_threadx.c . So i would like to know how to use HAL in AZURE RTOS
I am trying to implement firmware updates for my application, and I've come across X-CUBE-DBFU - On-the-fly firmware update for dual bank STM32 microcontrollers (AN4767) - STMicroelectronics. In studying main(), I am not sure what the purpose of the LoadRamBankX() functions is. Are they purely for "minimization of the downtime" mentioned in AN4767, or is it necessary for any firmware update that leverages dual-bank? For my application, it is acceptable to go through a soft-reset when updating firmware, so do I need to use this?
Could someone assist and clarify how to configure GPDMA for DAC for use the callback function HAL_DAC_ConvCpltCallbackCh1(DAC_HandleTypeDef* hdac) with STM32U575CGU6. I caught:/* Data Transfer Error Interrupt management */ if ((__HAL_DMA_GET_FLAG(hdma, DMA_FLAG_DTE) != 0U)) /* Update the DMA channel error code */ hdma->ErrorCode |= HAL_DMA_ERROR_DTE;My goal is to catch the callback functions:HAL_DAC_ConvCpltCallbackCh1(DAC_HandleTypeDef* hdac) and HAL_DAC_ConvHalfCpltCallbackCh1(DAC_HandleTypeDef* hdac)and integrate mp3 player with STM32U575CGU6. Before STM32U575CGU6 I worked with STM32F413 and my the code worked.Please assist. Thanks! Please see some parts of the code for explaining.//////////////////////////////////////////////////////////this is a configuration of DMA ///////////////* Includes ------------------------------------------------------------------*/#include "gpdma.h"/* GPDMA1 init function */void MX_GPDMA1_Init(void){ /* Peripheral clock enable *
Hello,I am using nucleo F767zi to run LwIP_HTTP_Server_Netconn_RTOS.According to the MX configurator and according to DocID029041 Rev 6 (SM32F767xx Electrical characteristics) page 143 Fpll_should be [0,95-2,1Mhz].The mentioned example generates (IMHO) .32 Mhz well outside the forementioned interval.Details:/* Enable HSE Oscillator and activate PLL with HSE as source */ RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; RCC_OscInitStruct.HSEState = RCC_HSE_ON; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; RCC_OscInitStruct.PLL.PLLM = 25; RCC_OscInitStruct.PLL.PLLN = 400; RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; RCC_OscInitStruct.PLL.PLLQ = 9; RCC_OscInitStruct.PLL.PLLR = 7; // so => Fpllin = 8 Mhz / M = 8 Mhz / 25 = 0,32MX configurator comes to the same conclusion:It is a bit strange that an ST example designed (?) for the 767zi board does not comply with the specs?In the same line the example specifies:
We connect the STM32 MCU to this ethernet switch through RMII clock mode with SPI to access the switch management. However, the MCU does not seem to have ethernet. The port 4 status indicates good link but auto-negotiation is not done.Has anyone done this before? Can you please point me to a direction in debugging this issue?Thank you
I have a UDP socket for sending and receiving messages. Everything works fine for packets up to a certain size. I see via 'Wireshark' that I can successfully receive packets that get fragmented into at most 4 fragments.These are the parameters that I think may affect the reception:ETH_RX_BUFFER_SIZE: 1524MEM_ALIGNMENT: 4MEM_SIZE: 32768LWIP_RAM_HEAP_POINTER: 0X30044000MEMP_NUM_REASSDATA: 28MEMP_NUM_FRAG_PBUF: 28MEMP_NUM_SYS_TIMEOUT: 10PBUF_POOL_SIZE: 128PBUF_POOL_BUFSIZE: 1514IP_REASS_MAXAGE: 60IP_REASS_MAX_PBUFS: 28TCP_MSS: 1460
I'm using STM32F405RGT6 as a Main controller on the board for our product.When we flash the FW to STM32F405RGT6 via FT232RL, it fails to enter bootloader mode sometimes. Failling rate is around 40-50%. I observed signal behaviour about Reset(DTR) and BOOT0(RTS) with logic analyzer. In success case, its behaivor looks fine but we saw the steep voltage drop on Reset(DTR) in fail case. I tried putting pull-up resistor(10K) on DTR line but it didn't work. Actually, I have no idea about that voltage drop and what is going on the STM32. Is it not hadware related issue?I'm using stm32flash v0.7 to flash FW.GPIO sequence is set to “-rts,dtr,-dtr:rts�?baud rate is set to 230400Basically, following the application note(AN3155 USART protocol used in the STM32 bootloader) below.
Hello,I want to use USB-Host MSC with FreeRTOS on a STM32H745.When I generate a project in CubeIDE (with integrated CubeMX) without FreeRTOS and add the few need lines (like the example from ControllersTech on YouTube) it works fine on a Nucleo-H745.When I try it with FreeRTOS and change the needed details to work within a task there occure some problems.For the first, in this case the USBH_UserProcess defined in USBH_Init is never called.After changing the #define USBH_PROCESS_STACK_SIZE in usbh_conf.h to a value of 1024 it is a little bit better.By default CubeIDE_MX sets this value to „0“ – it can’t be changed in CubeIDE_MX => Why??After this USB seems to work in general:I can mount an USB-Stick and f_getfree is also working.But if the function f_stat is called the result is a HardFault.I now, that in CubeMX there is a example for the 745-Evaluation-Board. I can’t test it cause I don't have the board.Taking out the details of this example and transfer them to my project ist not e
I need to develop a bootloader on STM32L476. So I adapt my code from this tutorial and codes : video https://www.youtube.com/watch?v=OkUQ3iMmiYQ&list=PLnMKNibPkDnEb1sphpdFJ3bR9dNy7S6mO using STM32G071 , However, my adapted code running on STM32L476 always crash immediately after the execution switch from bootloader to target application. I wonder if there is unknow difference between STM32L476 and STM32G07 on bootloader behavior which cause the crash ?
The STM32F4 Discovery board docs state that "When connected to a PC with a second USB Type-A to USB Type-C to Micro-B cable through CN5, the board is recognized as a standard mouse".This is confusing, Type-A to Type-C to Micro-B, what can that mean?Anyway, I connected the IDE interface USB CN1 to the PC, and I connect the CN5 micro-USB to the same PC, and it does not detect it as a mouse. The board has not been reprogrammed, its out of the box.Any ideas how to resolve this issue?
Hi, I want to change my Controller from the F3 to the U5 (more RAM and Flash needed and the U5 LQFP48 is 98% pin compatible)Only Problem: The application is ready to use on the F3, I want to port it to the U5 but the U5 supports USB only with Azure RTOS. I found the classic core apps for the U5 on github, but i cant handle the integration in CUBE IDE. Are there any application notes, tutorials, quick start guides? I copy the folders "Driver" and "Middlewares" from git to my project and included these folders in the project properties. What is the next step? Can you please help me out? Thanks
We have a new project and would like it to have some features similar to the STM32 on an STLink:a) Emulate a Thumbdrive using MCU FLASH and/or an external serial FLASH IC. The files should be accessible by both the STM32 and any PC connected to the USB on the board for holding configuration and logs.b) Drag and drop self programming (This is a variation of what the STLink does to attached boards, and the STLink firmware upgrade process).c) VCP, a virtual UART for diagnostics.d) Bonus if some security method is included.Can anyone recommend a starting point? I've tried some examples in MX, some worked, some didn't. We haven't successfully emulated a thumbdrive. In MX Example selector I couldn't get Ux_Device_MSC examples to work on any of our ST Demo hardware (either L4R9 Discovery or F769 Discovery, also some Nucleos).We have external thumbdrive file system working on H743 USB-Host, but that isn't what we need here.We have VCP working over D+/D- on a USBC connector.Initial target is ST
/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2023 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 comes with this software, it is provided AS-IS. * ****************************************************************************** */ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "main.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ /* USER CODE BE
The HAL L4 page 38 - but I saw it more also in other doc - has an error how to use HAL_GetTick for timeout:HAL_StatusTypeDef HAL_PPP_Process(PPP_HandleTypeDef)timeout = HAL_GetTick() + LOCAL_PROCESS_TIMEOUT;while(ProcessOngoing)if (HAL_GetTick() ≥ timeout)Why I think this is wrong: HAL_GetTick returns a uint32_t counter (at least in the ST libs I checked). This unsigned 32 bit value default increments 1000 times/s and overruns from 0xFFFFFFFF to 0x00000000 after ~49.71 days. Suppose the process started at Tick 0xFFFEDCBA. After adding the the wanted timeout (ex. ~74s), the timeout must trigger when Tick reaches 0x00000123. That value will be correctly calculated in the ST example. But 1 tick after the process started, Tick will be 0xFFFFEDCBB. Since that's bigger than the computed end value 0x123, the code incorrectly triggers a timeout after 1ms instead of 74s.I believe it's better to do it this way:uint32_t processStart = HAL_GetTick ();....if ((HAL_GetTick () - processStart) >= m
USB DP and DM have no 1.5k pull-up resistance, which will not take effect after internal pull-up of DP or DM (DP or DM grounded), and the resistance value of current limiting resistance (R56 R58) is 12.5 Ω instead of the marked 22 ΩThe measured value of PA10 after internal pull-up is 2.9V(PA11 PA12) Measure 0.1V after internal pull-up
I've a bunch of issues with STM32CubeIDE.To repeat the "Deleted Source Files" issue in STM32CubeIDE, running on a Mac M2 or Intel (not a Rosetta issue) under MacOS Ventura 13.x. STM32U5 board. Do the following:File->Import... General:Import STM32Cube ExampleName: Nx_MQTT_ClientPick Name=Nx_MQTT_Client / Board=B-U5851-IOT02AHit "Next" and create the new project by following the prompts.Do a Project->Build Project (which should succeed even if WiFi info not supplied as per readme).Since I know what's going to happen next, copy the following files from the newly installed project, perhaps using the following terminal command:cp ~/STM32CubeIDE/workspace_1.11.0/Nx_MQTT_Client/Middlewares/ST/netxduo/common/src/{nx_ram_network_driver.c,nx_tcp_server_socket_driver_listen.c,nx_tcp_socket_driver_establish.c,nx_tcp_socket_driver_establish.c,nx_tcp_socket_driver_packet_receive.c,nx_udp_socket_driver_packet_receive.c} /tmp(that's all on one line BTW).Then do a "Project->Generate Code", fol
STM32Cube_FW_H7_V1.11.0I am not using the STM32H735G-DK example for the discovery board, but ported it to use on the STM32H743-eval board and found that during initialization of the fx thread an attempt is made to open the SD card. There are actually two problems with the way it is done. 1) Not really a bug, the thread tries to open the card without checking if it is present, and will fail if it is not and there is no recovery; 2) The bug is where the thread ends up calling into the HAL layer using stm32h7xx_hal_sd.c, HAL_SD_InitCard(). This is bad because AzRTOS is now running and the HAL layer does not check for running threads. In the named function, somewhere after line 516, to allow time after the SDMMC_PowerState_ON() for the SD card to stabilize, the code calls HAL_Delay(). This will likely hang, since at this point the HAL tick is no longer ticking. Not withstanding the equation to formulate the delay is absurd. I wrote about this in another post telling that unless the SD card
STM32Cube_FW_H7_V1.11.0If you have wondered why the Board Support Package code for the STM32H743i_EVAL board is not able to properly switch the edge detection of the SD card switch using the MFX expander, it is due to an improper use of the AND function in the BSP_SD_DetectITConfig() function. At line 429, it reads:if(((uint32_t)BSP_IO_ReadPin(0, PinDetect[Instance]) && PinDetect[Instance]) != PinDetect[Instance])The simplification of this line is to compare the pin state with the pin location. The BSP_IO_ReadPin function returns the status of 0 when the switch closed and 32768 for when the switch is open. The pin location on the expander is also at 32768 (pin15). If the switch is closed then the code in the Detect function needs to set to a rising edge interrupt. If the switch is open then the falling edge is desired so the next time the switch changes state the expander interrupts the MCU, so the sd process code can act accordingly.The bug is the use of "&&" instead o
Helloi am having a problem with my own project, i create it with cubemx and use keil uvision 5 for the first build, but it gives a lot of errors, i don't know what to do next because i just learned how to use it it was 1 week ago.I use board : stm32f103c8t6 blue pillplease help
ProblemI'm having an issue with my USB peripheral in the STM32F303ZE. Right now I'm capable of receiving the first request from the host after reset, which is a GET_DESCRIPTOR request. I populate the TX buffer and set the EP0R register to VALID for TX. I then get interrupted for an IN request, meaning the host ACKed my TX data (which I assume means the data was transmitted successfully) and then I receive an OUT status to finish the control transfer. And then I receive a reset and do this all over again two more times, resulting in the device failing to enumerate.What confuses me is that, from experience programming USB on a different MCU, I know I should be receiving a reset partway through transferring my device descriptor, yet the entire request goes through and then I receive the reset afterwards. While it may be possible that the host is letting my transfer complete, I still don't receive a SET_ADDRESS setup packet afterwards. As I said above, it just repeats over and over. My hop
Hello,currently we are working with easyMx Pro V7 Boards in Class and we are trying to get basic ethernet communication working. First time for everybody using stm32cubemx and HAL, even our teacher never used either one. Any Communication happening would be nice. Currently we have:Enabled the HSE Crysal/Ceramic ResonatorEnabled MCOEnabled ETH in RMII ModeConfigured PHY according to this. When looking at the Datasheets it seems to be the same. PHY_Address = 0 PHY Special Control/Status register Offset - 0x1F PHY Speed Mask - 0x0004 PHY Duplex Mask - 0x0010 PHY Interrupt Source Flag Register Offset - 0x001D PHY Link Down Interrupt - 0x0010Enabled LWIPDisabled DHCP and set a static IPCurrently we are not getting any response to our pings or any other indication that something is working. Did we forget to configure anything? Is there an accurate guide somewhere?
..
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.