Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
What should I pay attention to when I use stm32u5 FreeRtos stop2,When exiting stop2, do the relevant i2c spi adc uart peripherals need to be reinitialized?Is the value retained?Is there a routine for FreeRtos stop2?void Bsp_PowerManage_enter_stop_mode(void) { if ((device_state_info.stimulate_state) || (device_state_info.device_ota)) { return; } osKernelLock(); / while (__HAL_UART_GET_FLAG(&hlpuart1, USART_ISR_BUSY)); while (__HAL_UART_GET_FLAG(&hlpuart1, USART_ISR_REACK) == RESET); __HAL_RCC_LPUART1_CLKAM_ENABLE(); __HAL_RCC_LPTIM1_CLKAM_ENABLE(); HAL_UARTEx_EnableStopMode(&hlpuart1); device_lowpower_state.stop_mode_state = 1; HAL_SuspendTick(); // #if Bsp_IWDG if (HAL_LPTIM_TimeOut_Start_IT(&hlptim1, 61438) != HAL_OK) { Error_Handler(); } #endif HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI); SystemClock_Config(); HAL_InitTick(TICK_INT_PRIORITY) if (!__HAL_PWR_GET_FLAG(PWR_FLAG_STOPF)) Error_Handler(); __HAL_PWR_CLEAR_FLAG(PWR_FLAG_STOPF); if (__HAL_PWR_GET_FLAG(PWR_FLA
Hello,I'm using WBA55CG Board and i have tried to flash this example STM32WBA Bluetooth® LE – Serial communication - stm32mcu to the STM32. The flashing step is completed, i could connect the board through ST BLE Toolbox on iOS. However there is no services like in the example, for example Send button/Real time. Also i have connected the board with TeraTerm to see USART messages but there were no messages from the board. How should i debug to have a proper function?
Hi For some reason, an interrupt isn't being triggered when I connect the USB to my stm32 board, and the reason is baffling to me. I have attached the relevant excerpt of my code static inline void core_initialisation(void) //from page 3403 { USB_OTG_CfgTypeDef usb_config; usb_config.dev_endpoints = 6; // Typical number for HS device endpoints usb_config.Host_channels = 12; // Typical max host channels for HS core usb_config.dma_enable = 0; // Disable DMA (set 1 if your HW supports and you want DMA) usb_config.speed = USB_OTG_SPEED_HIGH; // High Speed usb_config.ep0_mps = 64; // Endpoint 0 max packet size (64 bytes for HS control EP) usb_config.phy_itface = USB_OTG_HS_EMBEDDED_PHY ; // Use embedded PHY (if your MCU supports it) usb_config.Sof_enable = 1; // Enable SOF (Start Of Frame) output usb_config.low_power_enable = 0; // Disable low power mode (set 1 to enable) usb_config.lpm_enable = 0; // Disable Link Power Management usb_config.battery_charging_ena
I am working with an STM32C092CCT6 (STM32C0 series) and I need help with reading and writing variables into Flash memory.I want to store a few configuration values (like integers or structures) that should persist after reset or power cycle.From what I understand, I need to erase a Flash page first and then program data at a specific address.I am not sure about the correct sequence for the C0 series (unlocking Flash, erasing, programming, and locking again).I would like to know the best practice for data alignment (word/halfword).Should I use HAL functions like HAL_FLASH_Program() or is direct register access recommended for reliability?If anyone has a working example code snippet or reference for reading/writing user variables into Flash on STM32C0, it would be really helpful.Thanks in advance!
Hello,I’m using a CAT24C32-D EEPROM. It works on our STM32F446-based PCB, but I can’t get it to work on our STM32U5A5-based PCB. I’m encountering both write and read errors. I’m using the same driver/library on both MCUs, and the hardware is identical except for the MCU itself.What could be causing this? Why am I seeing these issues on the STM32U5A5 while the STM32F446 works fine? Any help would be appreciated.
Hi everyone, I was hoping to find some help in locate a simple tx example for the stm32wl33 using a freertos task. I have tried to move functions in the mrsubg basic transmit example to a task but seems to not function properly. Does not transmit and gets stuck in the while((__HAL_MRSUBG_GET_RFSEQ_IRQ_STATUS() & MR_SUBG_GLOB_STATUS_RFSEQ_IRQ_STATUS_TX_DONE_F) == 0) {}; Any help would be appreciated.
Hi, maybe now reported, but seems no solution. My design uses U599 with GPU2D. Many images is svg ok. But for example toggle buttons is generated as pngs.For save flash space i preffer L8 as default image format, but here TGFX fail in render animation . For example cover south change screen with this buttons show failing renders. Require change images to ARGB8888 result to fine animations, but 4x more storege. In 2025 absurd situation.Next question is how manage change colours in presets in designer. For example same toggle buttons variants ...
HelloI have a few questionsSituation Summary:Development board: STM32F411RESensor: VL53L4CD TOF sensorPrevious successful case: On the STM32F401RE board, setting the BOOT0 pin to 1 → uploading the BIN file via STM32CubeProgrammer → sensor operation verified successfully via GUI.Current issue (STM32F411RE board):Setting BOOT0 the same way as on the F401 → STM32CubeProgrammer connection is lost.Using the adjacent JP1 pin (instead of the originally used one) → BIN file download succeeds.Running the GUI program → board and COM port not detected.Running "FLASH FW" in the GUI → port is detected, but the sensor shows a "not detected" message.Note: Both the F401RE and F411RE boards use the JP1 pin next to the board’s power pins as the BOOT pin.Question: What is the recommended method to make the sensor work properly with the GUI on the STM32F411RE board? I would appreciate any guidance you could provide on this issue.Please find my email address below.thanks email : whtndhks@it
Hello,I’m working on a FOC (Field Oriented Control) project to drive a PMSM (Permanent Magnet Synchronous Motor). I’m looking for an official STMicroelectronics development board that includes the following features:STM32-based microcontrollerSupports resolver and encoder input (preferably both)Gate driver outputs for external power stage (or integrated solution is fine)Fully compatible with FOC-based motor controlDoes ST offer such a motor control/inverter board?Please recommend any official ST hardware that fits these criteria.
SVD version 1.2, vs RM0468 Rev 3TIM1 CCR6 register is mislabeled as CRR6 in the SVD file
SVD version 1.2, vs RM0468 Rev 3SVD file lists DMAMUX2 as DMAMUX3 in multiple places
Hi, I'm using STM32H743 with STM32Cube FW_H7 V1.12.1 library package.I'm using LwIP without RTOS and our application is working well. In order to improve performance we would like to use the transmission in interrupt for the etherrnet interface instead the polling transmission.I saw that in the ethernet_link_check_state function in ethernetif.c file it is used the HAL_ETH_Start_IT(&heth), but in the low_level_output used to transmit data is used HAL_ETH_Transmit() insted of HAL_ETH_Transmit_IT().Is it possible to use the HAL_ETH_Transmit_IT() in order to improve performance?What we need to modify in order to use the HAL_ETH_Transmit_IT() insted of HAL_ETH_Transmit()?Thanks in advance.Regards
I used MotorControl Workbench_6.4.1 and used the Board designer to generate the simplest design for the sixStep inverter design.I choose STM32030K as the MCU and assigned back emf as the speed and position control and also configured the Phase voltage generation and M1 specification and every thing gets a green check mark. then I tried to build a project with the created inverter board file and when I select to generate the project, the MotorControl Workbench Just shows a blank screen and nothing happens. what's going on wrong?I have attached the inverted json file to the post.
Hello ST Community,I am designing a FOC motor controller using STM32G4 and want to use 3 separate ADCs (ADC1, ADC2, ADC3) in injected mode for simultaneous 3-phase current sampling.I know that some microcontrollers have triple-mode ADCs, which allow all three ADCs to start and finish simultaneously. My question is:1. When TIM1_TRGO is triggered, do all three ADCs start converting simultaneously, or is there a sequential order (ADC1→ADC2→ADC3)?2. What is the safest way to read an ADC for FOC algorithm?I am very new to this field, so please excuse me.Best regards
Hello every,I created some text areas to display the file name, which comes from a character array provided by the user's input. Below are the configuration settings for each text area.1.text area2.Texts->Typographies 3.code3.1.text area define in class touchgfx::TextAreaWithOneWildcard data06_text; touchgfx::TextAreaWithOneWildcard data05_text; touchgfx::TextAreaWithOneWildcard data04_text; touchgfx::TextAreaWithOneWildcard data03_text; touchgfx::TextAreaWithOneWildcard data02_text; touchgfx::TextAreaWithOneWildcard data01_text; static const uint16_t DATA06_TEXT_SIZE = 32; touchgfx::Unicode::UnicodeChar data06_textBuffer[DATA06_TEXT_SIZE]; static const uint16_t DATA05_TEXT_SIZE = 32; touchgfx::Unicode::UnicodeChar data05_textBuffer[DATA05_TEXT_SIZE]; static const uint16_t DATA04_TEXT_SIZE = 32; touchgfx::Unicode::UnicodeChar data04_textBuffer[DATA04_TEXT_SIZE]; static const uint16_t DATA03_TEXT_SIZE = 32; touchgfx::Unicode::UnicodeChar data03_textBuffer
Hello,I am having trouble with a call to HAL_SAI_Transmit_DMA() to transfer data to our audio codec.Buffer stored in RAM: unsigned char sweep_tone[80000]. For the sake of this demo, I've filled the buffer with 16-bit samples counting from 0 - 39999.The SAI interface is configured for 16KHz, 16-bit samples, mono (i.e., data is the same on both channels)When I call HAL_SAI_Transmit_DMA(&hsai_BlockB1, pBuffer, 500); the first 500 samples are continuously transferred, as expected. I confirmed this by monitoring the I2S signal with a Saleae.However, when I call HAL_SAI_Transmit_DMA(&hsai_BlockB1, pBuffer, 40000); the I2S only shows the values 0 to 7231 being clocked out.The number 7231 is interesting to me. The size argument to HAL_SAI_Transmit_DMA() is 16 bits, and UINT16_MAX =65535. If there's a conversion someplace in the HAL calls that converts 40000 samples to 80000 bytes, this would overflow to 14465 bytes, which is 7232.5 samples, truncated to 7232, which
I followed the tutorial from this video: https://www.youtube.com/watch?v=6JPys9B497c to practice setting up BLE.After flashing to the NUCLEO-WBA55CG, the ST BLE Toolbox app still cannot detect the device.I also noticed that after it executes: UTIL_LPM_EnterLowPower(); the program seems to stop.From the UART1 log, I only see:==>> Start Ble_Hci_Gap_Gatt_Init functionSuccess: aci_hal_write_config_data command - CONFIG_DATA_PUBADDR_OFFSETPublic Bluetooth Address: 00:08:e1:2a:12:34Success: aci_hal_write_config_data command - CONFIG_DATA_IR_OFFSETSuccess: aci_hal_write_config_data command - CONFIG_DATA_ER_OFFSETSuccess: aci_hal_set_tx_power_level commandSuccess: aci_gatt_init commandSuccess: aci_gap_init commandSuccess: aci_gatt_update_char_value - Device NameSuccess: aci_gatt_update_char_value - AppearanceSuccess: hci_le_set_default_phy commandSuccess: aci_gap_set_io_capability commandSuccess: aci_gap_set_authentication_requirement command==>> End Ble_Hci_Gap_Gatt_Init
I'm using the STM32F103C8T6, and trying to blink my LED via the interrupt handler of a DMA with this code#include <stdint.h> // STM32F103C8 is a medium density device, hence we use the xB header #include <stm32f103xb.h> #if !defined(__SOFT_FP__) && defined(__ARM_FP) #warning \ "FPU is not initialized, but the project is compiling for an FPU. Please initialize the FPU before use." #endif int main(void) { uint32_t blinking[2] = { GPIO_BSRR_BR8, GPIO_BSRR_BS8 }; uint32_t dest = 0; RCC->CR |= RCC_CR_HSION; while ((RCC->CR & RCC_CR_HSIRDY) == 0) ; RCC->AHBENR |= RCC_AHBENR_DMA1EN; // Enable clock for DMA1 RCC->APB2ENR |= RCC_APB2ENR_TIM1EN; // Enable clock for TIM1 RCC->APB2ENR |= RCC_APB2ENR_IOPAEN; // Enable IO port A NVIC_EnableIRQ(DMA1_Channel2_IRQn); DMA1_Channel2->CCR |= DMA_CCR_MSIZE_1 // 32-bits memory size | DMA_CCR_PSIZE_1 // 32-bits peripheral size | DMA_CCR_MINC // Memory increment | DMA_CCR_CIRC // Circular mode
Some of the STM32 CPUs have a USART with a Timeout timer which is good for modbus applications.Is there any overview available which CPU devices have this specific periperal implemented?In the Datasheet this function is called RTOIE, or RTOR.
Hello everyone,Hope you are all doing well. I am currently working on a BMS that includes an STM32L562VET6Q MCU and other peripherals.ARINC429 is completely new to me. This week, I have been reading the ARINC 429 (HI-35850) datasheet and trying to correctly configure the SPI on my MCU to send data to the ARINC. In this post, you will find the I/O connections between the ARINC and my MCU. For now, I am only using CS, SCK, and SI to send data, and I am monitoring CS, SCK, SO, and SI on my picoscope with wires directly pinned to the ARINC.Below, I will provide the configuration files for SPI, GPIO, and ARINC so you can better assist me.My problem is that, compared to the datasheet, I do not see the exact data frames I was expecting after reading the datasheet. Since I am new to this protocol, I am confused about what to expect, which I believe is due to a lack of understanding. Therefore, I hope someone can kindly guide me through this issue and correct my configuration if possible.Thanks
SVD version 1.2, vs RM0468 Rev 3The SVD file is missing the following IRQ numbers OTG_HS_EP1_OUT_IRQn = 74, OTG_HS_EP1_IN_IRQn = 75, OTG_HS_WKUP_IRQn = 76, OTG_HS_IRQn = 77, RNG_IRQn = 80, BDMA_Channel0_IRQn = 129, BDMA_Channel1_IRQn = 130, BDMA_Channel2_IRQn = 131, BDMA_Channel3_IRQn = 132, BDMA_Channel4_IRQn = 133, BDMA_Channel5_IRQn = 134, BDMA_Channel6_IRQn = 135, BDMA_Channel7_IRQn = 136, ECC_IRQn = 145, DTS_IRQn &n
SVD version 1.2, vs RM0468 Rev 3SVD file is missing registersDBGMCU_APB1HFZ1DBGMCU_PIDR4DBGMCU_PIDR0DBGMCU_PIDR1DBGMCU_PIDR2DBGMCU_PIDR3DBGMCU_CIDR0DBGMCU_CIDR1DBGMCU_CIDR2DBGMCU_CIDR3SVD list reserved memory sections as registersDBGMCU_APB3FZ2DBGMCU_APB1LFZ2DBGMCU_APB2FZ2DBGMCU_APB4FZ2
SVD version 1.2, vs RM0468 Rev 3RCC PLLxDIVR has errorsRCC->PLL2DIVR, DIVN1 should be DIVN2RCC->PLL2DIVR, DIVP1 should be DIVP2RCC->PLL2DIVR, DIVQ1 should be DIVQ2RCC->PLL2DIVR, DIVR1 should be DIVR2
SVD version 1.2, vs RM0468 Rev 3SVD file contains references to a second usb module that doesn't exist.OTG2_HS_DEVICEOTG2_HS_HOSTOTG2_HS_PWRCLK
Dear Sir,I am working on reading values from 10 ADC channels of the STM32WB55CGU6 (WeAct Studio board). However, I am not getting the correct voltage readings. Please note the following details about my setup:I am using USB (Virtual COM Port) to print the values.I have set the reference to 3.3 V.The ADC output is not stable, and temperature readings are also included.I would like to properly calibrate the ADC so that I can obtain accurate values, including the temperature in degrees Celsius. I have attached my code for your reference.The main issues I am facing are:Around 70 mV offset – up to 70 mV, the ADC prints 0 V.The ADC values are not stable – they vary by about 100 mV.Could you please review my code and guide me on how to correctly calibrate the ADC for stable and accurate results?Your support will be very helpful.
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.