Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Does HAL_RTC_AlarmAEventCallback work if the the MCU is in shutdown ?I am using RTC wake-up timer for wake/shutdown cyclingRTC alarm for shutdown trigger via HAL_RTC_AlarmAEventCallbackBut:RTC Alarm A interrupt never fires if the MCU is in Shutdown mode waiting for the RTC Wake-Up timer.For test purposes I am using the following values:Wake cycle set to 10 secondsShutdown cycle set to 5 secondsAlarm set to 28 secondsFrom power up the MCU should run as follows...1. Wake cycle for 10 seconds2. Shutdown cycle for 5 seconds3. Wake cycle for 10 seconds4. Shutdown cycle for 5 seconds..... but after 3 seconds the alarm time is reached (28 seconds). 5. When the alarm occurs.... RTC wake is disabled and WKUP pin wake is enabled, then shutdown is called.6. The MCU must not wake until the WKUP pin is detectedRefer to the timing diagram below...I was hoping that if the alarm occurs during the 5 second shutdown cycle it would call the alarm interrupt in the next wake cycle. But
../Middlewares/Third_Party/LoRaWAN/Mac/LoRaMac.c:1650:40: error: 'McpsIndication_t' {aka 'struct sMcpsIndication'} has no member named 'ResponseTimeout'1650 | ( MacCtx.McpsIndication.ResponseTimeout > 0 ) )| ^ The above error is occuring every time , if i remove this then adc_if.c is not found error occurs and I don't want to include the adc_if.c file in my code
In my STM32G431CBU6 implementation, COMP1, COMP2 and COMP3 are configured for back-EMF zero-crossing detection with TIM1 CH5 serving as the blanking source. Both rising and falling edge interrupts are enabled on the comparators. TIM1 channels 1, 2 and 3 generate PWM signals for motor MOSFET driving. Despite TIM1 CH5 blanking covering the entire PWM period, the comparator interrupts continue to be erroneously triggered by PWM switching noise
Hey everyone, I'm working on a project where I'm implementing an algorithm on an STM32H7. As part of the algorithm, I need to compute the square root of a matrix using Cholesky decomposition. I noticed that the CMSIS-DSP library includes a function called arm_mat_cholesky_f32. However, after including CMSIS-DSP through the ioc (X-ALGO middleware), I can't seem to find this function in my project. Am I missing something here?
Hi,I originally planned to program my STM32G030K6T6 via USB using the DFU bootloader, but the datasheet doesn’t mention USB_DM/USB_DP, and STM32CubeIDE’s .ioc file shows no USB option under Connectivity, so I believe USB DFU isn’t supported. What’s the best and easiest way to program this MCU, considering future mass production? I’m looking for a reliable, scalable method.Thank you for the assistance!STM32G0 Series Bootloader
Hey y'all!Sorry if this question is a little silly, I'm pretty new to Electrical Engineering and PCB design (this is my first ever PCB), but I've been having trouble with the board I designed for the STSpin32G4. I've been meaning to use it to do FOC control on a BLDC motor. I've been able to power the board via REG3v3/VDD and VSS at 3.3v just fine (including a blink test), but when I try to power the motor at 9V (using VM and PGND), the chip pops and I get some magic smoke. I replicated the process happening on one of my remaining boards in the video at this link. I've also attached the schematic that I was using, but can't figure out what I did wrong.Of note: I used all ceramic capacitors except for C21 and C22, they should be parallel lines in the schematic but I messed up when I originally created it, polarity shouldn't matter for those. Also, before posting this I accidentally had each corresponding Boot and Out (1-3) reversed, which on re looking over the datasheet, I realized and
Hi, i have been developing custom bootloader with start address at 0x08000000 and a main application at address 0x08003800 were i planned 14KB for bootloader and next 40kb for main app.i can see the bootloader works fine, but bootloader doesnt triggers the main app properly.were this is how i am pointing to the main apptypedef void (*pFunction)(void);pFunction Jump_To_Application;uint32_t JumpAddress;on this __set_MSP(*(__IO uint32_t*) APPLICATION_ADDRESS);were #define APPLICATION_ADDRESS ((uint32_t)0x08003800)could anyone help me to solve the isue?
Hello everyone, We're working on UART interrupts and would like to wake up the MCU from STOP1 mode to begin UART communication. We're using USART1 as the LoRa peripheral for VCOM instead of the default USART2, in a LoRa End Node architecture. I'm working on Nucleo board STM32WL55JC. At this point, we’ve successfully managed to wake up the MCU using a UART interrupt, but I'm having trouble identifying which callback is triggered when the system wakes up from STOP mode via UART. Our goal is to stay in Low Power Sleep mode after processing the UART interrupt. In this state, we would like to be able send data over uart constantly (what we have been able to do via the sequencer). Here are our Enter/Exit Stop mode: void PWR_EnterStopMode(void) { /* USER CODE BEGIN EnterStopMode_1 */ // Save peripheral states and de-initialize before entering stop mode // stop ADC conversions HAL_ADC_Stop(&hadc); // deinit SPI HAL_SPI_DeInit(&hspi1); // De-deinit I2C
Hi,I'm using the Zephyr platform with the STM32U5G9ZJ-DK2 board. I want to put the device into a low-power mode when it's not working. After modifying the DTS file and enabling power management, the device can enter and wake up from Stop3 mode normally. However, according to the datasheet, all IOs are in a floating state in Stop3 mode, but I need to control peripheral devices through some IOs. Is there any way for me to handle these IOs when entering and exiting Stop3, or can I choose to enter only Stop2 mode? Yang,BR
Hello All, I have created one project which is working on STM32H747i- Eval board with 800 x 480 resolution, now the project has to be migrated to 1024 x 600 resolution for larger display.I have migrated the backend code but now the Screen resolution is still 800 x 480 and the widgets are aligned to work with it.Now how shall I configure the project to 1024 x 600, I mean is there any to do it instead of manually adjusting the screens and widgets ?If there is any effective and better solution kindly do let me know ? Regards,Shiv
There is an inconsistency in the Reference Manual.The Reference Manual specifies on page 917 that:"Option 2) has the advantage of using the system without additional PLL. In addition, whenadc_sclk is twice faster than the adc_hclk clock, the latency between the trigger and thestart of conversion is fixed. This can be useful when the ADC is triggered by a timer and ifthe application requires that the ADC is precisely triggered without any uncertainty(otherwise, an uncertainty of the trigger instant is added by the resynchronizations betweenthe two clock domains)."At the same time, on page 1036 it says:"In synchronous clock mode, when adc_ker_ck = 2 x adc_hclk, there is no jitter in the delayfrom a timer trigger to the start of a conversion."Since adc_ker_ck is not the same as adc_sclk, and in fact will always be at least twice slower than adc_sclk, which of the two statements is the correct one?
Hi there Is there any stm32 MCU versions that has can run both CAN and USB simultaneously without conflicting with the PB8 boot pin? Also the USB will only be recognized if the PB8 pin is pulled high can i just directly connect it to 3.3v and always keep it on. will that be a problem
Hi, I am new to the field of ST Microcontrollers and am currently working on developing firmware for a product that utilizes the STM32 Microcontroller, specifically the NUCLEO-H7A3ZI board. We are using the design implemented on this board as a reference for our product. This product will be deployed at remote locations for data collection purposes, among other things. We have a requirement from our customer to frequently update the firmware on these deployed products. The most feasible option we have identified is to distribute the latest firmware on USB pen drives, which local technicians or end-users can then use to perform the update. Could you please explain the necessary steps to accomplish this firmware update process using a USB pen drive? You can explain the process of firmware upgrade using USB pen drive, by taking a simple example say :Hello world or a LED blinking program as an example. Once I learn how to do it for simple LED blinking program I can extend it to
Hello.. I'm designing a project using STM32F767 that upgrades firmware using USB Host 2.0. Could anyone advise on the following:1. any application notes regarding the hardware pin connection, schematic diagram or any EVK board?2. should i use USB_OTG_HS_DP, USB_OTG_HS_DM, USB_OTG_HS_VBus?3. Should i use the 4 wire USB female connector? with these pins VCC, D+, D- , Gnd? Please advise soon, thx woldes
Hello everyone, I encountered a problem while using the STM32H750 MCU. The hardware environment is STM32H750 + USB3300, which is used as a USB HOST HS to collect camera data. An LTDC interface is used to connect a TFT-LCD for display. An external SDRAM of 32MB is expanded, with a bus width of 16 bits. Currently, when both the camera data and the LCD frame buffer are in the internal RAM, the MCU works normally. However, when the LCD frame buffer is placed in the external SDRAM, the USB HOST fails to work properly.
Hello ST Community,I’m currently developing on the STM32H743 using STM32CubeIDE, with the following configuration:FreeRTOS v1 (CMSIS v1 style tasks)LWIP stack configured in RAW API mode (not using netconn or socket layers)Network communication is up and running, and TCP/IP works as expected.Requirement:I want to monitor or intercept the raw LWIP buffers, especially:RX and TX pbuf contentsPacket payloadsPCB-level metadata...but I want to achieve this without using:lwip_recv(), lwip_send()lwip_select() or POSIX socket APIsGoal:Build a diagnostic/logging mechanism to observe incoming/outgoing TCP/UDP packetsPossibly build a lightweight mirror/sniffer on the MCU itselfDebug real-time network traffic without affecting application-level task logicKey Questions:Can we hook into pbuf_alloc(), pbuf_free(), or similar functions to mirror buffer contents?Is there a safe and clean way to tap into the LWIP receive/transmit paths at the core level?Can tcp_input() or eth_input() be instrumented for m
"Can someone please check this code? It's for normal LoRa point-to-point (P2P) communication. I’ve attached the file with this post. The problem I'm facing is that a software interrupt is supposed to occur every second and trigger my scheduled task — but it's not happening. Please help me fix it."
Hi everyone,I'm encountering an issue with the reset cause on my STM32H723VE microcontroller.Whenever I perform either a software or hardware reset, the RCC->RSR register does not retain any value—it always reads as zero.Here’s what I’ve observed using Ozone:If I set a reset breakpoint, execution halts immediately after the reset, as shown in the image below. However, if I set a breakpoint at the first instruction of the Reset_Handler, and then press "Run", execution stops correctly—but by that point, the RCC->RSR register has already been cleared and reads all zeros. Has anyone else encountered this behavior? Could something be clearing the RSR register very early in the boot process, even before entering main?Any insights would be appreciated.Best Olaf
i'm successful to drive RGB LCD 480*272 with stm32cube IDE , but if i change to touchGFX and load into target , it have some following error , remark: simulator is OK
As I am using this particular motor, "GL30 KV290", to test with the eval. board "B-G431B-ESC1". Although I was able to profile the motor using the profiler and eventually control it using motor pilot, I would like to properly assess how we can achieve PID control effectively for the speed of the motor, and how to tune RevUP parameters.(1) I profile the motor using the following information: Magnetic Struct: SM-PMSM, Pole-Pairs: 7, Max. Speed: 3060rpm, Supply Voltage: 12V, Peak Current: 7.4ApkGL30 KV290 Gimbal Motor-Light 41g, Compact Φ34.5×15.7mmWith this link as the reference, pls check if i profiled the motor correctly?(2) Once I start to control the motor using motor pilot tool, I reach to this page as shown below:I only tested my motor with default auto calculated PID settings, and with speed adjustment the motor rotated at the set speed although not very constant. I don't really know to fine tune these settings to achieve proper PID speed control for the motor.
Hi, my name is Zaeem Ahmed.I'm currently digging into the STM32F1 HAL and trying to understand it at a deeper level. I'm intentionally not using STM32CubeMX — not because I have anything against it (it’s a great tool) — but because I want to read the HAL documentation and implement configurations manually to better understand what’s really happening under the hood.What I'm looking for:I would really appreciate any good resources, expert tips, or learning strategies that help connect:HAL APIs ↔ Hardware-level understanding from the reference manualThe challenge I'm facing:Often, when reading HAL documentation, I encounter vague or overly simplified explanations. For example:HAL_TIM_Base_Init vs. HAL_TIM_Base_MspInit — the documentation just says one initializes the timer and the other the MSP, which is obvious from the names but not why they're separated or how they work together under the hood.Another example:When initializing timers, there are different functions for different modes (
Originally a reply in this old thread: https://community.st.com/t5/stm32-mcus-wireless/not-able-to-disable-receiving-window-of-l072z-lrwan1/m-p/657145@Andrew Neil Sorry for Newbie question, so let's say I want to keep the rx window(in class C) open for 1 min (like a timeout), if no downlink message is received within this time, then instead of turning off the rx window(not sure how to do that), switching the class back to A will work. Am I right?
Hello,In our end-node application, the device occasionally needs to switch its operating class from Class A to Class C. This class switching is triggered by an external interrupt rather than a downlink message from the server.To achieve this, I am using the LmHandlerRequestClass() function from the LoRaMAC layer, which successfully switches the device to Class C. However, on the next Tx cycle, the device reverts back to Class A.How to ensure that the device remains in Class C after the class switch?
Hello.I am using STM32F745 to write to FLASH, but the write fails and the ERSERR flag is set.However, this ERSERR flag is*(__IO uint32_t*)0x080C0000 =data; /* (4) */*(__IO uint32_t*)(0x080C0000+4) =data2; /* (4) */If you comment out this part, it will not set.Why does the flag not set during erase operations, which should cause an erase error, but instead set during write operations?By the way, when only FLASH unlock and FLASH erase operations are performed, the selected sector is erased normally.I am seeking a solution to ensure that write operations to FLASH are performed normally.#define FLASH_SR_BSY (1 << 16) #define FLASH_SR_EOP (1 << 0) #define FLASH_CR_LOCK (1 << 31) #define FLASH_CR_SER (1 << 1) #define FLASH_CR_SNB (0x7 << 3) #define FLASH_CR_STRT (1 << 16) #define FLASH_CR_PG (1 << 0) #define FLASH_CR_PSIZE (0x3 << 8) void FLASH_UNLOCK(){ while ((FLASH.SR & FLASH_SR_BSY) != 0); if ((FLASH.CR & 0x80000000) !=
Hi everyone,I'm working on an STM32H7RS project (NUCLEO-H7S3L8) with the following setup:Bootloader in internal flash (0x08000000)Application in external OSPI flash (XIP) at 0x70000000Using FreeRTOSUsing TIM6 as the HAL time base (not SysTick)Configured using latest STM32CubeMX and STM32CubeIDE (v1.18.1)My current issue is that while HAL_Delay and TIM6 is working, SysTick seems not to work inside of the RTOS as soon as the scheduler starts.I noticed that because ther CPU got caught inside osDelay without throwing an error. I also already checked the NVIC, but it seems pretty fine to me. Did i otherwise miss something what i configured wrong inside my IOC file?
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.