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 STM32WB05KZ using the BLE RC Peripheral example from STM32CubeMX.I added a push button on PA1 and an LED on PA0.My goal:Read PA1 button stateTurn ON LED on PA0 when button is pressedSend BLE notification to the central deviceContinuously print PA1 state every 1 second on the serial monitorHere is the code snippet:APP_DBG_MSG("SW1 OK\n"); uint32_t lastPrint = 0; // Print every 1 second if ((HAL_GetTick() - lastPrint) >= 1000) { lastPrint = HAL_GetTick(); uint8_t state = HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_1); APP_DBG_MSG("PA1 State = %d\n", state); } while (1) { // Needed for BLE MX_APPE_Process(); } The output I get is:aci_gap_configure_filter_accept_and_resolving_list command ==>> End BLE_Init function Services and Characteristics creation Success: aci_gatt_srv_add_service command: RC_LR_Periph End of Services and Characteristics creation Success: aci_hal_set_radio_activity_mask command==>> Success: aci_gap_set_adver
HI all i have been working with LTDC to drive an external RGB parallel display . i made it working by placing the framebuffer inside internal RAM . i got output with good update speed. but when i try to incoperate FREERTOS with this project the output is gone . any one encountered such issues like this , any solution for this now? ;)
Hi i am struggling to make SPI work on my nucleo-h723z board. I am using Cubemx to configure and i press when asked to used the default setup for the nucleo board when creating the project.CubeIDE is v. 1.15.1CubeMX is v. 1.11.1my code is very basic: while (1) { /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ uint8_t address = 0x80; HAL_SPI_Transmit(&hspi4, &address, 1, 100); HAL_Delay(1000); }I have put a logic analyzer on the clock, MOSI and MISO, but no matter what, I can only see the clock signal. SPI in cubeMX is: Any suggestions?Friendly Regards, David
Hello All, Attached is the snapshot taken using logic analyser on PWM & Hall Effect TTL Signals. Trying with 446 & IHM08M1 – Open Loop.D0 – PWM1 & D1 – PWM1 ND2 – PWM2 & D3 – PWM2 ND4 – PWM3 & D5 – PWM3 ND6 – Hall Effect UD7 – Hall Effect VA0 – Hall Effect W (No extra digital channel, using the analog channel as digtal).Practical Explanation Required at each cycle.D6 rising edge makes PWM1 & PWM1N to operate until D3 rising edge –which winding is energised?Like this, explanation required for 1 full cycle wrt to Phase Energising.
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 and a linker script content. Please read this post: How to insert source code.i, I am using STM32C092CCT6 with FDCAN.I transmit one CAN frame every 100 ms (even tried 50 ms).But on the receiver side, I always receive frames only every ~497 ms.It looks like something is delaying or buffering the frames.What I want to know:Which FDCAN settings could cause the frames to appear only every ~497 ms?My problem summary:Tx interval configured: 100 ms → Rx sees ~497 msTx interval configured: 50 ms → Rx still ~497 msSo the transmit timing is not coming out correctly.Request:Please check if anything is wrong with my FDCAN configuration (below)./** * @brief FDCAN1 Initialization Function * None * @retval None */ static void MX_FDCAN1_Init(void) { /* USER CODE BEGIN FDCAN1_Init 0 */ /* USER CODE END FDCAN1_Init 0 */ /* USER CODE BEGIN FDCAN1_Init 1 */
I've attempted to get an interrupt when one of the three CAN transmit mailboxes empties. In MX:It generated: /* CAN interrupt Init */ HAL_NVIC_SetPriority(CAN_TX_IRQn, 0, 0); HAL_NVIC_EnableIRQ(CAN_TX_IRQn); HAL_NVIC_SetPriority(CAN_RX0_IRQn, 0, 0); HAL_NVIC_EnableIRQ(CAN_RX0_IRQn); HAL_NVIC_SetPriority(CAN_RX1_IRQn, 0, 0); HAL_NVIC_EnableIRQ(CAN_RX1_IRQn); HAL_NVIC_SetPriority(CAN_SCE_IRQn, 0, 0); HAL_NVIC_EnableIRQ(CAN_SCE_IRQn); I am using the HAL method HAL_CAN_AddTxMessage. This method seems to be working because I see CAN data on the wire. However, I never get an interrupt. I have a breakpoint on this function:void CAN_TX_IRQHandler(void) { /* USER CODE BEGIN CAN_TX_IRQn 0 */ /* USER CODE END CAN_TX_IRQn 0 */ HAL_CAN_IRQHandler(&hcan); /* USER CODE BEGIN CAN_TX_IRQn 1 */ /* USER CODE END CAN_TX_IRQn 1 */ } and it never gets there. Why might this be?
Hi,I'm trying to implement a simple tickless idle on my STM32H7 running on the CM7 core i use TIM1 for TimeBase.I followed the example from this video:https://www.youtube.com/watch?v=hVlpf1Rm4QoMy question is how it works, because the default implementation in FreeRTOSConfig.h is:Why is time to sleep set to __x__ = 0; ???#if configUSE_TICKLESS_IDLE == 1 #define configPRE_SLEEP_PROCESSING(__x__) \ do { \ __x__ = 0; \ PreSleepProcessing(__x__); \ }while(0) #define configPOST_SLEEP_PROCESSING PostSleepProcessingWith this implementation and my PreSleepProcessing and PostSleepProcessing functions I use an LPTIM to wake up (similar to the video):__weak void PreSleepProcessing(uint32_t ulExpectedIdleTime) { /* place for user code */ HAL_GPIO_WritePin(LED_1_GPIO_Port, LED_1_Pin, GPIO_PIN_SET); //HAL_TIM_Base_Stop_IT(&htim1); HAL_SuspendTick(); // suspend SysTick timer HAL_LPTIM_TimeOut_Start_IT(&hlptim1, 0xFFFF, ulExpectedIdleTime); // enable interrupt from low-power tim
Hi,Vous avez dit :I’m using the STM32H753ZIT6 in my design and I’m looking for clarification on the correct way to connect the VCAP pins. Since the LQFP144 package does not support the VDDLDO pin, what is the recommended capacitor configuration for VCAP?Should I use 2 × 100 nF capacitors to GND, or 2 × 2.2 µF to GND?Additionally, if there is no VDDLDO pin available on this package, how does the VCORE receive its internal supply voltage? Is there an internal voltage regulator that is powered directly from VDD?Thanks in advance for the guidance!
Need getting-started help with STM32C011J6M6 MCU and USART1 in single-wire Async mode (using STM32Cube toolchain and C language.)The hardware configuration is just the STM32C011J6M6 MCU (8-pin SOIC package) with one pin (pin 1) pulled up (4.7K to 3.3V). Intent is to use this in single-wire Async mode to communicate with outside world. All other MCU pins have similar pull-up resistors but are not otherwise connected. Power to the MCU for this test is furnished by the STLINK device. The test is using programmed I/O (no DMA, no interrupts.) The test program solely is written to experiment with the USART1 in single-wire mode on this device; there are no other aspects being tested or included. Tools in use:IDE 1.19.0MX 6.15.0PROG 2.10.0 Used STM32CubeMX to generate code template (targeting STM32CubeIDE), STM32CubeIDE to build the example (C-language) program, and STM32CubeProgrammer to push the resulting (elf) binary to the device using STLINK attached to the&nbs
Hi all, My goal is to develop a personal STM32 + TouchGFX project.I’m reaching out to you because I’ve gone through all the tutorials, YouTube videos, GitHub repositories, ChatGPT, etc., without finding a solution.I followed the tutorial ''https://www.youtube.com/watch?v=__wggrTcx_0''. It works at the end of the video,but when I reproduced it step by step exactly as shown, the result was a white screen. Let me explain:Here is my project: STM32F429I + SDRAM + FLASH N25W128 + RIVERDI RGB888 LCD with framebuffer management.My STM versions: CubeIDE 2.0 - CubeMX 6.15 - TouchGFX Designer 4.26. ST recommends starting a project with TouchGFX Designer.But since my project is custom,TouchGFX Designer does not offer a “custom” template. So how do I start my project? I therefore started with CubeMX, but after integrating TouchGFX into IDE with a background image (TouchGFX),the screen remains white. So I’m looking for a step-by-step method to successfully complete my project, namely, as a first st
Hai All, New to the workbench software. Able to set the required parameters - STM32F446RE & IHM08M1. Getting stuck in the final path - CubeMx & IDE. But I am having the latest updated one. Kindly help me where I am missing.Jayaraj.A
Hello ST communityWhat voltage margin would you suggest if using the motor STSPIN32G0A2 controller IC ? The supply voltage of the IC is rated from 15-45V. Is it safe to supply it with 36V and connect a BLDC motor to it? I am scared that the IC may be damaged due to voltage transients. This question may sound a bit silly, but I need some opinions.The motor is a 150W maxon EC 60 flat type, and the product is intended for the consumer industry. A gear with a ratio of 1:26 is connected and the motor and it is used to propel a machine (size of a vacuum cleaner) that is moving with a constant speed on the ground. The power supply is a mean well RPS-300-36-C type and the PCB also features a bulk capacitor of 2200 uF. The schematic and layout is similar to the STEVAL SPIN3202.Thank you for sharing your opinions.
Hello.I got a STM32U599J-DK engineering sample from the ST official warehouse (don't ask me how I get this cuz I don't know either).MB1829-U599 NJQ-B01A223400084I searched the st.com and was unable to locate its resources.(user manual, datasheet, data brief, OBD binary).I wonder if any ST employee got these resources and send them to me if you please as I wish to reuse this board to it's full extent.Or, are its resources compatible with the STM32U5A9J-DK's? If so, please send me an original OBD demo of the STM32U599J-DK if available.Thanks in advance.
In your middle-ware for the usbpd i can't find any of the definition for the functions in usbpd_core.h.https://github.com/STMicroelectronics/stm32-mw-usbpd-core Example* USBPD_PE_SVDM_RequestMode* USBPD_PE_SVDM_RequestModeEnter* USBPD_PE_SVDM_RequestModeExit Can't be found anywhere in the repo. It looks like you compiled them all down to assembly files. Is there a reason for this or am i missing something?
Hi Everyone,I already have IPv4 via DHCP working on STM32H753ZI with Azure RTOS (ThreadX + NetX Duo). I need help getting IPv6 via SLAAC (stateless autoconfiguration) working. Best Regards,Divya P
Hello, STM employees,I have bought the NUCLEO-N657X0 board with the intentions of using its USB on the go module. I have previous experience with USB with STM32f401, where I had to employ a single function CDC_Transmit(), and STM32CubeIde and Hal did the rest. It was simple and easy to implement. Currently Im struggling with doing the same with the N6 MCU, but proved impossible. I've tried all tutorials found on your site and community available ones, but could not find a single example that would send "Hello World!" to my PC. I'm sure my board works as I've run a basic blink sketch from the external ROM.Please, if you could add the same middleware for f401 to n657, that would be great.
Hi, I have an STM32C092RCT6U development board and I am trying to perform UART-based bootloading. My board has a B3 button for selecting the boot mode. I am using the Flash Loader Demonstrator to flash the application, but I keep getting the following error:“No response from the target, the bootloader cannot be started.” I also tried using STM32CubeProgrammer. I configured it for UART and attempted to connect, but the connection fails with the error: “Activating device: KO. Please verify the boot mode configuration and check the serial port configuration. Reset your device and try again.” I am using a USB-to-UART module connected to PA10 (RX) and PA9 (TX) with the lines crossed (TX→RX, RX→TX).I also tested using inbuilt Virtual COM port, However, the device is unable to communicate and does not enter the bootloader. Could you please help me resolve this issue?
Hello,For the last couple of days I have tried to create a bit stream with DMA using a timer but have not yet succeeded. The problem seems to be loading the data from an array into the timer register. I have tried this exact same code on an STM32L072 and it worked perfect but when going to the STM32U083 it doesnt anymore. Since the STM32U083 is a newer model I cant find too much about it online so if anyone also has some recommendations on info about this microcontroller and the HAL library online I would appreciate it. The settings of the timer, when I change the pulse I can see this on the scope. Also when using the DMA function to load the data in it seems that the pulse is dependent on the length of the array, it just seems like it doesnt use the values in the array. Below you will find the code, everything seems to work as the callback is also triggered when the pulse is finished./* ****************************************************************************** * @file: H
Hi,I am working on a pretty simple GUI and everything is working nicely so far.As soon as I add a video I am getting a compilation error. See below. If I take the video out, everything works.Since TouchGFX needs mjpeg format, I had to convert my video file into mjpeg. The file works fine in windows. I don't know if it could be from an issue with the format or if there is an actual problem with TouchGFX itself.What do you guys recommend to generate or convert mjpeg files? Run Simulator Generate Done Generate Assets make -f simulator/gcc/Makefile assets -j8 Reading ./application.config Reading ./target.config Done Post Generate touchgfx update_project --project-file=simulator/msvs/Application.vcxproj Done Compile make -f simulator/gcc/Makefile -j8 Reading ./application.config Reading ./target.config Compiling generated/gui_generated/src/screensaver_screen/ScreensaverViewBase.cpp Compiling generated/gui_generated/src/standby_screen/StandByViewBase.cp
Hi ST Team,I need to implement USB Host Printer support on STM32F767 using USBX.I'm trying to send PCL6 (HP LaserJet) print jobs via USB.Challenge: No Host Printer example exists in stm32-usbx-examples(only Device Printer and Host MSC/CDC).What I need:1. Is USBX Host Printer class available? Any code?2. How to send binary PCL6 data to printer (USB Bulk OUT)?3. CubeMX configuration for USB Host (FS/HS)?4. Printer enumeration and status read examples?5. Any complete working reference project?Current Setup:- STM32F767ZI + FreeRTOS + USBX- HP LaserJet printer (USB)- Using HP's jetlib for PCL6 generationPlease advise or point to relevant docs/code.Thanks,Madhu07
Hi there, I'm using Nucleo-G474RE to send a bit stream over Simulink, instead of receiving 24 bits on the oscilloscope i can read only 8 bits, which are supposed to be the 8 bits in the middle that have the address of the peripheral and the status of the I2C block gives me 516 which is not on the documentation from matlab.
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 and a linker script content. Please read this post: How to insert source code. Hi everyone, I'm trying to interface an ICNA3306 LCD display using STM32's QSPI peripheral. The LCD uses a custom protocol where commands are sent as: Instruction: 0x02 (8 bits, 1-wire) Address: 0x00, CMD, 0x00 (24 bits, 1-wire) Expected behavior: 32 clock pulses (8 instruction + 24 address) Actual behavior: Only 8 clock pulses (instruction only - address phase not transmitted) Here's my code: HAL_StatusTypeDef ICNA3306_WriteCommand(uint8_t cmd) { QSPI_CommandTypeDef sCommand = {0}; sCommand.InstructionMode = QSPI_INSTRUCTION_1_LINE; sCommand.Instruction = 0x02; sCommand.AddressMode = QSPI_ADDRESS_1_LINE; sCommand.AddressSize = QSPI_ADDRESS_24_BITS; sCommand.Address = (0x00 << 16) | (cmd << | 0x00; sCommand.AlternateByteMode = QSPI_ALTERNATE_B
STM32CubeMX v6.5.0 STM32Cube FW_F4 V1.27.0USB_FS HOST CDCusbh_cdc.hfunction static void CDC_ProcessReception(USBH_HandleTypeDef *phost)line 767 if (((CDC_Handle->RxDataLength - length) > 0U) && (length > CDC_Handle->DataItf.InEpSize))fix: if (((CDC_Handle->RxDataLength - length) > 0U) && (CDC_Handle->RxDataLength > CDC_Handle->DataItf.InEpSize))
Hello there,We are working on a project that includes a STM32WB5MMG in a custom board and we would like to update via OTA our firmware application, as well as the BLE stack and FUS. Our project is based on the P-NUCLEO-WB55.Nucleo 2 Images. This project defines two regions (slots) in the flash, one used to store the firmware to run and the other as a storage area for the new firmware image sent via OTA. The question here would be if we update either the BLE stack or FUS if they also have a separate storage area beyond the SFSA address (the start address where the current stack and FUS are stored) or if a flash region between the end of slot 2 and the SFSA address must be reserved as temporary storage for the new stack/FUS image.Thanks in advance
Hi all,I’m working on a custom bootloader for STM32F7, which performs OTA updates using TCP/IP (Ethernet and/or WINC3400 WiFi). The bootloader writes the new firmware to flash, then attempts to jump to the application using the standard sequence: cleaning and disabling caches, setting VTOR, setting MSP, and jumping to the application's reset handler.The Problem:If the application binary is small, everything works: the bootloader jumps and the app runs as expected.If the application binary is larger (for example, over X KB/MB), the bootloader appears to complete the OTA and jump, but the application does not start (no output, no main runs, or immediate lockup/hard fault).What I Have Tried:Verified that the full image is written to flash (checked total bytes and flash content matches binary).Cleaned and disabled D/I caches before jump.Set VTOR and MSP to the application address.Disabled all interrupts, deinitialized all peripherals, shut down the WINC3400, and reset all related GPIOs/SPI
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.