Join discussions in the Product Forums. Ask questions, learn from your peers, and share insights on ST solutions to accelerate your design journey.
Most recent activity
in default situation, you could not call c++ function in C file. So the main.c is not suitable file in C++ project. if user choose C++ project,the generated main.c ,stm32h7xx_it.c should sufixed with .cpp.
I'm using the STM32H562. I'm trying to start an ADC conversion using output compare on a specified channel during the middle of an up-down count of a timer.Timer used: TIM8 running at 250 MHz, generating a 20 kHz periodChannel: 4Timing: At the peak of the up-down countPeripheral configuration:In TIM8_CCMR2, OC3M is set to 0001 to activate the signal when the counter matches the compare value.In TIM8_CR2, both MMS and MMS2 are set to 0111 to use Channel 4 as the trigger output.For ADC1 and ADC2, the trigger source is set to TIM8 TRG2.Although TIM8 has been started, the HAL status of the ADC conversion remains at 0xFF.I would like to know if there is any configuration I might have overlooked, or if there is a way to detect the start of ADC conversion for debugging purposes, such as using an interrupt. Here are the initialization procedures for TIM and ADC:/** * @brief TIM8 Initialization Function * @PAram None * @retval None */ static void MX_TIM8_Init(void) { /* USER CODE BEG
Good day! I use TIM15 and DMA1, channel 5 in STM32H743. If DMA and data have a size of 32-bit, then everything works fine. If you configure DMA on 16-bit data, then 32-bit data is still written to the TIM5 registers. In order to save memory, I want to write 16-bit values to the timer. In the documentation I read that DMA1 works only in 32-bit data mode. Is there any way to force DMA1 to transfer data to the timer in 16-bit mode, or even better in 8-bit? Andrey.
Hey,While doing UART communication between Arduino nano and STEVAL-ESC002V1 When i start my UART communication the control goes to function,void USART1_IRQHandler(void) { #ifdef UART_COMM uint32_t isrflags = READ_REG(huart.Instance->ISR); uint32_t cr1its = READ_REG(huart.Instance->CR1); /* -----------UART in mode Receiver ---------------------------------------------------*/ if(((isrflags & USART_ISR_RXNE) != RESET) && ((cr1its & USART_CR1_RXNEIE) != RESET)) { if ((huart.gState!=HAL_UART_STATE_TIMEOUT)&&(huart.gState!=HAL_UART_STATE_ERROR)) { huart.gState = HAL_UART_STATE_READY; huart.RxState &= ~HAL_UART_STATE_READY; huart.RxState |= HAL_UART_STATE_BUSY_RX; if (UART_Receive_IT(&huart)==HAL_OK) { UART_Set_Value(); } } /* Clear RXNE interrupt flag */ __HAL_UART_SEND_REQ(&huart, UART_RXDATA_FLUSH_REQUEST); } /*------- UART in mode Transmitter (transmission end) -----------------------------*/ if(((isrflags & USART_ISR_TC)
All, My team is looking at designing a PCB around the STM32U5G9-DK2 development board and are running into some issues. The development board uses a flash memory IC "MX66LM1G45GXDI00" but the BSP example driver for the board only contains "MX66UW1G45G" information.https://github.com/STMicroelectronics/STM32CubeU5/tree/main/Projects/STM32U5G9J-DK2/Examples/BSP/Inc Is there a reason the development board only references this other flash memory IC in CubeIDE and if so will this driver still work for the development boards IC? Thank You,
Hi everyone,We are using STM32H755ZIT6 with external QSPI Flash in memory-mapped mode.After long runtime, we see an issue where the RTOS event returns resource unavailable (-3) even though the UART buffer has received complete data. We suspect it might be related to QSPI, because our QSPI trace length is around 66 mm. Our question::backhand_index_pointing_right: If any data or byte is missed during QSPI (memory-mapped) read, can this cause the system to get stuck or RTOS events to fail? Anyone faced similar behavior or can confirm this possibility?
My design is based off STM32MP257F-EV1. In which a RTL8211F-CG Ethernet Transceiver is used. My question is on Pin 39 (RSET) of the transceiver. A 2K49 resistor is used. Where does this value come from? Is it a recommendation from Realtek supplier?
I've searched and not found anything describing this behaviour (on the internet or this forum, which I've found to be an incredible resource so far - thank you).I have a configuration where I go into STOP, exit out of STOP via EXTI, start TIM1, allow the stack to unwind to leave HAL_PWR_EnterSTOPMode(), and then SLEEP. With this sequence, I expect a TIM1 interrupt but never hear one.Conversely, if I enter SLEEP instead of STOP for the very first step but perform all of the other steps identically, I get the behaviour I'm looking for - an EXTI, then a period asleep, then a TIM1 callback. This tells me that the STOP is interfering with the configuration of the timer somehow, in a way that I haven't been able to figure out how to recover from.I've tried, after exiting STOP, to re-issue a call to HAL_TIM_Base_MspInit and MX_TIM1_Init but this has not helped. Removing the final SLEEP and spin-waiting has also not helped.Why might this be happening? Where should I start the debug e
Hi, I am currently trying to make a single pulse test jig I can use to test MOSFETs in an series resonant converter. I am using the STM32F411CEU6. I am trying to make a state machine that can make these signals at two different pins. The two variable periods I would like to control with a potentiometer connected to ADC1_IN1 and ADC1_IN2. However, I only see a high pulse on one of the output and only low on the other. I am trying to use TIM2 as an output compare timing mode where I am using the four different channels and their respective CCRx to toggle the output how I want them. I have tried debugging my code. And it seems like the interrupt fires from the CC1IF but when I am checking in the flag is set it has already been reset and my if sentence won't run. I have attached the code under you would be so kind to take a look. Thanks /* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief :
Description:When configuring DDR parameters for STM32MP257 in STM32CubeMX, I changed the DDR speed bin:Speed_Bin: DDR4-3200AA 22-22-22 → DDR4-2933Y 21-21-21After generating the code:The device tree were updated correctly according to the new timing values.However, the generated Device Tree files (.dts/.dtsi) did not change at all.This is confusing. The DTS still reflects the previous configuration even though the DDRCTRL/DDRPHY timings have been modified. Questions to ST:Is this a known limitation of STM32CubeMX (i.e., CubeMX does not update DTS when DDR timing changes)?Should the Device Tree be updated automatically when the DDR Speed_Bin is changed?The current behavior looks like a potential bug or an unimplemented feature in CubeMX, as it may lead users to believe DDR configuration did not take effect.Thank you.
Hi all,I recently updated the IDE to v1.19 and MX to v6.15.0, and the MX code generation is no longer working for me.After some testing, I found out I can create new projects and code is (apparently) well generated. After this first generation, if i change anything in CubeMX and regenerate, the .ioc file is updated accordingly but the code is not changing at all.My device is STM32U575VG (FW package 1.8.0).As an example I created a project with just TIM1, generated the code, added TIM2 through CubeMX and renegerated.I attach the first .ioc file (DELME_New_Project.ioc) and the updated (DELME_Updated_Project.ioc) for reference. The code has not been updated:Any ideas? Am I missing something? Is anyone else facing this problem?Alex
Hi all,I have developed a bootloader for STM32F412, the bootloader works perfectly, however, when I change the user app to be FreeRTOS based, it ceases to work.I added a blink led in the Hard Fault in both the bootloader and app, but both were not triggered.Any idea what is going on?void jump_to_application(void) { void (*app_reset_handler)(void); uint32_t msp_value = *(volatile uint32_t*)(APP_START_ADDRESS + APP_HEADER_SIZE); uint32_t reset_handler_address = *(volatile uint32_t*)(APP_START_ADDRESS + APP_HEADER_SIZE + 4); __disable_irq(); HAL_RCC_DeInit(); HAL_DeInit(); SysTick->CTRL = 0; SysTick->LOAD = 0; SysTick->VAL = 0; for (uint32_t i = 0; i < 8; i++) { NVIC->ICER[i] = 0xFFFFFFFF; NVIC->ICPR[i] = 0xFFFFFFFF; } __enable_irq(); __set_MSP(msp_value); __set_PSP(msp_value); __set_CONTROL(0); app_reset_handler = (void*)reset_handler_address; app_reset_handler(); } Thanks in advance.Regards,
I have a design running on 24V SLA batteries using STEF01 fuses for protection of the lower powered rails and an LT4356 using external MOSFETs for a 25Amp rail. That 25A rail is giving me headaches. Staying within the SOA of the MOSFETs is not that easy when the output is started up shorted, and even though it works on the bench it fails from time to time in the field. The STEF01 fuses have been performing flawlessly. Now, the load on the 25A line is a parallel wound DC motor and an external motor controller. The field winding is powered directly from the 25A line, the armature is powered by external electronics which takes some time to power up. Thus, the load on the 25A line is both a large capacitance (external electronics input capacitance; 3000+uF) parallel to a large inductor (oh joy. Yes, I do have transient voltage limiting..). I cannot change this arrangement. I wonder if I could parallel 5 or 6 STEF01 fuses by interconnecting UVLO/dvdt/Vclamp/E
Hello,I’m looking to identify this component: SY DATAMATRIX 426.Thank you very much for your help.
We are working on a custom board based on STM32MP257F-AI3. We flashed an X-Linux RT patched image via SD card in boot mode 0001(A35-Master), and in the ST Cube Programmer flashing completed successfully with a "download successful" pop-up in when boot mode USB/UART switches configuration is 0000.After powering off, we set the boot switches to 0010 (eMMC boot, A35 master), but the board fails to boot properly from eMMC.Could you please help us identify:Whether the image correctly written to the eMMC boot partitions (FSBL, SSBL, U-Boot, etc.)?Any mandatory post-flash steps required for enabling eMMC boot on STM32MP257?The correct boot configuration (TF-A, OP-TEE, U-Boot, extlinux or boot partition flags)Any guidance on debugging or verifying the eMMC boot flow would be helpful.
Hello,I am trying to use STM32Cube Monitor USB PD with custom board.I see ST link v3 minie on a trace port. but I can't see any traces at all. Is there a dedicated package in CubeMX i can enable to see USB-PD traces ? Thank you.
Hello Team,To address mass Programming of Customized board , Looking help to have Batch File / Python Script which accomplishes Following Task :1. Flash The Hex file2. Set RDP13. Read UID (96-bit ) of MCU4. Log UID and Time into CSVI tried with batch File using STm32Cube Programmer CLI.exe , but Failed to connect with ST-Link.yes, I am Using SWD Debug Interface. I am not sure uf any scripting Template is alraedy ready with CubeProgrammer.
I’m using STM32WL5MOCH6STR and want to add STSAFE-A110 for security in a LoRaWAN application.I want to know:How to use STSAFE-A110 for authentication, key storage, encryption and secure boot & secure firmware update.Which software packages are needed to implement this security feature(like X-CUBE-STSAFE, X-CUBE-LRWAN, or others)?Is there any example or application note for STM32WL + STSAFE-A110 integration?Kindly let me know if there are any ways or recommended methods to achieve security with help of STSAFE-A110 with STM32WL MCUs.Thanks in advance!
Hi, I am using a NUCLEO-G474RE with the X-NUCLEO-SRC1M1 board. I have created and configures the project according to https://wiki.st.com/stm32mcu/wiki/STM32StepByStep:Getting_started_with_USB-Power_Delivery_Source I am monitoring the board with the UCPD Monitor, configured one 9V 3A PDO and connected a 9V 3A PSU. My issue is that some devices (mobile phones) charge slowly, some dont charge at all and some charge at full speed. The PD negotiation seems to work in all cases, the 9V is present at TP1 in all cases. My suspicion is that the unused CC line (VCONN line) is not being powered by the board. I tried implementing the VCONN based on this post, but was unsuccessful: https://community.st.com/t5/stm32-mcus-embedded-software/does-the-latest-stm-usb-pd-core-stack-support-electronically/td-p/220555 I have attached the Traces, a capture of the CC1/CC2 lines and my project. These are with a phone connected that does not charge at all. With other PD supplies, the phone charges without prob
Hello, (L6562DTR)I have encountered some problems when using this chip and hope to get some suggestions from you; ”The PF output voltage of 480V FC load is 0.7435“ The power input voltage is 250V-528VAC, with PFC+ flyback. The PFC BUS voltage is 760V, and the power output is 150W;When the input is 480VAC and the output is fully loaded, the THD is abnormal, ranging from 10% to 20% (5% for normal products), and at the same time, the PF value also drops and there is noise from the power supply How can this problem be&nb
Using CubeMX v6.15 on Windows 11I tried generating a project for MP257-EV1 selecting the M33-Master option"Initialize all peripherals with their default Mode = YES"Without making any changes, the Pinout tool shows an error (red encircled X) for TAMP and warnings for RCC and when trying to generate code, it issues this WARNING:- Main Config: These peripherals still have some not configured or wrong parameter values: [RCC, TAMP]How does one go about fixing these issues?
MCU : STM32U5G9ZJT6QExternal Flash : MX25LM51245GSPI Interface : HSPI1 When I use STM32_Programmer_CLI.exe I cannot erase the external flash.Board info: I get following error from STM32_Programmer_CLI.exe: STM32_Programmer_CLI.exe -c port=SWD -el "C:\Users\USER\Desktop\Workspace\External_Loader\MX25LM51245G_STM32U5G9ZJ\Project\EWARM\Debug\Exe\MX25LM51245G_STM32U5G9ZJ.stldr" -e all-------------------------------------------------------------------STM32CubeProgrammer v2.20.0-------------------------------------------------------------------ST-LINK SN : 56FF70067287555130422267ST-LINK FW : V2J46S7Board : --Voltage : 3.21VSWD freq : 4000 KHzConnect mode: NormalReset mode : Software resetDevice ID : 0x476Revision ID : Rev ZDevice name : STM32U5Fx/5GxFlash size : 4 MBytesDevice type : MCUDevice CPU : Cortex-M33BL Version : 0x90Debug in Low Power mode enabledMass erase ...Error: Mass erase operation failed.Please verify flash protection How ca
Hello Expert, I am reaching out regarding some persistent issues I am facing with MCSDK 6.41 on the STM32F303EVAL control board with the STEVAL-IPM-NM2S. I suspect there may be bugs or configuration issues. Background: I previously purchased two boards, and neither motor ran correctly during initial experiments(external opamp case motor work fine) I have now purchased a fresh STM32F303EVAL board and intend to use the internal op-amps and comparators as before. Using external op-amps allows the motors to run, but with internal op-amps, the motors do not start. I followed previous technical support guidance: Set HTMIN2 = 1 and applied the new configuration. Replaced the file r3_2_f30x_pwm_curr_fdbk.c in project\MCSDK_v6.4.1-Full\MotorControl\MCSDK\MCLib\F3xx\Src\ with the attached version. Reduced the PWM pulse width. Observed Issues: Motor 1 always faults (mostly fault code 32), whereas Motor 2 runs without issue. I have tried more many times to play with parameters, s
OS: Ubuntu 24.04.2CubeProgrammer Version: 2.20.0Board: STM32F407G-DISC1Firmware Version: V15J63M63I am having intermittent connectivity issues with my discovery board and the STM32 IDE/Programmer. My system is able to detect the discovery board as it shows up when using the Linux command: lsusb. When launching the CubeProgrammer application it is able to (sometimes) detect the board after configuring the settings properly; after which the board setting are populated (see pic below)When trying to connect to the board, however, I receive fluctuating error message (see pic below). It is either the DEV_USB_COMM_ERR or the No debug probe detected errors. I am not sure what causes the errors to change but it usually happens when I reset the board because CubeProgrammer was unable to detect it and I am attempting to reestablish the connection (just having the board detected, not pressing the CONNECT button).The LD1 color is also intermittent and goes from RED to GREEN depending
Hello ST, We are using the STM32WLE5 controller in our product.The system always works on 1.8V. Based on demand, we switch to 3.3V and fallback to 1.8V.Our product is IoT-based, charged through solar to a supercapacitor.The main problem is that the controller is booting from the embedded bootloader even after setting boot options, which I will describe later.We require that it must boot from the user flash, not from the system bootloader, because a few GPIOs, like PA4 and PA7, used in the internal bootloader for SPI are used in our circuit, which turns on the supply of some components, which can consume a lot of power, and the power line goes down below 1.71V, which results in restarts while boot up if there is no enough charge in super capacitor.The settings that I use to boot from the user flash mentioned below,1. I set BOOT_LOCK, and based on the boot table here in the section "2.2 Boot configuration", it must boot from the user flash, but no luck.2. Here I clear the
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.