Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hello everyone,I have designed a custom PCB using STM32F103RBT6 and I’m facing a serious issue:The MCU is not getting detected by the programmer.Symptom:When connecting via SWDIO, SWCLK, 3.3 V, and GND, both STM32CubeProgrammer and ST‑Link Utility fail to detect the target.Power rails are verified: 3.3 V present at VDD pins, proper decoupling capacitors placed close to supply pins.No shorts observed on the board.Important hardware details:Boot0 pin (on my design) is directly tied to GND by mistake – I’m wondering if this could block programming or reset behavior.NRST pin has a 10 kΩ pull‑up to 3.3 V as recommended.BOOT0 is pulled low (GND) on the board without Resistor, any problem? Any advice would be greatly appreciated!schematic snippet attached. Thank you in advance for your help.
Hi there,I tried to add support for a PDM microphone, but so far I could only get 0's from DMA. Somehow, the polling method (HAL_SAI_Receive) did return non-zero values. Here is how I set up the SAI and DMA:I did so by modifying our project's existing STM32CubeMX file.The PDM microphone was connected to the MCU via:PA10 (SAI1_D1)PB8 (SAI1_CK1)The SAI A has the following configurations:Mode: PDM using MicroPhones pair (1-2) and CK1 as clockClock Enable: Pdm Clock1 EnableProtocol: FreeAudio Mode: Master ReceiveFrame Length: 16 bitsData Size: 8 bitsSlot Size: DataSizeOutput Mode: MonoCompanding Mode: No companding modeFirst Bit: MSB FirstFrame Synchro Active Level Length: 1Frame Syncrho Definition: Start FrameFrame Synchro Polarity: Active LowFrame Synchro Offset: 0First Bit Offset: 0Number of Slots (only Even Values): 2Slot Active: Use Slot 0 and 1 onlyMaster Clock Divider: EnabledAudio Frequency: 16 KHzClock Strobing: Rising EdgeFifo Threshold: EmptyOutput Drive: Disabled And then,
I tried to rotate the nema34 stepper motor through hss86 motor driver using the stm32 G474RE. I configured the pins as follow: Pul - connected to Tim 3_CH 1(PA6) , Dir - connected to GPIO OUTPUT_B_10 , Ena - connected to GPIO OUTPUT_D_2 and all the positive terminals to the 5V battery and grounded it to the stm32 pin(GND) . I also generated the output pulse and upload my code to the stm 32 without any error, Although the motor is not rotating. Is there any specific code I have to write beyond the PWM generation code.
I'm trying to set up CAN communication between two STM32F4 boards using CJMCU-230 transceivers, but I'm not receiving any messages. Here's a full breakdown of the setup and what I've tried:Hardware Setup:MCU: STM32F4 Discovery (hcan1)Transceiver: CJMCU-230Second Node: Another STM32F4 with same configurationBitrate: 125 kbit/s on both endsTermination: 120Ω termination resistor is likely present on the transceiver (CJMCU-230) board, but not manually added externally. I haven't removed or measured it directly, but many CJMCU-230 modules include onboard termination resistors by default.STM32 Configuration:txHeader.DLC = 1;txHeader.IDE = CAN_ID_STD;txHeader.RTR = CAN_RTR_DATA;txHeader.StdId = 0x245;sFilterConfig.FilterMode = CAN_FILTERMODE_IDMASK;sFilterConfig.FilterFIFOAssignment = CAN_FILTER_FIFO0;sFilterConfig.FilterIdHigh = 0x0000;sFilterConfig.FilterIdLow = 0x0000;sFilterConfig.FilterMaskIdHigh = 0x0000;sFilterConfig.FilterMaskIdLow = 0x0000;sFilterConfig.FilterScale = CAN_FILTERSCALE_
Hi all,I am working on a project involving reading from the external AD7768. I've tested to get data out of it using and EXTI and Interrupt based SPI receives, but that was too slow to capture the message, so I'm trying to get it to work with DMA.The problem is, I can't get DMA to work at all! The current set up is SPI1 as full duplex master and SPI2 as full duplex slave, both CPOL and CPHA = 0. These are the physical connections on the board. SPI1_SCK (PA5) <-> SPI2_SCK (PB10) SPI1_MOSI (PD7) <-> SPI2_MOSI (PC3) GPIO_Output (PE2) <-> GPIO_EXTI12 (PB12)Just to get anything working, I'm running the following code with EXTI12 disabled. uint8_t tx[2] = {0x11, 0x22}; uint8_t rx[2] = {0}; HAL_SPI_TransmitReceive_DMA(&hspi2, tx, rx, 2); HAL_GPIO_WritePin(GPIOE, GPIO_PIN_2, GPIO_PIN_SET); HAL_Delay(1000); HAL_GPIO_WritePin(GPIOE, GPIO_PIN_2, GPIO_PIN_RESET); if(HAL_SPI_TransmitReceive_DMA(&hspi1,tx,rx, 2) != HAL_OK){ uint32_t err = HAL_SPI_GetError(&
Using HAL_SPI_TransmitReceive properly. I've corrected the code to send the command 0x25 followed by two dummy bytes (0x00, 0x00) in a single transaction to read the ACC register.However, now I’m facing a new issue: no matter what value I set for ACC, when I read it back, I always get 0x80 0x00 0x89 (i.e., 128 0 137). I double-checked the write sequence as well and it appears to complete successfully.(I am able to execute run command) I’ve also attached the image and my updated code for reference. Any suggestions on what I might be missing?Additionally, I’ve already set all KVALs and MAX_SPEED to their maximum values, yet the motor won't go beyond ~1000 steps/sec. Beyond that, it starts vibrating heavily and doesn’t rotate at all, I am using NEMA 17 and NEMA 23 with 24v Supply and tried with no load condition and with some load as well. Phase resistance for NEMA 17 is 3.3R and Inductance 2.8 mH/phase and fot NEMA 23 has 2.23R and Inductanc
Hi,1. I have my own application (migrated from H7 to N6) with FileX writing to the SD card in real-time.And I see that 4-bit data bus is unusable at all (a lot of disk errors).The 1-bit data bus in NORMAL mode works sometimes. HIGH-SPEED is not working properly.The same data throughput was recorded on STM32H747I-DISCO perfectly via 4-bit bus.Could you please advise on this?2. Looking at STM32CubeN6\Projects\STM32N6570-DK\Applications\FileX\Fx_MultiAccess example,I see that 1-bit data bus in Normal mode is used.Is there any issue with the SDMMC on STM32N6 chip or STM32N6570-DK board (signal integrity)? Regards,A
I can't get TIM1 to trigger DMA in my code (main.c)Am I missing something?
Hello, We have designed custom board using STM32F412VGH6 and have implemented a custom bootloader to support firmware upgrade.A common debug UART is shared between the bootloader and application firmware. The UART pins are configured as follows:->TX: PC6->RX: PC7Mode: Alternate Function Push-PullPull configuration: No Pull (Initially)Issue Observed below:1. When UART pins are configured with an internal pull-up, the bootloader successfully jumps to the application.2. When No Pull configuration is used, only the bootloader runs, and it does not jump to the application.3. When No Pull configuration is used and Deinitalizing the peripherals (UART) before jumping to the application, the bootloader successfully jumps to the application.Note: No interrupts are enabled by bootloader code explicitly.Question:Is there any known issue or recommendation regarding UART RX pin state during the bootloader-to-application transition?Does STM32F412 expect the RX line to be in a defined state
I am very new to this field !! So last I had posted regarding the interfacing of DCMI and I got relevent doucuments which where not enough for me to understand the DCMI module. So could you please send relevant videos of interfacing DCMI module step by step.
I am trying to make a very simple program that will initialize Si4703 and read data out of it, the manufacturer ID or something.And in the datasheet, it says to initialize the chip, I need to have SDIO turned low on the rising edge of the RST pin.Si4702/03-C19 (page 19) So the problem is that I can't pull SDIO low because in the code, the SDA pin is initialized as I2C and not as a GPIO set in the configurator. In the Arduino Library, the SDA is set as output, then written low, and then I2C is initialized. Would something like that work in CubeIDE? I am new to programming embedded chips, and I want to know how I can solve this problem.Using the blackpill board with STM32F411C6EU and the Si4703 Tuner Board
Hello,I've been doing some test on the NUCLEO-WBA65RI which has a STM32F7 MCU and when I tried to generate a project on CubeMX I noticed that the native FREERTOS option on middlewares does not appear.I see that it can be downloaded using the option X-CUBE-FREERTOS. But I'm curious why it is implemented like that for this board. Because on another mcus like STM32WB55, STM32H7X that I've been using it is already native.Thanks in advance!
I am working on programming a custom-designed board featuring the STM32H747IGT6 MCU using the Keil MDK-ARM environment. While I can successfully program and debug the Cortex-M7 (CM7) core, I encounter an "INTERNAL PARAMETER ERROR" when attempting to flash the Cortex-M4 (CM4) core.Current Configuration:Software Versions:STM32CubeMX: 6.8.1Keil MDK: 5.31 with the latest Device Family Pack (DFP) version 4.1Debugger:STLINK-V3SETMemory Allocation (as per STM32H747IGT6 Reference Manual):IROM1: Start Address = 0x08100000, Size = 0x00100000IRAM1: Start Address = 0x10000000, Size = 0x00048000RAM for Algorithm: Start Address = 0x10000000, Size = 0x00001000I have also experimented with alternative IRAM1 configurations via Keil's "Options for Target" settings, but the issue persists.Observations:The CM4 core can be programmed successfully using the STM32 Programmer tool, indicating that the hardware is functional.I have followed the guidelines provided in ST's Application Note AN5286 for dual-core
I try to create a new project, nothing is written in main.c! It is a first check after setting up 'LWIP', 'SDIO' and Freertos in the GUI and got this mistake!multiple definition of `errno'; ./Middlewares/Third_Party/LwIP/system/OS/sys_arch.o:/home/denis/STM32CubeIDE/workspace_1.9.0/FreeRtos_SDIO_Web/Debug/../Middlewares/Third_Party/LwIP/system/OS/sys_arch.c:45: first defined hereSTM32CubeIDE Version: 1.9.0 PS - This error not appear then I was on STM32CubeIDE Version: 1.8.0
I am working on an example project: MAC 802 (\STM32Cube\Repository\STM32Cube_FW_WB_V1.21.0\Projects\P-NUCLEO-WB55.Nucleo\Applications\Mac_802_15_4\Mac_802_15_4_Node).I have added standby mode to this code, but I am unable to wake it up.After entering standby using RTC, the system does not wake up after MX_APPE_Init();.My code is as follows:int main(void) { /* Initialize the HAL */ HAL_Init(); Check_Wakeup_Source(); ALGORTM.WakeUp_From_stopM = true; /* Config code for STM32_WPAN (HSE Tuning must be done before system clock configuration) */ MX_APPE_Config(); ALGORTM.WakeUp_From_stopM = true; Load_Values_From_FLASH(); /*Configure the system clock */ SystemClock_Config(); /* Configure the peripherals common clocks */ PeriphCommonClock_Config(); /* IPCC initialisation */ MX_IPCC_Init(); // LL_C2_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN); MX_GPIO_Init(); MX_RTC_Init(); MX_I2C3_Init(); MX_TIM1_Init(); MX_TIM2_Init(); MX_TIM17_Init(); // MX_ADC1_Init();
Hello!I am writing a program that uses FreeRTOS and LwIP libraries. I would want to check ARP table, but functions from ip4 directory are not considered thread-safe. How can I check ARP table when using FreeRTOS or how can I make sure calling thread-unsafe functions won't break my program?I saw that there is an LwIP mutex that can be used to lock the stack via LOCK_TCPIP_CORE() and UNLOCK_TCPIP_CORE() macros, but I am not sure how to use them properly or if it is even a good approach. Thank you in advance!
Hi everyone,I'm currently working on a project to turn an STM32 microcontroller into a USB printerdevice. I have spent a considerable amount of time searching for a comprehensive guideor a complete implementation for the classic USB printer device class on the STM32platform, but unfortunately, I haven't found a solution yet.I did find this valuable ST Community post that provides a walkthrough for setting up aUSB Communications Device Class (CDC): LINK, This has led me to a few specific questions:1. CDC vs. Printer Class: For those experienced with both, how significant is thedevelopment effort to move from a CDC implementation to a compliant USB PrinterClass (Class Code 07h) device? I understand the Printer Class has its own setof specifications, but I'm trying to gauge the complexity of adapting the existingCDC examples.2. Successful Implementations: Has anyone in the community successfully configuredan STM32 as a USB printer device? I've come across a few forum posts where this hasb
I want to the RTC to my project, but something is preventing the RTC clock from being enabled and I can't figure out what it is. IOC file is attached.
Hello, I have a NUCELO_H723ZG and I am trying to set it up to be a master, I am using a MIKROE-3816 LIN transceiver. I was wondering if there is a step by step tutorial on how to set it up and send the proper LIN message. Thank you
I’m working on a TouchGFX project with a dropdown menu. When I select an option, the selected text is shown in a TextArea using a wildcard buffer (selectedTextBuffer).In the TouchGFX Simulator, the full string displays correctly. But on the actual STM32 board, only the first letter (e.g., just "M") is visible.I've already tried the following:Set the buffer size in Designer to 32Confirmed that all characters are included in the font's wildcard character setVerified that invalidate() is called after updating textRebuilt assets and fully flashed the boardDespite all this, the board still only shows the first letter.Setup:MCU: STM32H7 (STM32H750-DK)TouchGFX version: 4.25.0TextArea uses selectedTextBuffer as wildcard
I've used CubeIDE 1.18.1 to create a small project based on a STM32C011F6. The ADC is configired thru Cube to read Vref+, temp sensor and another external voltage.Cube has therefore created an init function MX_ADC1_Init which is called at during startstatic void MX_ADC1_Init(void) { /* USER CODE BEGIN ADC1_Init 0 */ /* USER CODE END ADC1_Init 0 */ ADC_ChannelConfTypeDef sConfig = {0}; /* USER CODE BEGIN ADC1_Init 1 */ /* USER CODE END ADC1_Init 1 */ /** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion) */ hadc1.Instance = ADC1; hadc1.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV2; hadc1.Init.Resolution = ADC_RESOLUTION_12B; hadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT; hadc1.Init.ScanConvMode = ADC_SCAN_SEQ_FIXED; hadc1.Init.EOCSelection = ADC_EOC_SEQ_CONV; hadc1.Init.LowPowerAutoWait = DISABLE; hadc1.Init.LowPowerAutoPowerOff = DISABLE; hadc1.Init.ContinuousConvMode = DISABLE; hadc1.Init.NbrOfConversion = 1; had
Hello, I have purchased and used the NUCLEO-F303RE board. I am trying to control the LED (PA5) using bit-banding. With reference to the reference manual, I confirmed that the address of GPIOA starts from 0x48000000. Then, I found and read the PM0214 document, which seems to say that only Peripheral in the area of 0x40000000-0x400FFFFF can be controlled. So you are saying that my f303re board can't control gpio using bit_banding? And if so, how can I control it directly? Thank you. This is my code. /* * bitband.h * * Created on: Jul 23, 2025 * Author: giwon30 */ #ifndef INC_BITBAND_H_ #define INC_BITBAND_H_ #include "main.h" //giwon 250723 //bit banding //STM32F303RC #define GPIO_PORT_A 0x48000000UL // GPIOA 베이스 주소 #define FIXED_GPIO_PIN_5 5 // PA5 핀 // GPIOA의 ODR 레지스터 주소 (출력 데이터) #define GPIOA_ODR (GPIO_PORT_A + 0x14) // 비트밴딩 별칭 영역 매크로 정의 (SRAM 영역) #define BITBAND_SRAM_BASE 0x40000000UL #define BITBAND_SRAM_ALIAS_BASE 0x42000000UL // 비트밴딩 주소 계산 매크로 #define BITB
I am working on a project to drive a sliding door using a PMSM motor in position control mode (details are given in the below). I determined the PID coefficients using ST AN5464. The motor operates very good during normal right/left rotation commands. However, when the motor is holding a fixed position, it sometimes exhibits small vibrations.When the motor is in a fixed position and I use the PWMC_SwitchOffPWM(pwmcHandle[M1]) function to disable PWM, the vibrations also stop. However, disabling the PWM is not desired in the project.Below, I have attached a graph obtained using ST Motor Pilot V6.4.0 that shows the I_Q_MEAS and I_Q_REF signals of the PMSM motor during vibration in standstill (Although I couldn't take a screenshot as I wanted, it's clear that the I_Q_MEAS and and I_Q_REF signals are oscillating). As far as I understand, the I_Q_MEAS and I_Q_REF signals should remain stable when the motor is stationary.Is there anyone who can help me with this issue? I would appreciate any
From the manual UM3254:4.1.4 PSA firmware update service4.1.4.1 DescriptionThis service provides an implementation of the PSA firmware update API defined in [PSAfwuAPI]. It provides a standard and platform-agnostic interface for firmware updates.The firmware update scheme is based on a dual slot: one active slot and one download slot. The active slot is used to execute the firmware and the download slot is used to download the new image to be installed.The following images can be updated:• Nonsecure application• SMuRoT• Secure Manager• Secure modules (each can be updated independently)The installation flow is as follows:1. The nonsecure application (update agent) gets information about the installed images (such as name, installation status, version, and others).2. It downloads the image to the secure download slot.3. It requests the image installation. It resets the device to execute the secure boot stages (SMiRoT and SMuRoT) that perform the installation in the active slot and jumps
I'm using button in the MC_APP_PostMediumFrequencyHook_M1 to stop the motor. When I press the button, the motor enters freewheel mode, so it is not actively braked — it simply coasts down.Later, when I release the button and increase the potentiometer, the motor starts again via a speed ramp. However, I noticed that the ramp always starts from 0 speed, even though the motor was still spinning due to the freewheel behavior.As a result, the motor gets "locked" momentarily (due to the controller assuming 0 speed), and then accelerates. This is not the behavior I want. Since the motor never truly stopped (freewheel), I would like the ramp to continue from the current actual speed, not from 0.How can I make the ramp start from the actual mechanical speed of the motor when restarting after freewheel?__weak void MC_APP_PostMediumFrequencyHook_M1(void){ uint16_t rawValue = RCM_ExecRegularConv(&PotRegConv_M1); /* USER SECTION BEGIN PostMediumFrequencyHookM1 */if(H
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.