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
I am trying to get USB High Speed running on my board, In the USB Core Soft Reset function, my code keeps on getting stuck in the do while loop that I have shown below. I have went through all the forum posts related to this and there has been no solution that has resolved this issue. The microcontroller series on this board is STM32U5A5RJT6. I would appreciate any guidance. Thank you! /* 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; }
I am trying to communicate to a e-paper display of waveshare 1.54inch v2 with B-WL5M-subg1. I have used the program file the company has provided but there is no respone in the module. I have tried using esp32 and the module works fine with it. both esp32and stm32 uses same program file while checking with logic analyzer both mcu show similar data format. But why isnt it working with stm32. I have attached the program for referense if there is any suggestions or solutions I would like to know.
Dear ST,I'm developing a project to send ADC data via USB high-speed to an external device (PC) with STM32H7S78-DK. I'm trying to establish communication via USB, but I'm having trouble with the CDC_Transmit_HS function, which always returns busy. Additionally, the callback CDC_TransmitCplt_HS() is never called, and the USBD_CDC_DataIn() function is not invoked. The hcdc->TxState = 0 is always different from 0. I don't understand why it is happening.The USB init, I think it is ok, because I can identify it at an external computer with the correct description and 480 Mbit/s of USB High speed.These are my configurations of USB:The Global Interrupt for USB is also available.This is the clock configuration: This is my code at the main, I just developed a code to send "hello" every second, and if it is Busy, it will print an increment value on the LCDThis is my USB init function:Do you know what the solution can be to the CDC transmission issue with USB high-speed d
Hello,I'm working with a RAK3172 based on STM32WLE5CC chip.I'm using Zephyr RTOS and trying to use the power management features.I've an uart communication, when CONFIG_PM=n, everything works well. When setting CONFIG_PM=y, I don't receive any data.I've configured, the lsi, hsi, pll and rcc in my dts file.I've tried a bunch of configuration, but impossible to get power management to work alongside uart.I just have the following code: int main(void) { while (1) { gpio_pin_toggle_dt(&gpio_led0); printk("Hello, World from main!\n"); k_msleep(1000); } return 0; }Thanks for the help
Hello,I just created a default project with the nucleo board template and with VCP initialized, how can I transmit data via UART using the VCP?
Having faced the same problem, ended up in this thread. This is the same for HAL_SPI_Receive_DMA() as well, because it internally calls the transmitReceive function. So, it made me enable tx dma interrupt as well rx. Why on earth I have to enable tx dma when I just need rx dma? It does not even call the tx complete callback. My workaround was to: 1-make tx dma interrupt priority higher than rx dma interrupt. 2-poll for tx dma complete in rx interrupt routine before proceeding to next transaction. void HAL_SPI_RxCpltCallback(SPI_HandleTypeDef *hspi) { handleXferCplt(hspi); } void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi) { handleXferCplt(hspi); } bool handleXferCplt(SPI_HandleTypeDef *hspi) { // stm hal forces to use both tx and rx dma becasue it calls tranmitReceive() internally for receive. // however, dma tx transfer complete interrupt comes after rx complete. So, tx dma busy flag is still set and queued // sessions cannot proceed. so wait for it to finish. this i
What should I pay attention to when I use stm32u5 FreeRtos stop2,When exiting stop2, do the relevant i2c spi adc uart peripherals need to be reinitialized?Is the value retained?Is there a routine for FreeRtos stop2?void Bsp_PowerManage_enter_stop_mode(void) { if ((device_state_info.stimulate_state) || (device_state_info.device_ota)) { return; } osKernelLock(); / while (__HAL_UART_GET_FLAG(&hlpuart1, USART_ISR_BUSY)); while (__HAL_UART_GET_FLAG(&hlpuart1, USART_ISR_REACK) == RESET); __HAL_RCC_LPUART1_CLKAM_ENABLE(); __HAL_RCC_LPTIM1_CLKAM_ENABLE(); HAL_UARTEx_EnableStopMode(&hlpuart1); device_lowpower_state.stop_mode_state = 1; HAL_SuspendTick(); // #if Bsp_IWDG if (HAL_LPTIM_TimeOut_Start_IT(&hlptim1, 61438) != HAL_OK) { Error_Handler(); } #endif HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI); SystemClock_Config(); HAL_InitTick(TICK_INT_PRIORITY) if (!__HAL_PWR_GET_FLAG(PWR_FLAG_STOPF)) Error_Handler(); __HAL_PWR_CLEAR_FLAG(PWR_FLAG_STOPF); if (__HAL_PWR_GET_FLAG(PWR_FLA
Hello,I’m using a CAT24C32-D EEPROM. It works on our STM32F446-based PCB, but I can’t get it to work on our STM32U5A5-based PCB. I’m encountering both write and read errors. I’m using the same driver/library on both MCUs, and the hardware is identical except for the MCU itself.What could be causing this? Why am I seeing these issues on the STM32U5A5 while the STM32F446 works fine? Any help would be appreciated.
HelloI have a few questionsSituation Summary:Development board: STM32F411RESensor: VL53L4CD TOF sensorPrevious successful case: On the STM32F401RE board, setting the BOOT0 pin to 1 → uploading the BIN file via STM32CubeProgrammer → sensor operation verified successfully via GUI.Current issue (STM32F411RE board):Setting BOOT0 the same way as on the F401 → STM32CubeProgrammer connection is lost.Using the adjacent JP1 pin (instead of the originally used one) → BIN file download succeeds.Running the GUI program → board and COM port not detected.Running "FLASH FW" in the GUI → port is detected, but the sensor shows a "not detected" message.Note: Both the F401RE and F411RE boards use the JP1 pin next to the board’s power pins as the BOOT pin.Question: What is the recommended method to make the sensor work properly with the GUI on the STM32F411RE board? I would appreciate any guidance you could provide on this issue.Please find my email address below.thanks email : whtndhks@it
SVD version 1.2, vs RM0468 Rev 3TIM1 CCR6 register is mislabeled as CRR6 in the SVD file
SVD version 1.2, vs RM0468 Rev 3SVD file lists DMAMUX2 as DMAMUX3 in multiple places
Hi, I'm using STM32H743 with STM32Cube FW_H7 V1.12.1 library package.I'm using LwIP without RTOS and our application is working well. In order to improve performance we would like to use the transmission in interrupt for the etherrnet interface instead the polling transmission.I saw that in the ethernet_link_check_state function in ethernetif.c file it is used the HAL_ETH_Start_IT(&heth), but in the low_level_output used to transmit data is used HAL_ETH_Transmit() insted of HAL_ETH_Transmit_IT().Is it possible to use the HAL_ETH_Transmit_IT() in order to improve performance?What we need to modify in order to use the HAL_ETH_Transmit_IT() insted of HAL_ETH_Transmit()?Thanks in advance.Regards
SVD version 1.2, vs RM0468 Rev 3The SVD file is missing the following IRQ numbers OTG_HS_EP1_OUT_IRQn = 74, OTG_HS_EP1_IN_IRQn = 75, OTG_HS_WKUP_IRQn = 76, OTG_HS_IRQn = 77, RNG_IRQn = 80, BDMA_Channel0_IRQn = 129, BDMA_Channel1_IRQn = 130, BDMA_Channel2_IRQn = 131, BDMA_Channel3_IRQn = 132, BDMA_Channel4_IRQn = 133, BDMA_Channel5_IRQn = 134, BDMA_Channel6_IRQn = 135, BDMA_Channel7_IRQn = 136, ECC_IRQn = 145, DTS_IRQn &n
SVD version 1.2, vs RM0468 Rev 3SVD file is missing registersDBGMCU_APB1HFZ1DBGMCU_PIDR4DBGMCU_PIDR0DBGMCU_PIDR1DBGMCU_PIDR2DBGMCU_PIDR3DBGMCU_CIDR0DBGMCU_CIDR1DBGMCU_CIDR2DBGMCU_CIDR3SVD list reserved memory sections as registersDBGMCU_APB3FZ2DBGMCU_APB1LFZ2DBGMCU_APB2FZ2DBGMCU_APB4FZ2
SVD version 1.2, vs RM0468 Rev 3RCC PLLxDIVR has errorsRCC->PLL2DIVR, DIVN1 should be DIVN2RCC->PLL2DIVR, DIVP1 should be DIVP2RCC->PLL2DIVR, DIVQ1 should be DIVQ2RCC->PLL2DIVR, DIVR1 should be DIVR2
SVD version 1.2, vs RM0468 Rev 3SVD file contains references to a second usb module that doesn't exist.OTG2_HS_DEVICEOTG2_HS_HOSTOTG2_HS_PWRCLK
..
Hello,I wanted to create a firmware to communicate first between my laptop and one stm32n6 using the ethernet communication protocol.Then enable communication between two stm32n6 (as client and server)How do i configure the GPIOs and such on the .ioc file to make that happenAnd what is the most basic code that can work in that sense. Thank you for your response.
So I am currently trying out SPI connections for the ILI9341 on the 747I-Discovery board connections are as follows #define SPI_RES_Pin GPIO_PIN_1 #define SPI_RES_GPIO_Port GPIOK #define SPI_DC_Pin GPIO_PIN_6 #define SPI_DC_GPIO_Port GPIOJ #define SPI_CS_Pin GPIO_PIN_5 #define SPI_CS_GPIO_Port GPIOJ hspi5.Instance = SPI5; hspi5.Init.Mode = SPI_MODE_MASTER; hspi5.Init.Direction = SPI_DIRECTION_2LINES_TXONLY; hspi5.Init.DataSize = SPI_DATASIZE_8BIT; hspi5.Init.CLKPolarity = SPI_POLARITY_LOW; hspi5.Init.CLKPhase = SPI_PHASE_1EDGE; hspi5.Init.NSS = SPI_NSS_SOFT; hspi5.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_16; hspi5.Init.FirstBit = SPI_FIRSTBIT_MSB; hspi5.Init.TIMode = SPI_TIMODE_DISABLE; hspi5.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE; hspi5.Init.CRCPolynomial = 0x0; hspi5.Init.NSSPMode = SPI_NSS_PULSE_ENABLE; hspi5.Init.NSSPolarity = SPI_NSS_POLARITY_LOW; hspi5.Init.FifoThreshold = SPI_FIFO_THRESHOLD_01DATA; hspi5.Init.TxCRCInitializationPattern = SPI_CRC_INITIALIZATION_A
I'm building a high-speed two-stage data pipeline on the STM32H735G-DK and encountering issues with corrupted signal output in external memory.Setup:ADC1 + ADC2 in dual interleaved mode sampling a single direct channel at 12-bit resolutionTriggered via TIM2 TRGO at 5.5 MHz (effective 11 MSPS)DMA1_Stream0 in double buffer circular mode, writing to RAM_EXEC (bufferA and bufferB)MDMA in circular linked list mode, triggered by DMA TC flag, alternately transfers bufferA/B to external HyperRAM (mapped at 0x70000000 via OCTOSPI2)Problem:ADC data is correctly written to internal RAM, but the signal in HyperRAM is choppy, discontinuous, and out of phase when reconstructing a clean 10 kHz sine wave during post-processing.Suspicions:MDMA may be pulling stale buffer data due to desync with DMA toggleLinked list nodes may be misalignedMemory attribute or caching problems (all regions currently non-cacheable)What I’ve Tried:Slowing down sampling and verifying CT bit toggling confirms ping-pong behav
I have set up a DMA on an I2S device with an STM32H503CBU6. The idea is, that the DMA runs continuously on a single bufferaddress (one word, containing the left and right channels for the external I2S-DAC). When the DMA transfer of that 1 word is complete it should start over again by itself.At present the goal is not achieved with the following setup:uint16_t ram_loc[2] = {0,0}; int main(void) { /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* Configure the system clock */ SystemClock_Config(); /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_GPDMA1_Init(); MX_ICACHE_Init(); MX_I2C1_Init(); MX_I2S2_Init(); MX_TIM1_Init(); HAL_I2S_Transmit_DMA(&hi2s2, ram_loc,1); // since circular is configured, // am I right that the DMA keeps alive itself? /* USER CODE END 2 */ /* Infinite loop */ while (1) { // for testi
Hello STM Community,I have a project on STM32F407 with a web server. I am loading html pages and data from external USB storage using fs_open_custom() (fs.c) but in some cases I was still using internal flash with fsdata(_custom.c). For example, a 404 page for external memory error or disconnection cases to report a web server memory error.I recently updated to HAL 1.27.1 and reading data via fsdata_custom.c suddenly stopped working correctly. When requesting to read fsdata, the entire ethernet always dropped without reconnecting (must restart the MCU). After return back only the stm32f4xx_hal_eth.c/.h and ethernetif.c/.h files (the rest will remain in HAL 1.27.1), reading will start working correctly again.Is there any knowledge of this specific behavior or ethernet error after updating to HAL 1.27.1? Or is there already a fix please? I read here about the major overhaul of ethernet in the 1.27.0/1 update and the new problems it brought. Updating to HAL 1.28.0 (Cube 6.11) did not fix
Hello ST membersI've been having a problem with my STM32H745I-DISCO Board after my co-worker was trying to learn how to use and create projects with it.It was a simple project of using a digital button conected to the board via jumper and a potentiometer. it used sampling from gui to make the conection between the information that came from the model to the view.He used the option of solve clock issues in cubeMX to configure the analog ports. After that, the screen was blank, I tried to upload my previously working projects to the board but nothing changed. I tried erasing the flash and external memory via cube programmer, nothing changed.There were no build problems, and when flashing the project via touchgfx, no problems were announced in the monitor too.Then, I tried uploading the exemple project from ST called LTDC_Display_2Layers, and it worked perfectly.After that, I tried uploading the full demo for my board STM32Cube_Demo-STM32H745I-DISCO-V1.0.0_FULL.hex, it also
Hello I cannot manage to make my program working Nucleo 32 Board L412KB Time base of 1 s with TIM1 after debugging it appears that the programms never enters in the call back function of my code here below some explanations : - call to HAL_TIM_IRQHandler(&htim1); from the IRQ handler is OK Then /* TIM Update event */ if ((itflag & (TIM_FLAG_UPDATE)) == (TIM_FLAG_UPDATE)) { if ((itsource & (TIM_IT_UPDATE)) == (TIM_IT_UPDATE)) { __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_UPDATE); #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) htim->PeriodElapsedCallback(htim); #else HAL_TIM_PeriodElapsedCallback(htim); #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ } OK as well Then the program goes to the weak function instead, while i expected he went to the standard call back function in my code where i toggle LD3 I suspect that i forget something important but i don't find I am not familiar with Interrupt handling, could you please help here Thanks Many thanks in advance Regards P
I have been testing the USBPD firmware examples SNK1M1_Sink and DRP1M1_DRP (the board is the NUCLEO-G474RE). When a PD source is connected to the board running either example and then the board is reset, it will then renegotiate the contract with the source.I have my own project (STM32G0B1RE) with two ports, a UFP (sink) and a DRP (sink/source). When I connect a source to either port and then reset the board, it doesn't renegotiate the contract like the firmware examples. I need to get this behaviour so that the board will behave correctly if it has to reset.Can anyone help me to work out why? I have tried resetting the board with the debugger attached, and confirmed that USBPD_DPM_UserCableDetection() gets called with State=USBPD_CAD_EVENT_ATTACHED on the connected port after reset (so the source is detected).For now I am focussing only on the UFP, so please ignore any DRP/tcpp03 code below.Here are the parts that I've changed from the defaults. Please let me know if you need any
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.