Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hello! This is the first time I'm using an STM32L0 (...11F4Ux) and also the first time I've tried implementing an I2C IRQ Handler. The code snippet mostly works, but there's a bug in which a READ commands sends data from the previously requested register, giving bad data. Basically, the data I receive is old by 1 request, which tells me this IRQ Handler is not handling the repeated start correctly. The exception to this is that the very first READ command is correct when I start up I2C tools on a RP5. I've been trying to figure out this bug for a couple of days now, so I'd really appreciate any help from more experience developers, thank you!Details:Flash limited to 16KB, so using LL drivers onlyThis snippet is broken out into its own file and is called by I2C1_IRQHandler();WRITE commands work perfectly fineWhen placing a stop at the LL_I2C_TransmitData8(I2C1, tx_val);, I get data from my previous command without this line executing. Master: Raspberry Pi 5
On the STM32F303K8, is it possible to configure e.g. PA8 to both receive an EXTI interrupt on falling edge and act as the TIM1CH1 input to trigger source TI1FP1, in turn serving as a timer gate for gated mode? I cannot find a way to express this through MX, which usually means it isn't possible at all, but perhaps it could be done through explicit HAL calls.
Hey everyone,I'm currently trying to integrate the STM32 FP-AUD-AEC-1 software package in a multithreaded environment (ThreadX) on an STM32wb55rev7 mcu chip. Library compiles and runs but eventually hard faults during thread initializations. Any advice or help would be appreciated, and if there's any additional info needed please lmk.
Hi community,Before I start discussing my specific issue, I would like to know if dual USB host operation is allowed on STM32H7 MCUs. The H7 MCU has both FS and HS USB cores, and I want to configure both FS and HS as USB hosts, not using the OTG feature. The HS USB core will also run in full-speed host mode without an external PHY, with each host having its own USB port. Are there any potential issues with this configuration?I encountered unexpected behavior during project development: USB FS MSC class functionalities were affected when devices were plugged into the USB HS port.Here is my USB class setup:The USB FS core is registered with two classes — MSC class and a custom printer class.The USB HS core is registered with a HID class.All classes worked individually.If no device is plugged into the USB HS port, the USB FS port works normally. It prints correctly when connected to a thermal receipt printer and creates text file reports using FATFS when connected to a flash drive.However
Hello,I'm trying to use the GPU2D on the STM32N6570-DK, with NemaGFX.However, the GPU hangs on random functions.Well actually every time the same funtions, but depending on the number of functions to be executed, so it seems it can only execute a limited number of functions, and the it hangs.And many of these doen't even complete the drawing of the shape. The nema_vg_draw_circle doesn't complete drawing the circle and hangs. When only drawing the rounded rectangle results in an incomplte draw and hang of the function: If I remove some functions, the app hangs on nema_cl_wait.I think it might be related to the buffer initialization in nema_hal.c, or that nema_hal.c contains other errors./* * File : nema_hal.c */ /* Includes ----------------------------------------------------------------- */ #include <stdlib.h> #include <string.h> #include "tsi_malloc.h" #include "nema_sys_defs.h" #include "nema_core.h" #include "nema_vg.h" #include "main.h" /* Include pl
Hi everyone,I'm new to STM32 and I'm using Debian Linux with the STM32CubeIDE.I'm trying to use a NUCLEO-G431RB with the X-NUCLEO-IHM07M1 expansion board, using the legacy X-CUBE-SPN7 (apparently the X-Cube-MCSDK is Windows-only...)I've run into a pin conflict: the expansion board expects the PWM signals on the Arduino standard pins, but on the G431RB those pins are physically connected to separate timers (TIM2, TIM3, TIM8, etc.).My understanding is that the 6-step libraries (and motor control in general) seem to prefer using a single advanced timer (like TIM1) for synchronization.Does this timer conflict make sense? As a last-case scenario, I thought of just connecting both boards using jumper wires (mapping TIM1 outputs to the IHM07M1 inputs) instead of mounting them on top of each other. Is there a known workaround for this?Thanks!
Hi,I am using a EVSPIN32G02Q1S1 with LIN motor (BL23E33-01D-04RO) running in sensor-less only with 6-step moving 1 time with 1 turn and stops. I cannot connect Motor Pilot to the board for some reason (using the boards built in USART output to a RS232/TTL converter).I have tried this before with a EVPSPIN32F0601S1 and the LIN motor running at 50VDC and reset the motor parameter from 24VDC to 50VDC to match the minimum of the Inverter board both sensor, sensor-less and FOC and 6 Step with the same result but using the Motor Pilot, it kept coming back with Over Current no matter what I changed. My supply is 50VDC and runs up to 7 amps, and the current monitor I have connected in line says I am only pulling 0.5 amps when the over current occurs.So, my question is this.Does the Motor Work Bench change the parameters of the system settings to match the inverter and motor pair or is that up to me to do?Any help on this would be great. Thanks in advance.Charles
Hi i am working on a project with STM32H7A3VGT6 chipset which has LTDC controller. my goal is to make a LVGL based UI with SquareLine Studio and interface a 24 bit parallel RGB display with it . so i have made a UI using SquareLine Studio and imported to my project but the issue is when i try to build it it says flash overflowed. i know that the UI takes so much space but the spec of STM32H7.. says it mas 1 MB RAM . later in the linker script i saw it uses dual bank flash not single , so can i use it like this to make it work ? and any one can explain why is the RAM is also divided? MEMORY { ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K /*FLASH2 (rx) : ORIGIN = 0x08100000, LENGTH = 512K*/ DTCMRAM1 (xrw) : ORIGIN = 0x20000000, LENGTH = 64K DTCMRAM2 (xrw) : ORIGIN = 0x20010000, LENGTH = 64K RAM (xrw) : ORIGIN = 0x24000000, LENGTH = 1024K RAM_CD (xrw) : ORIGIN = 0x30000000, LENGTH = 128K RAM_SRD (xrw) : ORIGIN = 0x3
Hi everyone, my custom board previously had an STM32F746BGT6. Since we were looking for a microcontroller with a graphics accelerator, we opted for the STM32H743BIT6 (which is pin-to-pin compatible). All the peripherals work, but I'm having trouble initializing the SDRAM (IS42S16160G-6TL). I set the clock to 216 MHz on Cube, and with a prescale of 2 and an oscilloscope, I get 108 MHz. However, the program crashes (neither returns an error nor continues) when I send the PALL configuration.I'm keeping the same declarations in the previous version (STM32F746BGT6), which is currently working. How can I fix this? static void MX_FMC_Init(void) { /* USER CODE BEGIN FMC_Init 0 */ /* USER CODE END FMC_Init 0 */ FMC_SDRAM_TimingTypeDef SdramTiming = {0}; /* USER CODE BEGIN FMC_Init 1 */ /* USER CODE END FMC_Init 1 */ /** Perform the SDRAM1 memory initialization sequence*/ hsdram1.Instance = FMC_SDRAM_DEVICE; /* hsdram1.Init */ hsdram1.Init.SDBank = FMC_SDRAM_BANK2; hsdram1.Init.Column
There have been previous posts about determining how the DFU serial number is formed from the 96-bit Unique ID. However, when using the ROM bootloader for the STM32F723xx MCU I don't see unique serial numbers at all. I am always seeing the same DFU serial number in the iSerial string of the USB descriptor set to "STM32FxSTM32" no matter which device I query. I haven't found any mention of a setting that I need to configure in order to enable unique serial numbers for DFU, but I was hoping that someone in the community might have a suggestion. Or at least be able to confirm that it is expected behavior for the DFU serial number to always be "STM32FxSTM32" for all of my STM32F723xx MCUs.Thanks for the help!
Post edited by ST moderator to be inline with the community rules for the code sharing. In next time please use </> button to paste your code. Please read this post: How to insert source code.Hi,I am new to STM32 and I have to do a data acquisition board project using the STM32H7 MCU.I have the STM32H753XI-EVAL evaluation kit and I am trying out all the features one by one.I'm currently working on the DAC, which I have configured on CHANNEL2 on PA5. I am trying to start it up, send it a value, and then get its value to check and measure it using a voltmeter on PA5 of CN6 on the evaluation board.DAC1_Init : static void MX_DAC1_Init(void) { /* USER CODE BEGIN DAC1_Init 0 */ /* USER CODE END DAC1_Init 0 */ DAC_ChannelConfTypeDef sConfig = {0}; /* USER CODE BEGIN DAC1_Init 1 */ /* USER CODE END DAC1_Init 1 */ /** DAC Initialization */ hdac1.Instance = DAC1; if (HAL_DAC_Init(&hdac1) != HAL_OK) { Error_Handler(); } /** DAC channel OUT2 config
Hello,I am working with an STM32WBA65RI that is on our custom board, and working to reduce our power usage. Along this journey I found the issue with the HAL_PCD_MspInit() / DeInit() where the logic for the RCC PWR was inverted, which was another post I made.On our current hardware, I am noticing a large jump in current draw at the function call for __HAL_RCC_USB_OTG_HS_PHY_CLK_ENABLE() in HAL_PCD_MspInit().Just prior to the function call, the board is drawing 7.5mA, and immediately following the call it is drawing 33.09mA.I also tested this against the NUCLEO-WBA65 board, measuring across JP2, and see a jump from 3.05mA to 11.99mA, which seems more reasonable, albeit still quite large (according to DS14736, the max power draw from the OTG_HS PHY should be 5.7mA):For reference, our board has the following power setup:VBAT is 3.9 (for this test I am using a power supply). This feeds a PMIC (MAX77658). The PMIC takes the 3.9V in and creates a 3.3V using an internal switching regulat
I have a set of BLE characteristics set up, and working ok. The project uses FreeRTOS. I want to be able to have the stm32wba65 sleep in low power, then wake up at a specific time of day. After wakeup,I have a 5-second RTOS timer to take a series of measurements. Once all measurements are taken, the stm32 should sleep again. I want to set the time of day once from a PC over BLE, then disconnect and have the stm32 go to sleep. I have a 32kHz oscillator providing LSE, which seems to be running ok, as the startup code does not hang waiting for LSE to start. If I try to put the RTC into "Free running BCD calendar and binary mode" in the .ioc file then the RTOS timer no longer fires.To summarise, I need:BLElow power sleepwake at specific time of dayRTOS timers once awake.Does anyone have an example of this type of scheme?
Hi, this is my first post here and one of my first experiences with the STM32.I'm working on an STM32H7A3ZI-Q development board. I've connected an Adafruit PDM microphone to SAI1_A with clock on PE2 (SAI1_CK1) and data on PE6 (SAI1_D1). I'm not an expert on PDM microphones; I used to acquire analog data from an amplified microphone with an ADC and timer 2 (everything worked perfectly) and then transferred the data via UART to my PC, where I listened to it with a Python script.Now I need to switch to a PDM microphone.Now, I've configured this PDM MONO microphone to be used in PDM mode with CK1, with an 8-bit data size and a 16-bit frame, the same slot size as the data, 2 slots (the IOC forces me to use even numbers), free protocol, and asynchronous sync input.I get the peripheral clock from PLL2 and it's 40.96 MHz. I set the frequency divider after init (the HAL code generator doesn't generate the correct divider) to get a 1.024 MHz output to the microphone, and the oscilloscope shows t
Hi,Using STM32F429VET trying to achieve FOC with single shunt resistor over 3phase bldc motor.I am using TIM1 and corresponding CC2, CC3, CC4 as PWM channels. CC1 is used to trigger ADC in regular mode reading current over shunt resistor in S1 and S2. The PCLK2 is at 96MHz, ADC divided by 4. That all seems not to be enough.I am struggling to achieve precise and yet fast enough reading. The final PWM frequency is 20kHz in center aligned mode. The motor has to move in 1/100 duty but that seems to be unable to achieve because of timing windows to read ADC. Dead time is at overall 500ns, given that the overall 25uS I have in center aligned mode, all time is crucial.I am already doing all the magic stuff like using DMA to trigger ADC reading based on CC1, DMA to do TIM CCx updates upon Update events (shadowing CCx).I heard about FOC control from MC Workbench but am I supposed to do incredible stuff to create my own board and inverter through declarations to get it? This seems ridicoulous wh
Dear ST Support Team,I would like to ask about the compatibility of using the X-NUCLEO-67W1M1 expansion board based on ST67W611M1 with the NUCLEO-F446RE development board.I had read the **X-CUBE-ST67W61 Data brief document on page 3** "The X-CUBE-ST67W61 Expansion Package runs on STM32 32-bit microcontrollers based on• The Arm® Cortex®‑M33 and Cortex®‑M55 processors with Arm® TrustZone®• The Arm® Cortex®‑M7 processor"So, my questions are:1. Is the X-NUCLEO-67W61M1 hardware compatible with NUCLEO-F44 (Cortex M4 processor)? 2. Can I use raw SPI + AT commands without X-CUBE-ST67W61?, Has anyone done this on F44(Cortex M4 processor)? 3. Any known working example or GitHub project for (Cortex M4 processor)+ X-NUCLEO-67W61M1?
Hello all,I’m hitting a USB edge case on an STM32H573 in the 68-pin package (no VBUS sense pin, no VDDUSB domain).My setup (works fine in application):The product is self-powered (3V3 is always on). Because the package has no VBUS_SNS, I detect bus presence with a VBUS → resistor divider → buffer → GPIO (interrupt). My firmware only enables the USB device and D+ pull-up when this GPIO says VBUS is present, so we don’t “attach” or back-power a sleeping PC. That part is solid.The problem (ROM bootloader only):When I enter the System Memory bootloader and select USB DFU, the ROM seems to bring up the USB device and assert the D+ pull-up even if VBUS is absent (e.g., cable plugged into a powered-off PC or an unpowered hub). That effectively signals attach and can source current toward the host through D+/ESD paths—i.e., not USB-compliant for a self-powered device.Easy repro:H573 68-pin board, self-powered 3V3.Ensure no VBUS (PC off / hub unpowered).Boot to System Memory → USB DFU.D+ goes h
Configured WWDG timer in CM7 core of stm32h747I-disco and i have taken a window period of 10msec to 50 msec and configured according to that in cubeMX. also enabled Early Wake up interrupt and Window watchdog interrupt.i am trying to check interrupt call back WWDG_IRQHandler() before reset as per reference manual rm0399.issue: Core Reset is happening properly but WWDG_IRQHandler() is not getting called before reset
Post edited by ST moderator to be inline with the community rules especially with the code sharing. In next time please use </> button to paste your code. Please read this post: How to insert source code Hi, On checking, I noticed a mismatch between the expected sampling frequency (44.1 kHz) and the actual frequency (46.875 kHz). Could this be the cause of the noise? Any suggestions on what might be going wrong? For reference, I’m using SAI1_A with circular linked-list channel 12 of GPDMA1. The configuration details for SAI and GPDMA are provided below. GPDMA Configuration: handle_GPDMA1_Channel12.Instance = GPDMA1_Channel12; handle_GPDMA1_Channel12.InitLinkedList.Priority = DMA_HIGH_PRIORITY; handle_GPDMA1_Channel12.InitLinkedList.LinkStepMode = DMA_LSM_FULL_EXECUTION; handle_GPDMA1_Channel12.InitLinkedList.LinkAllocatedPort = DMA_LINK_ALLOCATED_PORT0; handle_GPDMA1_Channel12.InitLinkedList.TransferEventMode = DMA_TCEM_LAST_LL_ITEM_TRANSFER; han
Hello everyone,I am working with the STM32N6570-DK discovery kit and I have encountered a strange behavior that I cannot explain.When I use the ST-provided example projects that include both an FSBL (First Stage Boot Loader) and an Application image — for example:Template_LRUNTemplate_FSBL_XIPJPEG_EncodingFromOSPI_DMAthey fail to run correctly on my STM32N6570-DK boards.However, the exact same projects (same binaries, same flashing procedure) work perfectly on another identical STM32N6570-DK board (I was able to test the same projects on another STM32N6570-DK discovery kit provided by a friend).Interestingly, simpler examples that only contain an FSBL project (for example GPIO_IOToggle) work fine on my board.Before testing the ST-provided examples, I had tried to debug my own application on the same board.During debugging, my code ended up in a HardFault error, and since then, it seems that any project which includes both an FSBL and an Application can no longer run properly on this bo
Hi,I want to use LPTIMx to output a PWM signal that changes duty cycle on each period with DMA. The HAL driver implementation for LPTIM PWM is completely wrong, so I tried to find out how to do this from TRM etc.LPTIMx has 3 DMA request events:2xCCRx: Can only be used in input mode for input capture, not with output.1xUP: Update event, which is exactly what I need here. However, it is not a regular single/burst transfer but some sort of hw block mode (DMA channel needs to set BREQ=1 to connect to this request line).LPTIM has another special thing: It only requests a new DMA request once the ARR register is written.So I can write a single register (it does not support burst), and it needs to be ARR or I will never get another DMA request again (with dest address set to ARR register): /* GPDMA2_REQUEST_LPTIM1_UE Init */ NodeConfig.NodeType = DMA_GPDMA_2D_NODE; NodeConfig.Init.Request = GPDMA2_REQUEST_LPTIM1_UE; NodeConfig.Init.BlkHWRequest = DMA_BREQ_BLOCK; NodeConfig.Init.Dire
Title machine-translated to English.结果3412问题
Hi Team, I am working on project where we are implementing Secure upgrade feature using SBSFU package, we followed the steps as mentioned by ST community and to integrate SBSFU in our project. we have two modes Debug mode and Release mode.in Debug Mode: below Protection flags are disable#define SFU_WRP_PROTECT_ENABLE#define SFU_RDP_PROTECT_ENABLE#define SFU_TAMPER_PROTECT_ENABLE #define SFU_DAP_PROTECT_ENABLEand bootloader and application are working fine. we can see the software upgrade is happening. In Release mode:all above Protection flags are enable. bootloader is not working I think it is not coming up properly.I can see through STMCubeprogrammer the protection changes applied to flash.worst part is, I couldn't debug bootloader code.it would be great somebody help me in building SBSFU in Release mode.Thanks in Advance.
Hi I'm playing around with the RTC & tamper peripherals of the NUCLEO-H7S3L8. I'm wondering if the TSOVF can be set when multiple tampering are detected in VBat mode ? If I'm not mistaken, the RM doesn't say anything against it. However, using the RTC_Tamper example, I notice that it's not the case. When connecting back the main power, the tampering is detected and the timestamp generated corresponds to the first event but TSOVF is not set.Could anybody confirm that behavior ? Regards.
Hi everyone,I’m trying to generate a square wave using TIM5 Output Compare (OC) on an STM32H7 board. I configured TIM5_CH1 to output on PA0, both in CubeMX and manually in HAL_TIM_MspPostInit(). Here is a snippet of my GPIO init: GPIO_InitStruct.Pin = GPIO_PIN_0; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; GPIO_InitStruct.Alternate = GPIO_AF2_TIM5; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);And the TIM5 channel configuration:sConfigOC.OCMode = TIM_OCMODE_TOGGLE; sConfigOC.Pulse = 3749; HAL_TIM_OC_ConfigChannel(&htim5, &sConfigOC, TIM_CHANNEL_1); The problem is that the square wave always appears on PA1, not PA0, even though I haven’t configured TIM5_CH2 anywhere.I checked the datasheet pin mapping:PA0 → TIM5_CH1PA1 → TIM5_CH2PA2 → TIM5_CH3PA3 → TIM5_CH4I suspect this might be related to alternate function routing or some hardware conflict on PA0 (maybe boot/debug pins), but I’m not sure
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.