Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi everyone,I’m working with the STM32C011D6 in the SO8N package, and I’m a bit confused by the pinout and remapping notations in the datasheet.In the alternate function table, PA11 [PA9] and PA12 [PA10] are shown for pins 5 and 6 respectively. From what I understand, this suggests that PA11 and PA12 might internally perform the functions of PA9 and PA10 in packages where PA9 and PA10 are not present.In fact, the datasheet itself notes that no package implements PA9 and PA10, which further leads me to assume that PA11 and PA12 are intended to handle those alternate functions (like I2C1_SCL and I2C1_SDA) in reduced pin-count packages like SO8N.However, I’m running into some uncertainty:Do pins 5 and 6 of the SO8N package actually support I2C1 (SCL/SDA) functionality?In STM32CubeMX, I don’t see any option to configure I2C on those pins for the SO8N package — is this a limitation, or is there a specific way to enable this functionality?How should I properly interpret the [PA9] notation ne
Hi all,I'm working on a project where I want to control a unipolar stepper motor (5-wire, 4 phase, drive mode 4 - 2 -1 , center-tapped, datasheet attached) using the STM32G0B1 microcontroller. In the past, I used the PCA9629A stepper driver IC, which worked well, but now I'm looking to simplify the design by replacing it with direct control via the STM32 and a Darlington array (ULN2003-style).My goal is to drive the stepper in both directions, ideally using PWM to control timing and phase switching more precisely. I'm aware that bit-banging is one way to do it, but I’d prefer to use hardware timers and PWM channels to offload the CPU and make it more efficient.What I’m currently struggling with is:Can I synchronize multiple PWM channels on the STM32G0B1 to implement unipolar stepper waveforms (full-step or half-step)?Any tips or example configurations using TIMx channels for this kind of stepper motor?Any advice, experiences, or even links to relevant STM32CubeMX setups or example code
I tried to run two examples on my new NUCLEO-WBA65RI. Specifically the 'BLE_p2pServer' and the 'BLE_HeartRate'. I followed this guide for the p2pServer:https://wiki.st.com/stm32mcu/wiki/Connectivity:STM32WBA_Build_BLE_ProjectBuilding works but when I try to execute it, the program seems to get stuck using the non volatile memory. With debugging I found out that it might be related to the SNVMA_Init() function. Inside this loop:/* Erase the bank */ while (EraseSector (((nvmOffset + addressOffset) / FLASH_PAGE_SIZE), SNVMA_NvmConfiguration[nvmIdx].BankSize) == FALSE);following the stack trace, I get at some point a write protected error. Is there an easy fix for that?Thanks!
Dear all,[PN]: EVSPIN32G4 & Portescap 16ECP52 Ultra EC Slotless Brushless DC Motor (Datasheet as pdf attached)[VERSION]:MC Workbench : 6.3.2WB_to_Mx : 6.2.3.template-24-04-17STM32CubeMX : 6.14.1MC Firmware Library: 6.3.2-FullTarget Toolchain : ST STM32CubeIDETarget Driver : LL - Low LevelTarget STM32 FW : 1.6.0[TOOL]: MC Profiler[DETAILS]:Motor stutters and profiler stops with error 'Speed Feedback'[EXPECTED BEHAVIOR]:smooth operation within 100-5000 RPM[HOW TO REPRODUCE]:1. MC Workbench (specify defaults and motor settings from Portescap)2. Generate LL code for STM32CubeIDE, target firmware recommended3. start STM32Cube : nothing changed -> generate code4. start IDE, compile, run (its being uploaded)5. connect using Motor Pilot V1.2.12 profiler app shows up.6. Detect pole pairsSpecification from motor manufacturer says two pole but :I need two rotations to come back to the same orientation, after 5 'notches' in first rotation the original position is not achieved, t
Hello, I am seeking guidance on how to interface and access a Radxa eMMC Module, which operates on the eMMC 5.1 specification, with either the STM32H750B-DK development kit or the WeAct Studio STM32H750VBT6 development board. I also have a Radxa eMMC to uSD converter, which allows the eMMC module to interface via a microSD card slot. Any suggestions or step-by-step guidance would be greatly appreciated, as I aim to integrate this storage solution into my project. Since the WeAct board has a microSD card slot, can I directly insert the Radxa eMMC module (via the eMMC to uSD converter) into this slot and access it using the STM32’s SDMMC peripheral?Are there specific configurations or drivers required in STM32CubeIDE to initialize and communicate with the eMMC module through the microSD interface?Are there any known compatibility issues with the eMMC 5.1 protocol when interfaced via the uSD converter on this board?How should I configure the SDMMC peripheral (e.g.,
I've had a look at similar threads, however they have been set to read only.I have ADC1 and ADC2 setup in regular simultaneous mode with DMA transfer enabled. Only ADC1 is converting and the data register which contains ADC2 data is empty (0x000). I have stepped through my code with the debugger and seen that the EXTTRIG bit for ADC2 is not being enabled.The reference manual explains that EXTTRIG should be set in the control register for both ADCs in dual mode.The following HAL function should be setting that bit, however, it remains 0.HAL_ADCEx_MultiModeStart_DMA(&hadc1, adc, 2);I have tried to manually set this bit in the register but still no conversion is being triggered on ADC2 ADC2 -> CR2 |=(1U<<20); If there's something I am missing, any advice would be appreciated.Note: the ADCs have the same sampling time (71.5 cycles) on different channels and the ADC clock is set to 12MHz.
I am developing an application from LoRaWAN End Node example in STM32WLE MCU that has to work in different countries. To select easily the LoRaWAN region from hardware I have dedicated three pins as GPIO Inputs. The idea behind is that by reading the combination of those will determine the region of operation and so, perform the corresponding modifications in firmware for correct configuration. At the end, the idea is to have only one firmware per application independently of the region.I have found that the region is set in LmHandlerParams.ActiveRegion strcture parameter in LmHandlerConfigure() function, but i cannot find where it is assigned in the code to properly modify it. Can anyone help, please? Thanks in advance.
Hello STM-Community.I am currently working on some project with the "LIZARD Board" from Actron and a 800*480 LCD-screen.I followed the Instruction in https://support.touchgfx.com/docs/development/board-bring-up/how-to/03-display-internaland also other "tutorials" but wasnt able to get it to work.Now i finally noticed that the "Color Frame Buffer Start Address" in LTDC is missing...I have no idea why that is the case and if this a bug in CubeIDE v.1.17.0 or something on my side.Does anyone know what to do?
Hi, I am working on STM32H757I-EVAL. I am new to STM32 boards. I am using STM32 Cube IDE version 1.18.0. I started with the basic task - blinking led. I have written the code but it is not reflecting on the board. I have configured this task for four LEDs, I have set PK3, PK4, PK5, PK6 as GPIO Output. In pinout and configuration under system core, I have selected GPIO and configured every pins. Pin context assignment - ARM Cortex M7, GPIO Output level - Low, GPIO mode - output push and pull, GPIO Pull up / pull down - No pull up and no pull down, Max output speed - low. In RCC mode and configuration, HSE, LSE - Crystal/ ceramic resonator I have attached image of clock configuration.Code: in while (1) block // Turn on PK3, turn off others HAL_GPIO_WritePin(GPIOK, GPIO_PIN_3, GPIO_PIN_SET); HAL_GPIO_WritePin(GPIOK, GPIO_PIN_4, GPIO_PIN_RESET); HAL_GPIO_WritePin(GPIOK, GPIO_PIN_5, GPIO_PIN_RESET); HAL_GPIO_WritePin(GPIOK, GPIO_PIN_6, GPIO_PIN_RESET); HAL_De
How to combine settings in SystemClock_Config to use both keyboard and ADC examples? In keyboard project there is the follow setting in SystemClock_Config: RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_MSI; RCC_OscInitStruct.MSIState = RCC_MSI_ON; RCC_OscInitStruct.MSICalibrationValue = RCC_MSICALIBRATION_DEFAULT; RCC_OscInitStruct.MSIClockRange = RCC_MSIRANGE_6; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_MSI; RCC_OscInitStruct.PLL.PLLM = RCC_PLLM_DIV1; RCC_OscInitStruct.PLL.PLLN = 32; RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV5; RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2; RCC_OscInitStruct.PLL.PLLQ = RCC_PLLQ_DIV4; In ADC sample: RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48|RCC_OSCILLATORTYPE_HSI |RCC_OSCILLATORTYPE_HSE|RCC_OSCILLATORTYPE_LSE; RCC_OscInitStruct.HSEState = RCC_HSE_ON; RCC_OscInitStruct.LSEState = RCC_LSE_ON; RCC_OscInitStruct.HSIState = RCC_HSI_ON; RCC_OscInitStruct.HSI48State = RCC_HSI48_ON;
Hi at everyone, I need to write a code without the Cube IDE configurator, due to save program memory. I tryed to configure the USAR1, but seem not output on the pin the data streem. Seem that the machine runs because, at the first, I tryed to transmit in polling mode cheching the TXE flag to charge the the TDR register, but not data goes to the pin, but rather, the TX pin seem on high impedence. I forgot something. Below the USART init : RCC_CCIPR &= 0xfffffffc; //USART1 clock on system clock RCC_APBENR2 |= 0x00004000; //USART1 clock enable RCC_IOPENR |= 0x00000005; //GPIOC clock enable PORTC_MODER &= 0xefffffff; //set PC14 as alternate function PORTC_AFRH &= 0xf0ffffff; //set PC14 as TxD function PORTC_OTYPER &= 0xffffbfff; //PC14 PP mode USART1_CR1 |= 0x00000001; //USART1 enabled USART1_CR1 &= 0xefffefff; //8 bit data length USART1_CR3 = 0x00002000; //DMA disable USART1_BRR = 0x000001a1; //115200 USART1_CR1 |= 0x00000008; //TX enabled // USART1_CR1 |= 0x0000000
Split from old thread: https://community.st.com/t5/stm32-mcus-security/information-about-mcuboot-and-illustrative-examples/td-p/689154 Hello @Jocelyn RICARD ,I'm looking for guidance on integrating Mcuboot into my project. I am using a NUCLEO-U5A5ZJ-QSTM32CubeIDE 1.17First of all some notes about the experience:When using the example selector in CubeIDE and, for example the SBSFU_Boot project, it has several problems related to paths in the shell scripts. It cannot find the env.sh file, since it's in the root SBSFU directory. It shows only the content of the STM32CubeIDE directory, while it also has related content in the top directory?How should I use this example correctly? Download the whole SBSFU project and not use CubeIDE, but use make/cmake and a manually installed compiler?Are the provided examples by ST for Mcuboot in the SBSFU project using the modified Mcuboot middleware?When writing my own bootloader is that the recommended way or is it only for dem
Hello. I bought Riverdi board and start to develop my code. I found in FREERTOS_M7 Config parameters RTOS CHECK_FOR_STACK_OVERFLOW. Documentation says CHECK_FOR_STACK_OVERFLOWParameter Description:FreeRTOS provides two optional mechanisms that can be used to assist in stack overflow detection and debugging.- when CHECK_FOR_STACK_OVERFLOW is set to 1 (option1), one mechanism is used- when CHECK_FOR_STACK_OVERFLOW is set to 2 (option2), both mechanisms are used.If CHECK_FOR_STACK_OVERFLOW is not set to 0 (Disabled), the application must provide a stack overflow hook (or callback) function: void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName );The kernel will call that stack overflow hook whenever a stack overflow is detectedNote: when set to 1 or 2, a function with an empty body is generated in the freertos.c file (to be completed by the user) So I set CHECK_FOR_STACK_OVERFLOW = 1, trigger a stack overflow by an infinite re
Hello, I am using CubeMX 5.1 and I am aware that it is not possible to activate FREERTOS when STM32_WPAN is activated. Is there any way to integrate FREERTOS with BLE? Is the feature maybe coming out in the future?
/* OCTOSPI1 init function */ void MX_OCTOSPI1_Init(void) { /* USER CODE BEGIN OCTOSPI1_Init 0 */ /* USER CODE END OCTOSPI1_Init 0 */ OSPIM_CfgTypeDef sOspiManagerCfg = {0}; HAL_OSPI_DLYB_CfgTypeDef HAL_OSPI_DLYB_Cfg_Struct = {0}; /* USER CODE BEGIN OCTOSPI1_Init 1 */ /* USER CODE END OCTOSPI1_Init 1 */ hospi1.Instance = OCTOSPI1; hospi1.Init.FifoThreshold = 1; hospi1.Init.DualQuad = HAL_OSPI_DUALQUAD_DISABLE; hospi1.Init.MemoryType = HAL_OSPI_MEMTYPE_MICRON; hospi1.Init.DeviceSize = 32; hospi1.Init.ChipSelectHighTime = 1; hospi1.Init.FreeRunningClock = HAL_OSPI_FREERUNCLK_DISABLE; hospi1.Init.ClockMode = HAL_OSPI_CLOCK_MODE_0; hospi1.Init.WrapSize = HAL_OSPI_WRAP_NOT_SUPPORTED; hospi1.Init.ClockPrescaler = 4; hospi1.Init.SampleShifting = HAL_OSPI_SAMPLE_SHIFTING_NONE; hospi1.Init.DelayHoldQuarterCycle = HAL_OSPI_DHQC_DISABLE; hospi1.Init.ChipSelectBoundary = 0; hospi1.Init.DelayBlockBypass = HAL_OSPI_DELAY_BLOCK_BYPASSED; hospi1.Init.MaxTran = 0; hospi1.Init.
I have a board NUCLEO-WL55JC1 and download a LoRaWAN End-Node Example on it form STM32CubeIDE, but it not join to LoRaWAN network sucessfully.My LoRa Gateway is Drgaino-LG308 with TTN(The Thing Network) Server, the frequency is EU868.After some checking, I found the TX is work, the server was accepted and responsed the JOIN request, but my board don't receive any LoRa packet. I also add some log in RadioIrqProcess() when it get irq about Rx but it show nothing.How do I fix it OR figure out what problem is it?
When screen initializes: scrollWheel1.setNumberOfItems(1); scrollWheel1.setDrawables(scrollWheel1ListItems, updateItemCallback, scrollWheel1SelectedListItems, updateItemCallback);After run for some time, scrollWheel is re-configed as: scrollWheel1.setNumberOfItems(9); // assert() error happened here scrollWheel1.invalidate();The error happens at :ScrollWheelWithSelectionStyle::setNumberOfItems() ScrollBase::setNumberOfItems()DrawableList::setNumberOfItems() DrawableList::refreshDrawables() Container::add(*drawable); assert(d.parent == 0 && "Cannot add Drawable multiple times");So can I call setNumberOfItems() dynamically? How to go around?
Hi all,I'm running into an issue when trying to deploy a model from to my STM32N6 board.I am following this guide: https://github.com/STMicroelectronics/stm32ai-modelzoo-services/blob/main/object_detection/deployment/README_STM32N6.mdrunning script:python stm32ai_main.py --config-path ./config_file_examples/ --config-name deployment_n6_yolov8_config.yamlBut ending up with following error:deployment yaml:general: model_path: https://github.com/stm32-hotspot/ultralytics/raw/refs/heads/main/examples/YOLOv8-STEdgeAI/stedgeai_models/object_detection/yolov8n_256_quant_pc_uf_od_coco-person-st.tflite model_type: yolo_v8 operation_mode: deployment dataset: class_names: [person] preprocessing: resizing: aspect_ratio: crop interpolation: nearest color_mode: rgb postprocessing: confidence_thresh: 0.6 NMS_thresh: 0.5 IoU_eval_thresh: 0.4 max_detection_boxes: 10 tools: stedgeai: version: 10.0.0 optimization: balanced on_cloud: False path_to_stedgeai: C:/ST/STEdgeAI/2.1/Utili
I am working with the NUCLEO-C031C6 board and tried to to make the user push button toggle the user LED but it stays stuck with no change to the buttonStatus variable, always high (1).I added the counter variable to see if it is continuously incrementing, however, it appears that the code does not loop and gets stuck somewhere, and thus when I press the push button, it is not updating the buttonStatus variable.Can you please see where the issue is:#include "stm32c0xx_hal.h" //Blue button = PC13, BUS AHB1 EN bit 0 #define BLUBTN_Port GPIOC #define BLUBTN_Pin GPIO_PIN_13 //Green LED = PA5, BUS AHB1 EN bit 2 #define GRNLED_Port GPIOA #define GRNLED_Pin GPIO_PIN_5 void PA5_LED_init(void) { __HAL_RCC_GPIOA_CLK_ENABLE(); GPIO_InitTypeDef GPIO_InitStruct = {0}; GPIO_InitStruct.Pin = GRNLED_Pin; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(GRNLED_Port, &GPIO_InitStruct); } void PC13_
I am trying to communicate with an external flash chip “MX35LF1G24AD” using QSPI protocol, but I am not able to. Simple test I implemented was to read chip ID to validate I could get data from external flash (I am using OCTOSPI1 interface). From manufacturer datasheet it is mentioned that command should be sent using 1 line on SDIO0. However, when probing communication, data is sent from SDIO3. Is it possible to send command, on 1 line, on SDIO0 pin instead of SDIO3?
I have made an project from touchgfx and opened it from subeide.The project is loading normally and i have overwritten the write function:/* USER CODE BEGIN 0 */ int _write(int file, char *ptr, int len) { int DataIdx; for (DataIdx = 0; DataIdx < len; DataIdx++){ ITM_SendChar(*ptr++); } return len; } /* USER CODE END 0 */in the main default task i have a toggle pin function that works and before the toggle a printf.i have enabled the SWO from the debugger configuration and the clock is exactly as in the ioc file 216MhzWhen opening the debugger i select port 0 in the SWV console. The system has by itself a prescaller to 108 which i can not edit and the SWO clock is 2000.There is nothing printed in the port 0 . I have placed an interupt in the function above to ensure that printf really calls the write function. This is true it uses the write function but ITM_SendChar does not do anything,
Hi,I'm using STM32F103RB (NUCLEO-F103RB) and I configured the clock system in STM32CubeMX.I am using HSI as the clock source, and the APB2 timer clock is running at 64 MHz.I want to generate 20kHz PWM signals using TIM1 Channel 1, 2, and 3, and I’ve already set all channels to Center-Aligned PWM Mode 2.My requirements are:PWM frequency: 20 kHzResolution: At least 1000 steps (preferably ARR ≥ 999)Timer: TIM1, running at 64 MHz input clockHowever, I’m not sure how to set the correct values for ARR and PSC to achieve exactly 20kHz and also meet the resolution requirement.Questions:What combination of ARR and PSC values should I use to achieve 20kHz PWM with ≥1000 resolution?Is it okay to use PSC = 0 and a higher ARR to get better resolution?Are there any known limitations with HSI or APB2 clock setup that I should be aware of in this context?Thanks in advance for your help!
Hi all,I need to insert fault on upper key of the driver. In order to achive this Im changing dedicated TIM1 output to Input to output low. After inserting fault motor stops. Is it possible to achive this? Could someone explain what Im doing wrong. Thanks on advance.Dawid
Hi Support Team,I am using the STM32F103RCT6 MCU in my design, I am facing one issue related to the software reset using "HAL_NVIC_SystemReset();" api is not working and the IDWG also not working after downloading the .hex file using the custom bootloader. However the other code works fine but when the software reset "HAL_NVIC_SystemReset()" is called the MCU hangs and the IWDG also not able to reset the MCU. I have tried the same project downloading through ST-LINK V2 and the code works fine along with software reset and IWDG. I am not able to find the cause of the software reset and IWDG not working after downloading the .hex file using the custom SPI bootloader. I am 100 % sure there is no issue in writing the .hex contents into flash memory using the bootloader. I am using the same process from several months and it is working fine. Only the issue happening after adding software reset and IDWG in the code. does the program download using ST-LIN
According to "STM32H562xx/563xx/573xx device errata" (ES0565 - Rev 6 - March 2025).There is three revisions (Rev.A, Rev.B and Rev.X).What is the difference?All revisions in the market for now?If so, how can we oreder Rev.X chip in the market?We would like to use Rev.X chip.
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.