Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hello, Is it possible someone to help how to generate 6 PWM signals with STM32H753ZI. They should be diphase on 60 degrees, im trying to reach 50 khz on each output at least. How to do it, please help me.Thank you in advance.Best Regards,
I am trying to create two phase-shifted PWM waves on an STM32L4 TIM1 using asymmetric mode. From what I understand, I have to:enable output on GPIO channels 1 and 3enable output compare 1,2,3,4 and output compare 1,2,3,4 as asymmetric PWM modeThen, I setCCR1 = 0, CCR2 = ARR, and CCR3 and CCR4 to the outputs provided by the function below. Then I only enable channel 1 and channel 3 as outputs..?So output compare 1 and 2 work together to produce the first PWM on channel 1. And output compare 3 and 4 work to produce the second PWM on channel 3.This is what I understand from the graph on page 754 in the RM. But it is not allowing me to change the phase shift while still maintaining 50 % duty cycle on both waves. When I print my CCR3 and CCR4 values, they are exactly ARR apart, which would make me think that they should produce a 50% duty cycle wave. But they don't. I'd appreciate any help!static void tim_phase_shift(uint32_t ARR, float phase_deg, uint32_t *CCR3, uint32_t *CCR4) {
I was following the tutorial in the link: https://www.youtube.com/watch?v=vy1c1LbypuM&list=PLfIJKC1ud8giOsk-C4BCOwSHtbXqTNb1W&index=3 I couldn't gett the upclick to count greater than 9 and below 0. the screenView.hpp and cpp as follows: hpp: #ifndef SCREEN1VIEW_HPP #define SCREEN1VIEW_HPP #include <gui_generated/screen1_screen/Screen1ViewBase.hpp> #include <gui/screen1_screen/Screen1Presenter.hpp> class Screen1View : public Screen1ViewBase { public: Screen1View(); virtual ~Screen1View() {} virtual void setupScreen(); virtual void tearDownScreen(); virtual void downclicked(); virtual void upclicked(); protected: uint16_t counter = 0; }; #endif // SCREEN1VIEW_HPP cpp: #include <gui/screen1_screen/Screen1View.hpp> Screen1View::Screen1View() { } void Screen1View::setupScreen() { Screen1ViewBase::setupScreen(); } void Screen1View::tearDownScr
Hi everyone!I'm trying to figure out what's wrong with my SPI Peripheral continous transmitting/receiving via DMA in Circular Mode. I think I have coded a pretty basic "Hello, World" for working with DMA, I've just generated code from .ioc file and then added a simple logic. This is my main.c: /* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2025 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** */ /* USER CODE END Header */ /* Includes -------------------------------------------
Using Ux_Device_Audio2.0_PlayBack as an example for STM32H753, I enabled in the .ioc file, but it doesn't seem to be affected in the project. Any idea why? In the .ioc, I have this `UX_DEVICE_CLASS_AUDIO_FEEDBACK_SUPPORT` enabled... should be affecting ux_user.h But ux_user.h is not being used in the project, so I don't think it's actually being built into the .elf file. I also can't find the file in the STM32CubeIDE project as well, although it is under `USBX/App/ux_user.h` in the system explorer... Here's the Project explorer in the IDE: and even opening each of those *.c files doesn't reveal ux_user.h. Lastly, I do have UX_INCLUDE_USER_DEFINE_FILE in the preprocessor: Am I missing something?
Hi,I am working on an application for the STM32N6 (using zephyr) that streams data from four SPI interfaces (SPI1, SPI2, SPI3 and SPI6) via Ethernet (UDP). I am using full-duplex SPI transfers and GPDMA1.Everything works fine up to SPI clock frequencies of 22MHz on all four SPI interfaces. However, as soon as I increase the SPI clock to beyond 25MHz, I start getting DMA transfer errors and erroneous data in my buffers. Obviously, 22MHz full-duplex on four SPI interfaces is already quite fast, but if possible, I would like to go beyond that.I know that Ethernet is not the bottleneck here, since this happens even if I do not stream all data over Ethernet.I was just wondering: Is this performance expected, e.g., due to the high load on the memory bus? What measured could I take to increase performance further?Thanks for your help!
Hello,I am having an issue writing the Hardware Config in the HSO Motor Pilot. I was able to do this with my previous set up, but recently upgraded from Windows 10 to Windows 11. Along with the OS upgrade, I also installed the latest releases for all the ST software so MC Workbench went from V6.3.2 to 6.4.1. I am wondering if this is a Win 11 issue or a MC Workbench issue, or possibly a debugger setting issue?Components Used:MC Workbench V6.4.1STM32CubeMX V6.15.0STM32CubeIDE V1.19.0B-G473E-ZEST1S Control BoardSTEVAL-LVLP01 Power BoardProcess:Generate project in MCWB (Sensorless HSO option) - if errors finish generating in CubeMX - Open in CubeIDE - Build / Flash with default debugger settings via USB to onboard USB STLINK - Connect to MotorPilot (Connects fine, can tune, edit values) - Select Hardware Config (either Read / Fill from UI / Import, all with same result) - Click "Write" then the board doesn't reconnect.The errors I get in the connection bar either say "Port Open and try to
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. Please read this post: How to insert source code.Hallo,I am trying to measure the frequency of rectangular signals. the borad I am using is stm32f411-discoI used the timer 2 channel 1 for input capture. at every capture the timer value will be sent to memery by uing DMA. The DMA seems working, because I printed the captured value periodically. the DMA-Buffer is two, and it is working in a circular mode.I try to do some calculation in the interruption-function: "void HAL_DMA_XferCpltCallback(DMA_HandleTypeDef *hdma)" like this: void HAL_DMA_XferCpltCallback(DMA_HandleTypeDef *hdma) { if (hdma->Instance == DMA1_Stream5) // MCU-abhängig! { uint32_t first = IC_Values[0]; uint32_t second = IC_Values[1]; if (second >= first) diff = second - first; else diff = (0xFFFFFFFF - first + second); /* Timer läuft mit 1 MHz → 1 µs
Hi all i used LTDC hardware inside the STM32f429 discovery board to drive an external 24 bit RGB display in 16 bit mode . full GUI is designed in LVGL library , I was able to build it and flash it. I got the output on the display but with few issues . 1.the update speed of the GUI elements are way too slow , so I cant update it real time 2.I am not getting a precise output .some pixels are lost, 3.can I change the horizontal animation happening when changing the screen 4.How to use DMA2D to copy pixel data to framebuffer 5.I'll put the output image so you can see the color issue , i am not getting pure white its like a red/pink tinted screen from my view LVGL ver-8.3.11 the label is white and arc background color is grey, but this is what I am getting
Hello,I’m currently testing the CSI–DCMIPP interface on the Nucleo-N6 board. I’m following various examples, but the variable used in DCMIPP_Start (lcd_bg_buffer) is not receiving any data. Is there something I might have configured incorrectly?At the moment, the buffer is configured to be stored in ARAM2.
Hi,I’m working with the STM32F407VGTX and I am using GPIO PA4 as the SPI chip-select (CS) pin. In my GPIO initialization, I set the PUPDR register to configure PA4 with a pull-up, expecting the CS pin to remain HIGH when idle. However, I observe on my logic analyzer that after initialization PA4 goes HIGH briefly, then returns LOW (its default state) even though the pull-up is set. I am attaching a screenshot of my logic analyzer for reference.Could anyone please explain why the pin doesn’t remain high with the pull-up configuration, and what’s the correct way to configure PA4 so that CS is HIGH when SPI is not active?Thank you!
The above image represents logic analyzer output when HAL_SPI_Receive_DMA is executed. My doubt is regarding the single high pulse at MOSI line. During HAL_SPI_Transmit_DMA , no issues. Is this normal behaviour? STM as Full duplex master, i have disconnected the slave to check if it was responsible for the high pulse.
I’m using HAL_UART_Receive_IT() on an STM32F103 to receive serial data asynchronously. The UART initialization appears correct, and I can send data successfully, but the HAL_UART_RxCpltCallback() function never gets triggered. I’ve confirmed the interrupt is enabled in NVIC and the buffer size is correct.Is there something I might be missing in configuration or code structure that prevents the callback from firing?Any sample code or debugging steps would be greatly appreciated. Thanks!
Hi,I'm running test on the Discovery board H573I-DK.On a 24 hours period, I measure a 340 ppm precision that is far from the 20 ppm of the LSE Quartz.Is it normal ?
Hello Experts,I am using an STM32F303VET6 MCU and developing in IAR Embedded Workbench for ARM version 9.40.2.My project compiles correctly, and debugging works perfectly when I use the I-Jet debugger.However, when I switch the debugger interface to ST-LINK V2, I experience several issues:Flash loading errorsDebug session failing to startRandom connection or SWD errorsIn general, the application fails to debug reliablyI have verified the following:The device appears in Device Manager as “STM32 ST-LINK”SWD wiring and connectionsSame board works fine with I-Jet, so hardware seems OKCould you please advise on what additional configuration or driver settings I should check in order to make ST-LINK V2 work properly with IAR?Any guidance would be greatly appreciated as this issue is urgent for my project. Error log.Tue Nov 18, 2025 17:43:52: IAR Embedded Workbench 9.40.2 (armPROC.dll)Tue Nov 18, 2025 17:43:52: Loaded macro file: C:\Program Files\IAR Systems\Embedded Workbench 9.2\arm/co
I am currently working with the MT25QL128 flash memory using the Quad-SPI interface on an STM32H7 MCU. I have a technical question regarding the Extended Quad Input Page Program command.In my code, the following command is used: #define EXT_QUAD_IN_FAST_PROG_CMD 0x12The flash write operation works correctly with this command.However, according to the MT25QL128 datasheet, the correct command for Extended Quad Input Page Program appears to be 0x38.My questions are:Is using 0x12 officially supported on MT25QL128, or is it just backward-compatible?Are there any scenarios where using 0x12 might lead to incorrect behavior or compatibility issues?Should I update my code to use 0x38 to be fully datasheet-compliant, even though 0x12 seems to work in practice?I want to ensure that my Quad-SPI write operations are fully compliant with the datasheet and avoid potential issues in programming.Thank you very much for your guidance.
I’m working on a project with an STM32F4 microcontroller and using the I2C bus to connect multiple sensors. Everything works initially, but after some time the communication becomes unstable, returning random values or causing the I2C bus to hang. I have tried lowering the clock speed and checking pull-up resistors, but the issue persists.Has anyone experienced similar issues with I2C on STM32F4 or found a recommended configuration or hardware fix?Any guidance or examples would be greatly appreciated. Thanks!
ADF_AudioRecorder call HAL_DMAEx_List_BuildNode() without initializing pNodeConfig.Init.Mode. So with USE_FULL_ASSERT, it can assert because of assert_param(IS_DMA_MODE(pNodeConfig->Init.Mode));
I turned off all the other configuration aka Alternate Functions..only enabled GPIO PA5 as output Pushpull mode, low freq.its doesnt turn on or off individually..tried to turn on and off using HAL as well as direct registers..both work only when PA4 turns on ...what i mean if i want to turn on PA5 i should turn on PA4, then only it works..what is this causing this issue.can you help me out.tried on multiple hardwares..same issue so hardware issue eliminated, no pin short circuit.
I have an animated image, and I want to make it rotate around a circle. I assume I need to use a container and somehow integrate the TextureMapper into it, but I’m not sure how to do that.
Hi there,I am trying to configure an MCSDK6 project by reference to EVSPIN32G4.On the page of current sensing, I see some config as below: To my understanding, the three shunt current sensing circuits should utilize three operational amplifiers.Why are there just two?Thanks for the help!Best wishes to you guys.
I am trying to modify the BLE_HeartrateFreeRTOS project. I will set the RTC date/time from a timestamp received over BLE from a PC. I need the RTC calendar to be running, as I need to timestamp data readings with a "Unix" timestamp. I also need to perform a certain action on the hour, 15 mins past, 30 mins past, and 15 mins to the hourThe RTC calendar in the heartrate example is run in free running binary mode. I set the time from the PC time sync using HAL_RTC_SetTime & HAL_RTC_SetDate. When I call HAL_RTC_GetTime & HAL_RTC_GetDate later, the date is correct (still todays date) but the time is always 00:00:00. The "SubSeconds" field of my RTC_TimeTypeDef is being filled with a number which decreases as my program runs, but how do I get from this to a "UNIX" timestamp I can log against my data?I did manage at one point to set the RTC mode to be "free running BCD calendar & binary", but CubeMX seems to reset this each time the ioc file is saved.
Hi, I bought 50pcs STM32L151C8T6A from one Chinese online vendor, which has device marking with QR code.I encountered an issue while using the new version chip, after initial power-on, the overall sleep current of the product is approximately 5uA(STM32L151C8T6A in stop mode), When I reset the product's hardware multiple times, there is a high probability that the product's sleep current will reach up to 1.6mA. Once this occurs, the product can only return to normal by being powered on again.With the same hardware, replacing the STM32L151C8T6A with an older version will prevent the issue from occurring.This is a mature product, and this is also my first time using the new version of STM32L151C8T6A. Is the software for the old and new versions incompatible? What should I be aware of?ps: I am using the STM32L series standard library.
Hi all,I designed a sensor board with STM32WL5MOC based on B-WL5M-SUBG1. Due to other constraints I cannot place the antenna directly on the PCB. Therefore I would like to place an U.FL connector (like: https://www.digikey.hu/en/products/detail/hirose-electric-co-ltd/U-FL-R-SMT-1-80/3978495) on the PCB and using an external antenna (like: https://www.digikey.hu/en/products/detail/te-connectivity-linx/ANT-868-PML-UFL/5592353). My question is that, if I follow the design guidelines given in the datasheet of STM32WL5MOC (see 3.4.3.3 point), then can I use this solution? In the datasheet it is also stated that "FCC implies that the antenna must bestuck to the board connector with epoxy glue". Thank you for your comments and suggestions!
Hi everyone, I am trying to run VENC_JPEG_Encoding project using STM32CubeIDE on STM32N6570-DK board, but it is not saving .bmp as stated in README file. Upon further debugging I can see in main.c in function save_file() that it is only supported on IAR system. int8_t save_file(char *pName,uint8_t *pStream,uint32_t szOut) { int8_t ret = 0; #if defined ( __ICCARM__ ) /* stdio FILE works only on IAR system */ FILE *pFile; pFile = fopen(pName,"wb"); if(pFile) { while(szOut) { uint32_t blk = 1024; if(szOut < blk ) blk = szOut; uint32_t written = fwrite(pStream,1,blk,pFile); szOut-= written; pStream+=written; } fclose(pFile); ret = 1; printf("the file %s is in the current folder",pName); } #endif return ret; }so how do i test it in CubeIDE as I am on Ubuntu and IAR doesnt supports Ubuntu till now.Kindly help
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.