Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi,I am using the STM32F407VET6 chip to simulate the SENT protocol. I have encountered some issues and would appreciate it if professionals in the forum could provide some answers.1.Since the SENT protocol signal needs to change the output waveform based on the transmitted data, I attempted to use the TIM BURST feature of the chip to simulate the SENT signal. I am configuring it using STM32CubeMX software. Below are the relevant configurations: 2.The SENT protocol specifies that one tick is 3μs to 10μs. I initially set the PWM to a period of 3μs with a 50% duty cycle square wave and output it. Since I am not very familiar with the TIM BURST feature, I first used the HAL_TIM_DMABurst_WriteStart() function to attempt to modify the waveform originally output by the chip. I plan to change the waveform to the synchronization signal in the SENT protocol, which involves outputting 5 ticks of low-level signal and 51 ticks of high-level signal.Initial PWM output waveform:The de
我正在写BootLoader的程序,我想要实现IAP,我目前编译后生成的.bin文件大小为18kb(之后代码多了还会再增加),但是我APPUP区空间为248KB,我的配置为: Translation (by google translator): "I'm writing a BootLoader program and I want to implement In-App Access (IAP). The .bin file I'm currently compiling is 18kb in size (and will increase as the code grows), but my app upload space is 248KB. My configuration is..." 我想要实现生成的.bin文件为248kb,不够的地方自动填充,我的生成.bin的指令如下 "I want to generate a .bin file that is 248kb in size, with automatic padding if necessary. My command to generate the .bin file is as follows:" 我的编译器版本为: "My compiler version is:" keil5版本为:5.38.0.0 "The Keil 5 version is 5.38.0.0."
Hello,I've been adapting the DRP1M1 USB-PD DRP reference design for use on a custom STM32U5A9 Board, and have run into an issue where it seems like ST's compiled USBPD library just stalls during negotiation as a SRC device.Hardware: STM32U5A9, custom board with TCPP03-M20Library: USBPDCORE_PD3_FULL_CM33_wc32.aConfiguration: DRP, PD3.0## ProblemOperating as SRC, the PE state machine sends ACCEPT in response to a REQUEST but never advances to PE_SRC_TRANSITION_SUPPLY. PS_RDY is never sent and the port partner eventually triggers a hard reset.## What We Have Verified**Protocol layer is working correctly:**- SOURCE_CAPABILITIES sent and GOODCRC received- REQUEST received and GOODCRC sent- ACCEPT sent and GOODCRC received- All confirmed on protocol analyzer**All DPM callbacks returning correct values:**- USBPD_DPM_EvaluateRequest() returns USBPD_ACCEPT (verified via debugger)- USBPD_PWR_IF_GetVBUSStatus(USBPD_PWR_VSAFE5V) returns USBPD_TRUE (VBUS at ~4.8V, threshold 4750mV)- USBPD_DPM_SetDa
Title edited to clarify that the "onboard PHY" refers to a Nucleo-H753ZIi have may issues related to implement the ethernet on stm32h753zi mcu like i am not able properly configure the mpu regions and linker script and its ethernet.c file ...and also have issue related to ping the static ip...if any supporting link related to this issue can be provided..that might be helpful
What is the recommended procedure for adding source files (e.g. source1.c and source1.h) to a STM32CubeIDE project generated by TouchGFX? I assume I add them to one of the 'Core' directories, but I see multiple Core directories (root\STM32CubeIDE\CM7\Application\User\Core and root\CM7\Core). I see that adding my .h manually to root\CM7\Core\Inc works fine for the .h, but the IDE doesn't automatically pick up the .c if I place it in the corresponding root\CM7\Core\Src. If I place the .c in root\STM32CubeIDE\CM7\Application\User\Core, the .c file is accessible via the IDE, but the .h file is not found during compile.What is the proper procedure for adding new user C source files? My STM32CubeIDE is 2.1.1 and TouchGFX is 4.26.1. I'm targeting a Riverdi board with a STM32H7.
Hello Community,I have been involved with embedded Rust since 2020 and I noticed most tutorial, examples, dev boards are targeting the ESP32 processors. This made no sense to me outside of the hobbyist community. I got contacted over a year ago by Manning Publishing about writing a book on Embedded Software with Rust. I decided that I should use STM32 based boards for my examples. The book is now in early release on MEAP (Embedded Software with Rust - David Cabanis). The idea of MEAP is to engage with the early adopters to get feedback to improve the final product (paper book).I was hopping that some of you might want to take a look and offer me some feedback on how to improve the content. You can see the details of the content on the landing page and the Chapter 1 is freely available. Thanks in advance for any of your feedback. It will contribute to the adoption of Rust and put forward STMicroelectonics products in this context. Kindly, David.
Hi! I'm using a STM32N657 Nucleo Board, and, considering the 1.8 V reference voltage for the ADC, the value returned by the ADC is half of what it should be. For example, for a 1,410 V value in the pin, the reading is 1742. Here is the initialization for reference: static void MX_ADC2_Init(void) { /* USER CODE BEGIN ADC2_Init 0 */ /* USER CODE END ADC2_Init 0 */ ADC_ChannelConfTypeDef sConfig = {0}; ADC_AnalogWDGConfTypeDef AnalogWDGConfig = {0}; /* USER CODE BEGIN ADC2_Init 1 */ /* USER CODE END ADC2_Init 1 */ /** Common config */ hadc2.Instance = ADC2; hadc2.Init.Resolution = ADC_RESOLUTION_12B; hadc2.Init.GainCompensation = 0; hadc2.Init.ScanConvMode = ADC_SCAN_DISABLE; hadc2.Init.EOCSelection = ADC_EOC_SINGLE_CONV; hadc2.Init.LowPowerAutoWait = DISABLE; hadc2.Init.ContinuousConvMode = DISABLE; hadc2.Init.NbrOfConversion = 1; hadc2.Init.DiscontinuousConvMode = DISABLE; hadc2.Init.ExternalTrigConv = ADC_SOFTWARE_START; hadc2.Init.ExternalTrigConvEdge
Hello everyoneI'm new here, but i have worked on a flight controller unit FCU with those:FMU Processor: STM32H753IO Processor: STM32F103This FCU then connected to a Raspberry Pi4, auxiliary, where run his drone python software, using MAVlink approach for telemetry data and CAN communication and parameters setup;Right nowWe have a (good) software ready, with some wizard working wellBUTwe have an issue with CAN-motors and our STM chips...Is it possibile that those H753 is NOT able to read a CAN motor ,brand new, out of fabric?or betterIs the chip (H753) ABLE to write a NODE ID on a CAN motor, wich is ut of fabric (nodeID=1) to an actual working NODE ID(10,11,12 etc..)?We had this issue....based on your knowledge..The correct way is to use a CAN-USB to "wake up" motors one by one and then connect to FCU?Thank you
MCU : STM32WLE5CCU6STM32CubeIde version : 2.1.1STMC32CubeMx version : 6.17.0Firmware Package Name and Version : STM32Cube FW_WL V1.5.0Application : FUOTA using LoRaWANSetup : End Node(STM32WL) <===> Gateway(Dragino LPS8) <====> TTNHello everyone,Before i step into complicated FUOTA using LoRaWAN, i was trying some custom downlink packets to switch to Class C from Class A.I was successfully able to send uplink packets.I was successfully able to get the downlink packets both confirmed and unconfirmed and glow led's and perform operations.Now i want to send a downlink packet which switches to class c.I have not enabled Additional LoRaWAN packages yet, i figured switching to class c might really don't need this as long as i am calling the correct API'sBasically if i send a downlink packet 0x01 from TTN, the device switches to Class C.For switching to Class C, I am using `smtc_modem_set_class(STACK_ID, SMTC_MODEM_CLASS_C)` which itself doesn't return any erro
How is it with availability, are we updating what was once part of CubeMX? namely STemWin, i.e. the Segger enWIN version that was offered for free for the STM32 processor?I didn't find anything about ST, except that it's not part of newer versions of CubeMX.You can find STemWIN on Segger's website, but they're basically just trying to sell emWIN at a discount.Alternatively, where can I download the latest version of this library?Thank you for the information.
Hello everyone,I am developing a cellular IoT device using STM32L4 + SIM7600G-H 4G module. The goal is to create a highly reliable driver that can handle every possible disconnection, network drop, MQTT event, and recovery scenario without losing data or getting stuck.Requirements:Heavy use of UART DMA (Circular RX buffer + IDLE line detection)Full finite state machine for modem management (Power on → Network → PDP → MQTT → Operational → Recovery)Robust parsing of all URCs (+CMQTTDISC, +CLOSED, registration changes, etc.)MQTT communication with ThingsBoard (telemetry, client attributes, shared attributes, RPC, firmware OTA/FOTA)Reliable reconnection logic with exponential backoff, message queuing during offline periods, and modem watchdog (power cycle on repeated failures)Questions:What is currently the best recommended way in 2026 to implement such a driver on STM32L4?Has anyone successfully used X-CUBE-CELLULAR with SIM7600 series? Is it worth porting, or is it too LPWAN-oriented for
Hello, ST experts It is found that USB_D+&USB_D- pins(PA12&PA11) of STM32U595 in our own design are very sensitive to ESD strike. When USBPHY power is not on as reference manual said, I think it is only 3.3V tolerant in this case, but not 5V tolerant, am I right?And in 3.3V tolerant case, what ESD protection way should do? e.g. USBLC6 can be effective? Best RegardsYang
Hello, I have recently received a shipment of STM32F446RCT6 microcontrollers and I need verification of the ST label for quality assurance and production clearance. Could you please assist in confirming if the attached label and packaging details conform to official STMicroelectronics standards? [Photo removed to prevent bulk ID abuse]
I would like to use the board's built-in microphone to display audio data visualization on an LCD screen. I want to add more display modes later, but at the moment I only have basic waveform time domain display.I use the built-in microphone to record audio, which I then convert to PCM using PDM2PCM middleware. However, there seem to be no correlation between the sound and the pcm values. Whether I speak, turn the music on, or do nothing at all - pcm values are about the same.Moreover, every position in the PCM buffer hovers around the same value. For example, some positions are about ~-11000 no matter what, and the other are about ~20k no matter what. So, the audio visualization is almost flat with some random noise.I assume that there is something wrong with how I use the mic or pdm2pcm. The I2S and middleware settingsExample PCM values The code/* Private variables ---------------------------------------------------------*/ /* USER CODE BEGIN PV */ /* USE
Hardware: STM32 NUCLEO-WB15CC (STM32WB15CCUX) RTOS: FreeRTOS BLE stack: STM32WB WPAN / BLE via CPU2 (M0+) Hi, When writing a small configuration block (~48 bytes) to the internal Flash from CPU1 (M4 FreeRTOS task), the BLE connection drops immediately. The disconnect event is received on the host side with no prior warning, and the firmware logs a HCI_DISCONNECTION_COMPLETE_EVT shortly after the Flash erase/write sequence begins. The Flash region used is a dedicated 2 KB NVM page at address 0x0801B000 (defined in the linker script as FLASH_NVM): FLASH_NVM (rx) : ORIGIN = 0x0801B000, LENGTH = 2K --- Data Written --- The payload written is 48 bytes (already 8-byte aligned), structured as: [magic: uint32_t (4 B)] [Config_t (40 B)] [checksum: uint32_t (4 B)] The Config_t struct: typedef struct { uint16_t volume_shown; uint16_t client_timeout_ms; uint16_t cup_detection_threshold; uint16_t flow_timeout_forward_ms; uint16_t flow_timeout_backward_ms; uin
Hi Team,I am working on board design using STM32H745 (LQFP176 package), and I would like to confirm the correct external memory selection for my smart kitchen application.Application details:- MCU: STM32H745 (dual core)- Package: LQFP176- USB OTG FS used as HOST to interface a USB camera- Camera usage: Snapshot (JPEG only, no continuous video streaming)- Current: 2MP- Future plan: up to 5MP snapshot- Additional peripherals:- I2S (audio codec interface)- 4× I2C buses- UART / RS485- 2× SPI For external memory, can I use QSPI PSRAM (APS6404L 8MB), or should I use SDRAM via FMC? Please advise which memory type is recommended. Any guidance or recommended reference designs would be helpful. ThanksSathiya
Hi everyone, I’m using MotorControl Workbench with X-NUCLEO-IHM08M1 and NUCLEO-G474RE and browsing through the user manual: file:///C:/Program%20Files%20(x86)/STMicroelectronics/MC_SDK_6.4.2/Documentation/html/pages.htmlIn my project (under the various headings in the left-hand section), there are a few settings that I don’t know how to configure, and I can’t find any explanation for them in the manual. I will list the parameters in question, grouping them by category.1) PWM Generation1a) What is PWM Idle state high side? And low?Should I set them according to what is written in the L6398? If it uses active high inputs for the upper side (HIN) and active low inputs for the lower side (LIN), I think I should set them that way, right?1b) How to set Charge boot capacitor duty and Charge boot capacitor time?I will refer to “AN5789 Considerations on bootstrap circuitry for gate drivers",but I ask you for advice on these two parameters (duty and time)2) Current Sensing2a)
Hello, I was able to successfully implement a way to read motor status and various parameters through UART on putty with my B-G431B-ESC1. However, when I tried following tutorials to add a way to also control the motor status (turning it on and off), I keep getting no response from the motor when I type commands in putty. I don't know if something is wrong with my code or with the way I set up putty, but im leaning more towards the code since the TX part works well. Im quite a beginner with this so maybe its something very ***, but i really cant wrap my head around it. Linked to the post is my main.c. thank you.
Hello, In order to comply in advance with the incoming CRA regulation, we would like to have RDP1 enabled on our U575. In order to do this the fw, in the early stages of the initialization procedure, will have to check if it's in RDP0 by reading the related OBs and, if so, it will set RDP1 using HAL_FLASHEx_OBProgram: HAL_FLASH_Unlock(); HAL_FLASH_OB_Unlock(); HAL_FLASHEx_OBGetConfig(&OptionsBytesStruct); if(OB_RDP_LEVEL_0 == OptionsBytesStruct.RDPLevel) { OptionsBytesStruct.OptionType = OPTIONBYTE_RDP; OptionsBytesStruct.RDPLevel = OB_RDP_LEVEL_1; if(HAL_OK == HAL_FLASHEx_OBProgram(&OptionsBytesStruct)) { HAL_PWR_EnterSTANDBYMode(); //HAL_FLASH_OB_Launch(); } } So far so good, but now it's time to make this changes effective. As far as I understand from other tickets and by practically testing on my board, calling HAL_FLASH_OB_Launch (commented in my code) will enable RDP1 only after a power cycle of the board. I tried to issue a hard reset usi
Hi everyone,I have successfully implemented a USB VCP device on STM32G0C1 microcontroller, and it communicates perfectly with my PC.To meet current product trends, I am migrating the connector to USB Type-C (schematic attached). I am keeping it as a USB 2.0 interface. For reference, here is my current pin configuration based on the schematic:GND (Pins 1 & 12): Grounded.VBUS (Pins 2 & 11): Left floating (my device is self-powered and does not require host power).CC1 / CC2 (Pins 3 & 9): Each independently pulled down to GND via a 5.1kΩ resistor.During testing, I encountered the following issue:Using a Type-A to Type-C cable: The PC successfully recognizes the device and it works perfectly.Using a Type-C to Type-C cable: The PC fails to recognize the device at all.Could you please help me check if there is an error in my schematic? Are there any specific Type-C initialization rules or pin configurations that I must follow for C-to-C connections to work properly?Thanks in
Hello, when I was using the SDIO of F407, I encountered a problem where the SD card could only read but not write. When I enabled "HardwareFlowControl" and set "ClockDiv" to 2, the function was normal. Why is that? When I operate the SDMMC of the H750, it's the same. It must be set to the above Settings.I checked the waveform of the SD card. In terms of waveform quality, it's okay.The waveform of the clock is shown in the following figure
Hello, I am developing a project using the TCPP03 (X-NUCLEO-DRP1M1) and the ST USB-PD stack on an STM32G0 with FreeRTOS. I am concerned about the thread safety of the FLGn interrupt handling. In the standard BSP examples, the EXTI interrupt calls BSP_USBPD_PWR_EventCallback(). I2C Contention: Since BSP_USBPD_PWR_EventCallback() performs blocking I2C reads (ReadFlagRegister), what prevents the PE_Task or CAD_Task from attempting an I2C transaction at the same time? ISR Safety: In an RTOS environment, is it considered safe to perform blocking I2C calls inside the FLGn ISR, given the risk of HAL_BUSY or kernel priority issues? Best Practice: Does ST recommend a Deferred Interrupt pattern (e.g., using USBPD_DPM_CADTaskWakeUp) to move the I2C diagnostic logic out of the ISR and into a thread context?
Hello, I am following this guide:How to integrate TouchGFX and camera middleware on an STM32N6570-DK and seem to be getting an I2C1 undefined reference (below). Is there something I need to change? I have I2C2 enabled in my .ioc, but don't see anything about enabling I2C1C:/TouchGFXProjects/VisionControlboard/STM32CubeIDE/Appli/Debug/../Middlewares/stm32-mw-camera/cmw_camera_customized.c:1951:(.text.CMW_CAMERA_IMX335_Init+0x144): undefined reference to `BSP_I2C1_Init' C:/ST/STM32CubeIDE_2.0.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/TouchGFXProjects/VisionControlboard/STM32CubeIDE/Appli/Debug/../Middlewares/stm32-mw-camera/cmw_camera_customized.c:1951:(.text.CMW_CAMERA_IMX335_Init+0x148): undefined reference to `BSP_I2C1_DeInit' C:/ST/STM32CubeIDE_2.0.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltool
void HAL_MRSubG_IRQ_Callback(void) { uint32_t irq = __HAL_MRSUBG_GET_RFSEQ_IRQ_STATUS(); if (irq & MR_SUBG_GLOB_STATUS_RFSEQ_IRQ_STATUS_RX_OK_F) { last_rx = HAL_GetTick(); HAL_GPIO_WritePin(LD1_GPIO_Port, LD1_Pin, GPIO_PIN_SET); if (HAL_MRSubG_GetBytesOfTransaction() <= ring_buffer_u8_free(&radio_ring_buffer) && radio_packet_fifo_free(&radio_packet_fifo) != 0) { for (uint8_t i = 0; i < HAL_MRSubG_GetBytesOfTransaction(); i++) { ring_buffer_u8_write(&radio_ring_buffer, radio_rx_buf[i]); } radio_packet_t radio_packet = { .len = HAL_MRSubG_GetBytesOfTransaction(), }; radio_packet_fifo_write(&radio_packet_fifo, radio_packet); } __HAL_MRSUBG_STROBE_CMD(CMD_RX); __HAL_MRSUBG_CLEAR_RFSEQ_IRQ_FLAG( MR_SUBG_GLOB_STATUS_RFSEQ_IRQ_STATUS_RX_OK_F); } if (irq & MR_SUBG_GLOB_STATUS_RFSEQ_IRQ_STATUS_RX_TIMEOUT_F) { __HAL_MRSUBG_STROBE_CMD(CMD_RX); __HAL_MRSUBG_CLEAR_RFSEQ_IRQ_FLAG( MR_SUBG_GLOB_STATUS_RFSEQ_IRQ_STATUS_RX_TIMEOUT_F); } if
Hello, I want to cancel my attendance to one of the online workshops as I won't be able to attend, by I can't find any contact information or procedure to do it.
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.