Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hello,I’m currently working on a project to synchronize two ICG and ECG devices. Although they require different oscillator frequencies—and therefore use different timers—both timers are driven by the same APB1 clock.Phase offsetSince they share the APB1 clock, does this mean that, despite generating different output frequencies, only a fixed phase offset will exist between the two timers?Divider accuracyWhen a timer applies division via the prescaler (PSC) and auto-reload register (ARR), is the output accuracy the same as the original clock’s accuracy? For example, if the source clock has a 1% frequency error, will that same 1% error persist after prescaling/division?I have searched the reference manuals but could not find any information on error introduced by the divider itself. Any documentation or insight on timer-divider accuracy would be greatly appreciated.Thank you!
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
Dear community,I would like to send a char buffer through UART using DMA, but at a precise interval (or delay).I know how to use the DMA with USART TX, it works flawlessly.The interesting bit is the delay between the DMA transfers.I know I can do it with a polling loop, and I know I can do it with a timer and in its interrupt, trig the DMA by enabling the DMA channel.On the C0 devices (and others), the DMA uses a DMAMUX that has a SYNC feature, which according to the documentation, should provide exactly what I'm looking for.However, I could not make it work at all.According to RM0490, table 51 on page 245, the sync input 21 is TIM14 TRGO (by the way, what is TIM14 signal for TRGO ?). So I set the SYNC ID, the number of requests (to anything for the moment, let say 4), rising edge for the sync polarity and set the SE bit (which is redundant with SPOL in my view, since SPOL = 0 will stop the sync).Has anyone succesfully used the SYNC feature of DMAMUX, to a similar use case ?Thank you a
Hi I don’t know the reason, but my board’s ld2 and ld8 leds are blinking, and the program says No STLink detection, even if I connect it to the usb port, what can be its reason? How can I fix it?
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
Hello,There's a small typo in the STM32H750VB reference manual (RM0433 Rev 8).Page 545, GPIO alternate function high register (GPIOx_AFRH)Address offset: 0x2 : Should be 0x24 (confirmed by the GPIO register map).Have a nice day, thanks for the very extensive and useful documentation.
Hi all, I'm setting up a custom board using the STM32WL33 device. I'm using four single-ended ADC inputs: ADC_VINM0, ADC_VINP0, ADC_VINM3, ADC_VINP3.I would like to use DMA and sequencer, adding TEMP and VDD as 5th and 6th conversions. I managed to got the above up and running, but: a) appears that ALL conversion is done on 3.6V conversion range, regardless of software setup and subsequent SWITCH register settings (which appears correctly set: 0x8282); using the below macro gives correct ADC_value => mV conversion: __HAL_ADC_CALC_DATA_TO_VOLTAGE(ADC_VIN_RANGE_3V6, adc[2], ADC_DS_DATA_WIDTH_12_BIT);b) TEMP reading appears totally wrong. At ambient temp (30°C), ADC readings is around 726 (over 12 bits). If I readback calibration registers: uint32_t Calib_c30 = (int32_t)*TEMPSENSOR_C30_ADDR; // =2556uint32_t TCK_c30 = (int32_t)*TEMPSENSOR_TCK_ADDR; // =300and use RM0511 - chpt 12.2.1 formula, I get T[°C] = -153°C (!!!) ADC register settings:Finally, n
Hi,Totally newb. I have a custom board with a STM32WB55CEU6. Connected over ST-LINK.I'm trying to upgrade FUS. Using stm32wb5x_FUS_fw.bin at 0x0807A000Everything seems to work fine until the very last step, where I get an error: FUS_STATE_IMG_NOT_FOUND: Firmware/FUS upgrade requested but no image found. (such as image header corrupted or flash memory corrupted)Any ideas?Here's my log:16:59:29 : Old Firmware delete ...16:59:29 : Warning: Option Byte: nSWboot0, value: 0x0, was not modified.16:59:29 : Warning: Option Byte: nboot0, value: 0x1, was not modified.16:59:29 : Warning: Option Byte: nboot1, value: 0x1, was not modified.16:59:29 : Warning: Option Bytes are unchanged, Data won't be downloaded16:59:29 : Time elapsed during option Bytes configuration: 00:00:00.00016:59:29 : Succeeded to set nSWboot0=0 nboot1=1 nboot0=116:59:29 : Memory Programming ...16:59:29 : Opening and parsing file: 0x495_FUS_Operator.bin16:59:29 : File : 0x495_FUS_Operator.bin16:59:29 : Size : 8.00 KB16:59:29 :
Hi community,I'm very new to STM32 wireless. I need some support.I followed the MOOC "STM32WB Getting Started Series: Part 12b, Lab. Receiving data from the phone " using Nucleo WBA55CG board. When I build the code, there were 0 error and 0 warning. Problem started with flashing. I couldn't find the STM board on ST BLE Toolbox on my phone. However, when I followed MOOC "STM32WBA5x workshop - 5- Add a BLE profile (P2PServer) to your peripheral" usng same HW, it worked perfectly. I could find STM board on the phone, receive noti when button is clicked und toggle the LEDs from phone. How can I solve this issue? I'm using Windows 11 Enterprise 23H2, STM32CubeMX v6.15.0, STM32Cube IDE 1.18.0 with STM32Cube_FW_WB_V1.7.0.
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?
Im currently facing issues with DRP1M1 and the Nucleo-G0B1RE in source configuration.I followed the instructions in the wiki however it seems that no actual communication is happening between the USB PD Devices this is the log i get from the cube monitor:CAD 294121 0 USBPD_CAD_STATE_DETACH_SRC 0EVENT 294121 0 EVENT_DETACHED 1DEBUG 294122 0 VBUS OFF 2DEBUG 294122 0 -- BSP_USBPD_PWR_VBUSOff -- 3DEBUG 294154 0 ADVICE: USBPD_DPM_Notification:105 4NOTIF 294154 0 USBSTACK_STOP 5DEBUG 294154 0 ADVICE: USBPD_DPM_Notification:105 6DEBUG 294154 0 -- BSP_USBPD_PWR_VBUSDeInit -- 7DEBUG 294154 0 -- GDP/GDC setting : default -- 8DEBUG 294154 0 -- BSP_USBPD_PWR_SetPowerMode -- 9DEBUG 294154 0 -- Low Power -- 10DEBUG 294154 0 -- BSP_USBPD_PWR_SetRole : SRC -- 11CAD 294155 0 USBPD_CAD_STATE_DETACHED 12CAD 294155 0 USBPD_CAD_STATE_EMC 13DEBUG 299807 0 -- BSP_USBPD_PWR_VBUSInit -- 14DEBUG 299807 0 -- BSP_USBPD_PWR_SetPowerMode -- 15DEBUG 299807 0 -- Normal -- 16CAD 299807 0 USBPD_CAD_STATE_ATTACHED_WAIT
Hi Community:I'm working with an STM32F411C to control a stepper motor that requires 3 PWM signals with a 120° phase shift, using Master-Slave timer synchronization between TIM1, TIM3, and TIM4. The second channel is used to trigger the next timer. When the motor stops, I need to maintain a 20kHz PWM signal with a 75% duty cycle on one winding. Everything functions fine until I need to restart the timers in synchronized mode. I've tried using the HAL_TIM_PWM_Stop and Start pair without success. I also attempted to use DeInit functions and reconfigure the timers, but it's still not working. Any ideas on how to solve this would be greatly appreciated. Thank you!
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)
Hello STM32 Community,I accidentally erased the full firmware on my STEVAL-PROTEUS1 board (STM32WB5MMG). After that, I followed this process to recover:FUS firmware: Updated using stm32wb5x_FUS_fw.bin from STSW-PROTEUS (since FUS was missing in the other package).BLE Stack: Flashed stm32wb5x_BLE_Stack_full_fw.bin from FP-AI-PDMWBSOC.OTA Reference App: Flashed Proteus_BLE_FUOTA_reference.bin from FP-AI-PDMWBSOC.After these steps, Bluetooth worked fine — I could connect to the board via my phone.However, when I upload the user application PDMWBSOC.bin (from FP-AI-PDMWBSOC), Bluetooth stops working — it gets disconnected and doesn’t advertise anymore.I tried uploading the application using:STM32CubeProgrammerOTA method via the mobile appIn both cases, the same issue occurs.My Goal: I want to use the FP-AI-PDMWBSOC software pack to run the predictive maintenance application via BLE.Can someone please guide me on what might be going wrong or if any additional steps are needed after uploadin
Hello,I'm not sure if I understand the RDP regression mechanism described on STM32U0 reference manual (RM0503 rev4) correctly. My general understanding is that it's possible to go from RDP2 => RDP1 => RDP0 if the OEM keys are set - if they are not set (all 0's or all 1's) the effect of RDP2 is the same as on devices without RDP regression feature, so the debug port is fully closed and can't be opened anymore.My confusion comes from the following descriptions of the manual:RDP level 2 description on page 79 states that the CPU debug port is disabled under reset.The same description states:Once in level 2, it is no more possible to modify the read protection level.Note 1. on page 80:When the protection level 2 is active, the Debug port, the boot from RAM and the boot from system memory are disabled.Contrarily, OEM RDP lock mechanism description for OEM 1/2 on pages 81 & 82 states that it's possible to go from RDP2/1 to RDP0/1 and states that the keys must be written to the
Hello, I am blocked with a personnal project using a STM32F769I-DISCO, TouchGFX and audio: DMA IT is not triggered. I have no idea why, no idea how to investigate more in the code. I will provide few things in my question, not because I don't want but because I don't know yet what to provide. I created a project with TouchGFX Designer and now I want to add the BSP code to play audio. My code initialize all devices (created by the tool) and try to play audio /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_DSIHOST_DSI_Init(); MX_LTDC_Init(); MX_FMC_Init(); MX_QUADSPI_Init(); MX_DMA2D_Init(); MX_I2C4_Init(); MX_LIBJPEG_Init(); MX_CRC_Init(); MX_USART1_UART_Init(); MX_DFSDM1_Init(); MX_SAI1_Init(); MX_I2S1_Init(); MX_TouchGFX_Init(); /* Call PreOsInit function */ MX_TouchGFX_PreOSInit(); /* USER CODE BEGIN 2 */ /* Init audio */ initAudio(); playAudio(); while(1); Audio code/** * @brief Plays the audio file * @PAram None * @retval None
Hi, If the project is large, multiple people need to divide the work to edit the UI pages, and then merge the edited pages together for compilation and debugging. Does the software have corresponding functions that can enable team collaboration? Best regardsJabari.Zhang
Hi, I tried to connect my board to my computer trought USB but I can't recognize the board, it doesn't appear, I can't use the Programmer either. I downloaded different drivers, I used different cables but it doesn't work. What can I do? The BLE connection worked, I could get some data from a SD Card, but I want to use in a continuous measure.
My board is the NUCLEO-H743ZI2, I've looked in the manual but haven't found anything so far. Maybe I could remove jumper JP2 so the Nucleo's MCU stays powered down and then connect the CN2 connector (SWD) to the external MCU?Thanks!
Hi,I'm having strange situation with mine BLE application on STM32WB5M module, i.e. Peripheral mode, which has implemented configuration characteristic (write with confirm) according by BLUEST protocol 00000000-000F-11e1-9ab4-0002a5d5c51b. Client reported, that during write operation to one of config characteristic (activate beep & 30s LCD), STM32 breaks connection, but it happens only on low battery!I started investigation with debug console, as main objective was to replicate situation, using HopeRF and AT commands as Central (tested before all worked smoothly). Currently I can connect, but I can't proceed the write operation, as STM32 breaks BLE connection with very little feedback (picture), i.e. Reason 0x8. When I used the ST BLE Toolkit, it does work fine though. What I tried and failed:- set the same interval, latency and timeout for Phone and HopeRF- changing the ST BLE stack from 1.18 to 1.21Thanks for any help. Marcin
Hi,Could someone be so kind as to explain in ***-proof terms exactly how I would connect an ST-link from a nucleo board to a custom STM32533RE PCB so that it can be programmed and debugged with STM32CubeIDE? Which pins from the MCU do I need to make available on the PCB and how do they connect to the nucleo? I haven't found a clear illustration of how to do this and some of the guides/comments I have seen have been conflicting! I'm getting ready to send the PCB off to the fab house and want to make sure I've got this right as it would be an expensive mistake.
Hi, I have implemented a function to jump to system memory from main application. And it is working absolutely fine on NUCLEO-G071RB and I am able to flash the controller using I2C Boot loading method using stm32flash. But same code when I tried with different controller of same series STM32G071CBU7 (small package) the behavior is intermittent. As some time it is working and some time I am getting NACK from I2C. Can some one help me to point out what could be wrong here.
Hi I am developing a product based STM32 Microcontrollers. To start with the I am using a Development BoardNucleo H7A3AI Board.What I plan to do is, attach a LCD TFT Display to this and develop the prototype. I plan to use TouchGFX designer to develop a UI and develop the firmwareOne Problem I face to start with TouchGFX Designer is the development board Nucleo H7A3AI is NOT listed in the supported boards. (I am using TouchGFX Designer 4.25.1 )The boards which are listed in TouchGFX Designer all have an attached display. In my case we are developing product based on Nucleo H7A3AI Board (This board does not come with a LCD Display).In such case how can I add my board (Nucleo H7A3AI Board) into TouchGFX Designer ?The display I am planning to use is From RockTech Model number (RK043HN10E-T)The pin connectionsbetween the display and Nucleo H7A3AI Board is shown below. Si.NoConnector Pin NoDISPLAY PINSTM32H7A3ZI-Q(LCD)15R0PE026R1PA237R2PC1048R3PB059R4P
I'm trying out a test program to measure data rate between pc and mcu over usb.I'm using winusb with winusbnet wrapper on pc side and for mcu firmware i followed this github repo https://github.com/MichaelTien8901/STM32WINUSBto get it built with winusb support.On the device I have allocated 1024 byte TX and RX buffers for usb.And used the same code from the repo static int8_t CDC_Receive_FS(uint8_t* Buf, uint32_t *Len) { /* USER CODE BEGIN 6 */ extern volatile int8_t data_out_flag; #define RX_DATA_LEN 1024 uint32_t receive_len = *Len; if ((data_received + receive_len)> RX_DATA_LEN ) { receive_len = RX_DATA_LEN - data_received; if ( receive_len != 0 ) memcpy(RxData+data_received, Buf, receive_len); data_received= RX_DATA_LEN; } else { memcpy(RxData+data_received, Buf, receive_len); data_received += receive_len; } data_out_flag = 1; USBD_CDC_SetRxBuffer(&hUsbDeviceFS, &Buf[0]); USBD_CDC_ReceivePacket(&hUsbDeviceFS); return (USBD_OK); /* USER CODE END 6 */ }&nbs
ST Community highlights – April to June 2026
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.