Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
I'm working with an STM32G431KBUx and trying to output a waveform via DAC1 using DMA and TIM6 as trigger (TRGO). I’ve successfully configured the DAC and DMA using STM32CubeMX. However, the DMA callbacks HAL_DAC_ConvCpltCallbackCh1 and HAL_DAC_ConvHalfCpltCallbackCh1 never get called. Here’s what I’ve checked so far: DMA handle is linked manually:hdac1.DMA_Handle1 = &hdma_dac1_ch1; Trigger is set to Timer 6 Trigger Out event. DMA is configured in Circular Mode. I'm calling HAL_DAC_Start_DMA(...) with a buffer of 2 * 64 samples (12-bit aligned). Callback functions are correctly named and defined in main.c: void HAL_DAC_ConvHalfCpltCallbackCh1(DAC_HandleTypeDef *hdac1) {// Never called}void HAL_DAC_ConvCpltCallbackCh1(DAC_HandleTypeDef *hdac1) {// Never called} /* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ***************************************
We have a 480W 800H TFT display that TouchGFXDesigner can nicely display in landscape mode instead of portrait.The trouble is that the device UI is now upside down. TouchGFXDesigner doesn't seem to accept other display rotations such as 180 and 270. Correct? The designer does allow for the text to be rotated 180 which would look correct on our display. But that has other consequences.Has anyone else had this issue?
Hello,I have two questions regarding the STM32U0 series and the RM0503 reference manual:1/ HSISYS Divider ConfigurationIn RM0503, for the STM32U0 series, it is stated that HSISYS is a clock derived from HSI16 after division by a value from 1 to 128.This is shown in Figure 11: Clock Tree (page 157).However, there appears to be no field in the RCC registers to configure this divider.In the "STM32U0 – RCC Reset and Clock Controller" presentation, an HSIDIV value is mentioned, but this name does not appear anywhere in the RM.The only potentially related fields are HSITRIM and HSICAL in the RCC_ICSCR register, but as far as I understand, these do not perform frequency division in the traditional sense.Could you clarify whether the HSIDIV functionality is present in STM32U0 and, if so, how it is configured?2/ Inconsistency in RCC_CFGR Description (SW Field)In the RCC_CFGR register description for the SW field, the RM states:"The setting is forced by hardware to 000 (HSISYS selected) whe
Hello, I’m working on a LoRa(e220-400t22d) communication project using an F411 Blackpill and a Nucleo F446 board. The Blackpill is connected to the transmitter LoRa module, while the Nucleo board is connected to the receiver module. On the transmitter side, I’m reading a 12-bit ADC value and packaging it for transmission. Using the debugger, I can correctly monitor the variables on the transmitter. However, after flashing the code and powering up the transmitter, when I debug the receiver board, I can’t see any variable values updating at all. Note: I’ve configured both LoRa modules to have the same address and channel(etc.) settings. While the transmitter LoRa module warms up, there is no activity on the receiver LoRa side. I’ve attached both transmitter and receiver main.c files for reference.
Hi all,I'm trying to get one pulse mode working on the TIM1 of the STM32H755. The goal is taking a pulse from one pin as a trigger, starting the pulse, counting 32 clock cycles on another pin, and then resetting the output. This controllers tech tutorial is very close to what I'm trying to do, only he uses the internal clock. Regardless I haven't been able to get even that to work. I might be missing something but I haven't found anything in RM0399 to indicate that anything should be different. One weird thing is that TIM1_CH2 (the TI2FP2 pin) is pulling down the input, which is confirmed by there being a square wave when the wire is disconnected but it immediately vanishes when connected. I've attached the configuration function for TIM1 below, and in main I call HAL_TIM_OnePulse_Start(&htim1, TIM_CHANNEL_1); right before the while loop.static void MX_TIM1_Init(void) { /* USER CODE BEGIN TIM1_Init 0 */ /* USER CODE END TIM1_Init 0 */ TIM_SlaveConfigType
I am currently using the STM32N657 to drive an 800x480 pixel display with 24-bit color. The problem that I am running into is the buffer that I need uses 1.1MB (800*480*3 = 1.152MB). Using just FSBL, I am limited to 511KB of SRAM. I know that this chip has 4.2MB of SRAM on it, so how do I access that SRAM for my buffer?
Hello,On flash option byte I need to use only one sector. Only Edata bank1 is activate. No other option bytes are required.CubeMx generate MX_FLASH_Init with Edata configuration commented. What other option byte is necessary to select to use Edata on bank1?Can you help me?target: STM32H563ZIstm32CubeMx 6.11.0stm32Cube MCU Package STM32H5 1.2.0 Regards
We have a STM32070CBT6 with minimal connections (schematic below) and it appears to be unresponsive to USB enumeration, although it does pull DP low to trigger it. This occurs when hotplugging it or holding reset low for a few seconds. I've checked the input on PF0 and it is getting a clean 16 MHz.
I am developing a board using an STM32U535RETQ - 64 pin QFP pkg. The part is an SMPSU capable "Q" variant - although we are only using the STM's internal LDO... NOT the SMPSU.I am using CubeMx 6.14 and StmIDE 1.18 to produce my ioc and compilation.The 14bit ADC1 is performing as expected when set to convert internal signals - Vdd and Vbatt.The signal to be converted is a low frequency DC signal - we're measuring current via a precision sense resistor and instrumentation amplifier.Calibration performed during programme "init" :- ADC_ChannelConfTypeDef sConfig = {0}; hadc1.Instance = ADC1; sConfig.Channel = ADC_CHANNEL_3; // Ch3 intended- ****************************************** sConfig.Rank = ADC_REGULAR_RANK_1; sConfig.SamplingTime = ADC_SAMPLETIME_12CYCLES; sConfig.SingleDiff = ADC_SINGLE_ENDED; sConfig.OffsetNumber = ADC_OFFSET_NONE; sConfig.Offset = 0; if (HAL_ADC_ConfigChannel(&hadc1, &sConfig) != HAL_OK) { Error_Handler(); } if ( HAL_ADCEx_Calibr
Hello,I want to interface NHD-2.7-12864WDW3 OLED display with STM32H755 Nucleo and show some data in display-4 wire SPI-. I had connected all OLED pins to STM32 correctly and than tried to flash this code (that I've attached). But i did not get any output, OLED display did not even glow.I dont know where i am doing wrong, can you help me on this regard? Pin 1 (VSS) → GNDPin 2 (VDD) → +3.3 VPin 3 (NC / BC_VDD) → no connectionPin 4 (D/C) → PA9 (GPIO Output)Pin 5 (VSS) → GNDPin 6 (VSS) → GNDPin 7 (SCLK) → PB13 (SPI2_SCK, AF5)Pin 8 (SDIN) → PB15 (SPI2_MOSI, AF5)Pin 9 (NC) → no connectionPin 10 (VSS) → GNDPin 11 (VSS) → GNDPin 12 (VSS) → GNDPin 13 (VSS) → GNDPin 14 (VSS) → GNDPin 15 (NC / VCC sense) → no connectionPin 16 (/RES) → PA10 (GPIO Output, active LOW reset)Pin 17 (/CS) → PB2 (GPIO Output, active LOW chip‑select)Pin 18 (/SHDN) → +3.3 VPin 19 (BS1) → GND (BS[1:0]=00 → 4‑wire SPI)Pin 20 (BS1) → GND (BS[1:0]=00 → 4‑wire SPI) Note: The pins seen as short circuit i
Dear reader, I attempted to adapt the tutorial outlined in STM32F3348-DISCO HRTIM DMA PWM Sine Wave - STMicroelectronics Community to my STM32G474E-DPOW1 board to create a PWM signal with sinusoidally varying duty cycle using a look up table.Attached is my main.c with the MX_HRTIM1_Init function. If there's any more information required please let me knowAny help would be greatly appreciated, thankyouOliver
When building a Widget or Custom Container, could it be possible to define values that can be used in the base and inherited class?Things that are in the base constructor.Coordinates, colours, Bitmaps_id, ...Predefined coordinates in Designer for when the widgets change size.This would permit in the application to let the TouchGFX designer figure out the style/geometry and the code to focus on the behaviour and not need to calculate translation of coordinates, just to realign text after an image.I suggest that this feature is opt-in and not systematic.Could be a checkbox near the mixins to export drawables properties after construction.
I AM USING STM32F446RCT6 MICROCONTROLLER HAL_TIM_OC_Start_IT(&htim8, TIM_CHANNEL_2);HAL_TIM_PWM_Start_DMA(&htim2, TIM_CHANNEL_4, (uint32_t *)gPWMData1, gPWMData1LastIdx); // trans is generatedHAL_DMA_Start_IT(&hdma_tim8_up, (uint32_t)&gPWMData2[row], (uint32_t)&(GPIOB->BSRR), gPWMData2LastIdx);void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim){if (htim == &htim2) {if(circular==0){HAL_TIM_PWM_Stop_DMA(&htim2, TIM_CHANNEL_4);{ IT WORKS IN NORMAL DMA MODE BUT NOT IN CIRCULAR DMA SYNCING TIM2 AND TIM8 IS QUITE DIFFICULT HOW TO DO IT? BECAUSE AFTER STOPPING GAP ARISES WHICH IS THE ISSUE CONTINUOUS COMMUNICATION REQUIREDhtim2.Instance = TIM2;htim2.Init.Prescaler = 1-1;htim2.Init.CounterMode = TIM_COUNTERMODE_UP;htim2.Init.Period = 50-1;htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;htim2.Init.AutoReloadPreload =TIM_AUTORELOAD_PRELOAD_ENABLE;if (HAL_TIM_Base_Init(&htim2) != HAL_OK){ Error_Handler();}sClockSourceConfig.ClockSource = TIM_CLOCKS
Hi, I have encountered a new problem. When I run the simulator of my program, the simulator has a black background. But all the buttons keep their functionality and I can navigate through my designed sheets. I have updated my computer to Windows 11 a few days ago. Can this cause the problem? Attached find a picture: In the front is the simulator window and in the background the window in designer as it should look:
I'm using an STM32U5 processor to communicate with a sensor over SPI, and I am unable to get the SPI transfer and reception to work while putting the device into STOP 0/1. The datasheet and reference manual state that this is possible with SPI1 in STOP 0/1, but the device never wakes up and the transfer doesn't complete. I am using SPI1 and HAL_SPI_TransmitReceive_DMA, along with linked list DMA mode. I have gotten the transfer to work successfully in SLEEP, with the device waking after all transfers are complete, but it does not work when putting the device into STOP 0 or STOP 1 mode. Are there any other bits that need to be set to enable STOP mode functionality with SPI1? I am using MSIK to clock the SPI, and STOP mode is working for other parts of the application (RTC, EXTI). Thank you.
Hi there, I try to create a C++ project for Nucleo-u575ZI-Q using STM32CubeIDE but seems only C files are generated. I always choose C++ in Targeted Language, like the image shown below, when starting a new project. I just wonder if there is something missing. Thanks for the help!
I am recently working on USB CDC in STM32F407 and i have the following doubts:Based on my understanding 64 bytes can be send using CDC_Transmit_FS, so can we give a array of some size which is greater than 2KBytes and DO we need to do any chunking here ?Is the data send via USB CDC is always 64 bytes or can we configure it if yes How can we configure it to transmit more bytes?So CDC_Recevice_FS in usb_cdc_if.c is a application hook function which is called for every 64 byte. Is these configurable let us say i want to call these function only when 2KBytes is received?What is the maximum data that can be received and send using USB_CDC Functions.
Hello, I spend a lot of time to tried running HW SPI on H523CET6. On the other mcu like F411 it work without any problems. In this case SPI work only when I do it in software mode://===================================================================================== #define DO_LO HAL_GPIO_WritePin(LCD_MOSI_GPIO_Port, LCD_MOSI_Pin, GPIO_PIN_RESET); #define DO_HI HAL_GPIO_WritePin(LCD_MOSI_GPIO_Port, LCD_MOSI_Pin, GPIO_PIN_SET); #define CLK_LO HAL_GPIO_WritePin(LCD_CLK_GPIO_Port, LCD_CLK_Pin, GPIO_PIN_RESET); #define CLK_HI HAL_GPIO_WritePin(LCD_CLK_GPIO_Port, LCD_CLK_Pin, GPIO_PIN_SET); //===================================================================================== static void Transmit_Byte(uint8_t transfer){ //========================================================== #define HW_SPI //============== #ifdef HW_SPI extern SPI_HandleTypeDef hspi1; HAL_SPI_Transmit(&hspi1, &transfer, 1, 100); //========================================================== #else u
Hi, I am testing the System Memory UART protocol in STM32G070CB.I tried the Get command, the Go command, and the Read Memory command standalone, all success.However, when I try to execute the Read Memory command, which is successful, and then execute the Read Memory command, the ST does not send any response.Full pattern:Successful Enter Boot Mode:Read Memory CMD with Address = 0x0801FFF0 and read data size is 0x10Try to execute the Read Memory CMD again but without ACK/NACK As I know, the protocol is able to execute other CMD when the pervious CMD completed or Failed. How could I execute CMD continuously? Note: UART Protocol version of the MCU is V3.1
I configured SYSCLK to 480 MHz and set the I2C1 peripheral clock frequency to 120 MHz. For I2C1's timing settings, I selected Fast Mode Plus (1 MHz) and applied the timing register value 0x0050174F, the setting about maximum output speed of SDA and SCL are Very High.However, when observing the I2C1_SCL line with a logic analyzer, the actual output clock frequency is only 890 kHz.
Hello Community,I have been attempting to use the STM32CubeIDE to combine two examples:https://github.com/STMicroelectronics/STM32CubeU5/tree/main/Projects/NUCLEO-U545RE-Q/Applications/ThreadX/Tx_MPUhttps://github.com/STMicroelectronics/STM32CubeU5/tree/main/Projects/NUCLEO-U545RE-Q/Applications/ThreadX/Tx_SecureLEDToggle_TrustZoneWherein I want to have a ThreadX module within the TrustZone. I have been able to get both examples individually building, flashing, and debugging on my board. However any attempts to add modules/manager to the Trustzone example, and conversely Trustzone to the Module example have been entirely unsuccessful - due to my experience with the tool I am unable to add the middlewares.Is there any example out there doing what I want?Or if not, does anyone have any instructions on how to combine these two projects. My assumption is that the solution will have three subprojects with three distinct linker files, with relevant partitioning of memory:Secure (St
Hi all,I’m working with an STM32H745 controller and an external ULPI PHY (FUSB2805, pin-compatible with STULPI01A). All hardware connections are verified and correct – the PCB layout and power rails are within spec, and the ULPI lines are as per the datasheets/reference.Problem:If I configure the USB peripheral for HS External PHY and set the speed to 12Mbps (Full Speed), the port is detected and data transfers work using the external PHY. but only when the USB Clock Mux is set to RC48 (internal 48MHz) If I select 480Mbps (High Speed) mode (again with HS external PHY and same clock settings), USB does not work. The host gives a "device descriptor request failed" error during enumeration. For troubleshooting, I have tried selecting both RC48 and a 60MHz clock from PLL1 and PLL3 as the USB clock source, but the result is always the same: it fails to enumerate as a high-speed device.Could anyone clarify why HS mode fails at 480Mbps even though Full Speed works?What is the correc
Dear friends, I am playing around with NUCLEO-H745ZI-Q.I generated example motor control project from en.X-CUBE-MCSDK-FUL_6.4.0 for CubeIDE v.1.18.1. This example project utilizes CM4 core. Clock frequency for CM7 core can be twice higher than the clock frequency for CM4. Therefore, I believed that CM7 core can run code twice faster than the CM4. I use GPIO Output to measure code execution time on the oscilloscope.To estimate completion time, I use a code in a while() like this: HAL_GPIO_TogglePin(GPIOK, GPIO_PIN_0);Ialphabeta = MCM_Clarke(Iab);HAL_GPIO_TogglePin(GPIOK, GPIO_PIN_0);HAL_Delay(100); I/O pin is in “Very High Speed Mode”. So, running it on CM4 @240 MHz, I get:- 630 ns without optimization;- 230 ns with FAST optimization; Surprisingly, after migrating code on CM7@480 MHz, I get worse results:-  
Hi all,I'm designing STM32N655L0 based board and I've one question.I'm using XSPI1 and XSPI 2 peripherals.XSPI2->Octa SPI mode, NOR FlashXSPI1-> SDRAM, Hexa SPISo my question is can I use unused CS, NCLK pins as an IO?I just wanted to be sure. BR
Hello, I am using STM32F103c6 cortex-m3. I am using 100 micro controllers in various boards. In some around 10 micro controllers, I have seen a issue of option bytes getting corrupted. Even though I am writing 0xA5 to RDP to remove read protection while flashing, sometimes it makes memory read protected and few times it work properly. The remaining 90 MCUs works fine! Even the WRP also gets corrupted in those 10 MCUs. No where I am making Read protected in code, only write protection ! (Write protection is also removed at flashing by setting 0xA5 on RDP)Could it be because of power fluctuation? As we are doing few auto power interrupt tests!!What could be issue?I flashed the MCU multiple time which are misbehaving without running the code( just flashing with RDP 0xA5, sometimes it flashes, sometimes it gets read protected and doesnot Flash)!!Did the MCUs gone bad??
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.