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 attempting to use an STM32U545 nucleo board with an external SD card shield from Adafruithttps://www.adafruit.com/product/4682However, each time I attempt to initialize the SDMMC peripheral, the call to HAL_SD_Init fails with a DTIMEOUT error. I have tried mirroring the settings used in the STM32U5-Eval example included with the cube, however this too fails. Below are the settings being used to initialize the peripheral, generated directly from the Cube. void MX_SDMMC1_SD_Init(void) { /* USER CODE BEGIN SDMMC1_Init 0 */ if (HAL_GPIO_ReadPin(GPIOC, GPIO_PIN_3) != GPIO_PIN_SET) return; /* USER CODE END SDMMC1_Init 0 */ /* USER CODE BEGIN SDMMC1_Init 1 */ /* USER CODE END SDMMC1_Init 1 */ hsd1.Instance = SDMMC1; hsd1.Init.ClockEdge = SDMMC_CLOCK_EDGE_FALLING; hsd1.Init.ClockPowerSave = SDMMC_CLOCK_POWER_SAVE_DISABLE; hsd1.Init.BusWide = SDMMC_BUS_WIDE_1B; hsd1.Init.HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_DISABLE; hsd1.Init.ClockDiv
I'm using an embedded hardware design based on the NUCLEO-H743ZI. Within the SMT32CubeIDE I configured all of the pins and set up the clock according to my PCB, I'm using an external LSE 32.768Khz and no external HSE. The PCB is set up to utilize VBUS sensing and ID pin, I set up the USB_OTG_FS in OTG/Dual_Role_Device with VBUS sensing. When I build and load the code on my STM I get no indication that the USB is functioning besides providing power to the PCB. What i'm expecting is to see the device accessible in REPL and it never shows up. When I change the USB_OTG_FS mode to Device_Only, which enables the Middleware USB_DEVICE option and set the class to Virtual Com Port the device has no issues making a USB connection. I noticed that in the configuration that doesn't work the code generated does not perform any function calls that include USB, only when i set it in Device_Only is when I see activity while debugging that has anything to do with USB. Is this intentional? Am I missing s
I am currently working with an stm32h725RG on a custom board and was previously developing the code in VScode. After flashing the code using stm32Programmer, I could visually see that the program was getting past the MX_USB_DEVICE_Init() function because the function is called in between two sets of LED timer initializations. However, I wanted to debug the SPI communication via SWD and have now switched over to use stm32CubeIDE as my IDE and programmer. Now, the code keeps getting stuck at the USBD_Init() call inside MX_USB_DEVICE_Init() when debugging.For more context, the board is being powered via USB through a LDO regulator with no VBUS sensing and I'm using a chopped up nucleof401re as my st-link. Both the USB and the nucleo are connected to my pc.This is my first time working with the stm32 family so any help is much appreciated!(EDIT: Resolved, after switching BOOT0 so that it is pulled low, I'm able to get past the MX_USB_Init() call. It hadn't occurred to me to change this bec
Can anyone help me please?I'm using LWIP and CGI SSI and http webserver. I've written an html form on my webserver that when submitted sends 16 parameters (each of 32 byte length) as a get. This crashes my webpage and the code never reaches the cgi handler.The same code currently works however if I only send 12 parameters of the same format.Thanks in advance.Parameters I have tried increasing:MEM_SIZE 10*1024 Byte(s)LWIP_HTTPD_MAX_CGI_PARAMETERS 48LWIP_HTTPD_MAX_TAG_LEN 48LWIP_HTTPD_MAX_TAG_INSERT_LEN 1024LWIP_HTTPD_MAX_REQUEST_URI_LEN 2048LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN 2048
How to set the number of simultaneous connections (backlog) in the Raw Socket Listen API? This is the relevant code snippet: /* start tcp listening for echo_pcb */ tcp_echoserver_pcb = tcp_listen( tcp_echoserver_pcb ); In contrast, the BSD/LWIP Sockets Listen API is: int lwip_listen(int s, int backlog)Do I have to enable this macro in opt.h for the above purpose? #define TCP_LISTEN_BACKLOGI am running a modified TCP Echo Server on the Board and sending continuous sequence of Modbus requests from the Modscan32 tool to the Modbus server running on the Board with STM32H723Zet6 MCU. But the response is given only to the first Request. The TCP Server is based on the source in the webpage: https://community.st.com/t5/stm32-mcus-embedded-software/how-to-send-data-lwip-tcp-server-to-client/td-p/119556How to modify the TCP Raw Socket Server mentioned above to send the response for all the request packets? As mentioned, the TCP Raw Socket Server
Hi Team,I am using STM32F7 nucleo board, CUBEMX version 6.10, FREERTOS CMSIS V2, LAN8742 Eth driver. I am working with LWIP stack FULLDUPLEX 100Mbps configuration.configured MCU as a server and re-establish communication in LWIP default thread.1. case 1: Ethernet communication is working fine if I communicate every 50msec. (transmitting/receiving 250 bytes)2. case 2: i. If I transmit and receive every 10msec, after several reconnection(removing ethernet cable and connecting it again) ethernet communication got lost, but all other functionalities are working(other threads).ii. In this case tried ethernet cable plug out and plug in Link up and link down is detecting but communication not established, Ethernet communication re-established only after MCU reset. iii. I tried debugging..but i didn't got any soln So anyone can help me and give me some tips to solve this problem.@STea
When i Start the Eth Dma i get immediatly the Fatal Bus Error and the TEB bits are all Set.The Reference Manual described it this way:Bits 18:16 TEB[2:0]: Tx DMA Error BitsThis field indicates the type of error that caused a Bus Error. For example, error response onthe AHB interface.Bit[2]: Error during data transfer by Tx DMA when 1, no Error during data transfer by Tx DMAwhen 0Bit[1]: Error during descriptor access when 1, Error during data buffer access when 0Bit[0]: Error during read transfer when 1, Error during write transfer when 0This field is valid only when the FBE bit is set. This field does not generate an interrupt.In Cube i find that if all bits are set it is when the eth dma cannot read the desriptor.#define ETH_DMA_TX_DESC_READ_ERROR_FLAG (ETH_DMACSR_TEB_BIT_2 | ETH_DMACSR_TEB_BIT_1 | ETH_DMACSR_TEB_BIT_0) in stm32h7xx_hal_eth.hI tried to put the descriptor in all Ram like SRAM 1, 2 or 3 but i get always the same error.Do anybody know why this happens?
I have a custom designed board using a STM32F429IET6 and LAN8742A.While attempting to bring-up ethernet and LWIP (fails w/o LWIP at the same spot) the code continuously fails in stm32f4xx_hal_eth.c in `HAL_ETH_Init` while waiting for the SW reset to complete after setting the SR bit in the DMABMR register.I've attempted copying as closely as possible the development board design (Nucleo-F429ZI) in software. The only differences that I can see are:- We use PG14 for RMII TXD0 instead of PB13.- We are using a 25MHZ external clock instead of the 8MHZ the Nucleo-F429ZI uses, but both running the board HCLK @ 168MHZ.- We use a dedicated reset line from the MCU PA6 to the nRST line on the LAN8742.- The Nucleo has the RXER pin going through a 10k then to GND. We also have a 10k to GND but it also ties to PB10. Currently, we have the PB10 pin not setup.This is where the timeout is happening in stm32f4xx_hal_eth.c (see line 15 of this snippet): /* Ethernet Software reset */
Hi, I have ported the Open Bootloader to the STM32G431 and has flashed it and is able to communicate with it over FD-CAN. Is there any program out there that I can use to flash programs using the bootloader over FD-CAN? maybe the CLI version of the STM32Cube programmer work? In that case is there a version for Linux on Arm of it (could only find amd64 version)?
Using stm32f767zi microcontroller and sd interfaced with spi and interfacing usb_host_msc code below tutorial following its working only when i sperately using but interface with sd card with pi below issue is getting https://embetronicx.com/tutorials/microcontrollers/stm32/stm32-usb-host-msc-connect-pendrive-to-stm32/Below output getting like this and stucks in MSC_Read_InquiryUSB Device Connected.USB Device Reset Completed.PID: 5607h.VID: 3f0h.Address (#1) assigned..Manufacturer : HP.Product : v210w.Serial Number : AA00000000005026.Enumeration done..This device has only 1 configuration..Default configuration set..Switching to Interface (#0).Class : 8h.SubClass : 6h.Protocol : 50h.MSC class started..Number of supported LUN: 1.LUN #0: . #usb #sdcard #MSC
Good morningAre there any isntall instructions for the X-Cube-USB_Audio extension?Don't see anything on the product site...Also when trying to install it manually through the package manager it tells me that this package isn't compatible or corrupted....Or is there any sample code to quickly test USB audio receiving from computer?thanks in advancerichard
Hi,I have a project that was design to be easily upgradable by the customer during devellopement. For this we added a USB connector and a jumper to select boot mode at power on, so we can use DFuSe to boot the new image. On the dev board (STM32F3discovery) everything is working even with craptastic wiring. However on the final board, it is not working. The USB is not recognized by windows.The circuitry on the USB lines matches exactly the dev board but the oscillator has changed. On the discovery it is a 8MHz crystal and on my final board it is an external oscillator at 24MHz. Meaning we use the bypass in our application instead of a normal oscillator configuration. This was unfortunately changed during layout.Is there any way the USB DFU bootloader can work with this external one pin oscillator ? Any tricks I could use to get it working or just impossible... I know it is needed to set the bypass in the application code but does the bootloader take this into account ... ?Thanks a lot.M
Hi,I see a problem in the HAL_RTCCEx_DisableBypassShadow function as the previous post POST advise, they convert the mas to uint8_t and by doing this when the value is and'ed the 24bit on the left are erased unintended.Im using 1.16.0 of IDE and (STM32Cube MCU Package for STM32H7) 1.11.2
Hello.Could anyone explain me why when I try to transmit data by UART using DMA in IDLE interrupt function from receive DMA on the same UART working in circular mode, once in several attempts my reception lost some data? TX and RX use different channels of DMA.When I change Trasmit_DMA to casual Transmit in work even though the interrupt handling takes more time.
Good morning everyone,I'd like some help on this problem.On a WeAct BlackPill board equipped with STM32F411CEU6 I wrote a fairly simple program using the encoder mode on Timer2 to keep up with count and direction.I activated the interrupt feature as well since I need to generate some signal base on certain counter value.My problem is the HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim) that is call only half of the time.I know this by a variable which is incremented every time the funcion is called and compare it the the counter value and is exactly half.I put a breakpoint on HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim) and trace the code and notice that both interrupt flag of each input it's handled and the same CaptureCallback is called.I know there are other ways to manage quadrature encoder but I thought since the feature it's available on the timer I could use it.Before changing method I'd like to know if I am doing something wrong.Thanks
Hello guys, I am trying to make a development board using STM32G070KBT6 MCU, I want to add two modes to program flash memory 1. UART2. SWDbut the PA14-BOOT0 share a common pin, I have looked online for suggestions but am a bit confused now, can anyone give a final solution if I want to use both UART and SWD to upload code and a bit reference on how to do it if I have to add a circuit part or change bits, I only want these to upload code to my MCU.
I added a Linked Resource and tested it on an include line, although the path is the same, it fails.I have zero idea why, does it need another syntax?Path variable:-> REPOSITORY_LOC set as C:\Users\Dev\STM32Cube\RepositoryWith GCC Copiler Include Paths this fails:- ${repository_loc}/STM32Cube_FW_H7_V1.11.1/Drivers/STM32H7xx_HAL_Driver/Incbut this works:-C:/Users/Dev/STM32Cube/Repository/STM32Cube_FW_H7_V1.11.1/Drivers/STM32H7xx_HAL_Driver/IncI tried with '\' and '/' no difference.Why would this cause these errors:-C:/Users/Dev/STM32Cube/Repository/STM32Cube_FW_H7_V1.11.1/Drivers/CMSIS/Device/ST/STM32H7xx/Include/stm32h7xx.h:282:11:fatal error: stm32h7xx_hal.h: No such file or directory282 | #include "stm32h7xx_hal.h"| ^~~~~~~~~~~~~~~~~
Still looking for ANY example showing a STM32G4 using a PDM microphone over SAI. ST sells both, and supposedly work together, but all I see in support forums is everyone (including ST employees) saying how they have to paste things together from unsupported other projects, (MEMSMIC is not a supported library in CubeIDE for G4) to add the PDMtoPCM support, then have tons of threads where they can't get it to work - clocking problems, build problems, etc. Does ST actually support PDM microphones on G4, or not? The data sheets say yes, the actuality of CubeIDE, support and examples say no.Can anyone provide a ST supported example of a G4 capturing PDM microphone data (one channel will do) and storing / forwarding as PCM data?
HelloI am looking for a tftp client example or working C code.I am trying to download a file from a tftp server with a tftp client, so I need a reference document or code.I implemented it as a TFTP Server using the ST library example and tried to upload firmware.Please give me a solution..* Using stm32f4, iar used
We're performing a block procedure call and struggled with odd SMBus-stack behaviour.#define BLK_PRC_CALL ((uint8_t)0x90) /*!< Block process call - write, then read, variable sizes */We incorrectly assumed the stack would read the response length from the slave after the initial write in the HAL_SMBUS_MasterRxCpltCallback. However, due to the conditional on line eight below, the receive length will be zero if you fail to set cmnd_master_RX_size in the st_command_t structure. The logic will ignore the returned length in pStackContext->Buffer[1] as it is always greater than cmnd_master_Rx_size (zero when not set).stm32_SMBUS_stack.c HAL_SMBUS_MasterRxCpltCallback:307 /* Reception next Usually there is something left to be read, we continue on position 2 of the IO buffer */ pStackContext->StateMachine |= SMBUS_SMS_RECEIVE; size = pStackContext->Buffer[1]; /* Applying upper limit on read size */ if ( size > pStackContext->CurrentCommand->cmnd_m
I've read AN2606 and it says use Pattern 14 for the G474 series. My understanding from this is a new board should enter the inbuilt bootloader simply by pulling the BOOT0 pin high. This does not work for me.Using STLink I can see the the option bits and BOOT_LOCK=0, nBoot1=1 and nSWBoot0=0. I've tried with nSWBoot0=1 to and the micro still just runs the user code in flash.I can get into bootloader on an F4 Discovery Board and a F4 Nucleo Board by pulling the BOOT0 pin high but not my G474 Nucleo Board. What I am missing/doing wrong?TIAPete
Hello, I am trying to use a timer 15 in PWM mode to drive the DMA of a DAC. I need the PWM to generate N number of update events for M number of pulses. For example, generated an update event 10 times every 200 pulses. I'm just trying to get the PWM working before checking if the DAC is working. The problem I'm having is generating the correct number of update events from the PWM. At the moment, I'm not trying to count the number of update event's since it's not working. I am setting the repetition counter to 10; however, I only get like 4(or 3) update events and then 20ms of none. So for the events I do get, they are the correct number of pulse but I'm expecting to see the updates events running all the time, not blocks of 3-4. I'm using Cube for configuring the timer but I do some manual config so I can change things in the code instead of depending on the config generated by Cube. So in the timer init code I
Hi All, I'm having issues setting up multiple HID reports. I had a couple of USB HID projects in the past, all worked fine. This time I started from STM32CubeIDE from Custom HID device. I have the following report descriptor: /** Usb HID report descriptor. */ __ALIGN_BEGIN static uint8_t CUSTOM_HID_ReportDesc_FS[USBD_CUSTOM_HID_REPORT_DESC_SIZE] __ALIGN_END = { /* USER CODE BEGIN 0 */ 0x05, 0x01, // USAGE_PAGE (Generic Desktop) 0x09, 0x04, // USAGE (Joystick) 0xa1, 0x01, // COLLECTION (Application) 0x85, 3, // REPORT_ID 0x05, 0x09, // USAGE_PAGE (Button) 0x19, 0x01, // USAGE_MINIMUM (Button 1) 0x29, 0x25, // USAGE_MAXIMUM (Button 37) 0x25, 0x01, // LOGICAL_MAXIMUM (1) 0x15, 0x00, // LOGICAL_MINIMUM (0) 0x75, 0x01, // REPORT_SIZE (1) 0x95, 0x25, // REPORT_COUNT (37) 0x65, 0x00, // UNIT (None) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x75, 0x01, // REPORT_SIZE (1) 0x95, 0x03, // REPORT_COUNT (# of padding bits
Hi Sir,My target board is STM32H747 , when I add the code. make will report error. the error message is below , how to fix it ? arm-none-eabi-gcc -o "TUT_03_CM4.elf" @"objects.list" -mcpu=cortex-m4 -T"D:\STM32CubeIDE\workspace\TUT_03\CM4\STM32H747XIHX_FLASH.ld" --specs=nosys.specs -Wl,-Map="TUT_03_CM4.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-groupC:/ST/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: ./OPENAMP/openamp.o: in function `OPENAMP_shmem_init':D:/STM32CubeIDE/workspace/TUT_03/CM4/Debug/../OPENAMP/openamp.c:138: undefined reference to `__OPENAMP_region_start__'C:/ST/STM32CubeIDE_1.16.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.12.3.rel1.win32_1.0.200.202406191623/tools/bin/../lib/gcc
Hi,I am using an STM32L452 and am trying to set the ADC reference voltage programmatically back and forth between the internal VREF (set to 2.5V) and the external 3V3 power rail. This is specifically for ADC1 channels 1 and channel 7. I tried a few different ways (both using HAL and also registers/bits) but does not seem to set the VREF as reference voltage to the DAC. The DAC output value still remains the same as if I use the external voltage as reference. How do I do that? i.e switch the DAC reference voltage back and forth between internal 2.5V and external 3V3 (or internal 3V3 if it is available). Attached here is the .ioc file and further below is the relevant code. Also if I try to add the following: // Enable the clock for the VREFBUF peripheral __HAL_RCC_VREF_CLK_ENABLE(); like suggested in some examples, it does not recognize that function and there are no .h files already included or part of the HAL header files/library that
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.