Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
This is to document various uses of delays like HAL_Delay() in STM32 code. I have found 2 decent uses 1. Put at the start of /* USER CODE BEGIN 2 */ to stop the code from executing when we are reprogramming the board. 2. Put at the start of /* USER CODE BEGIN 2 */ to give time to properly initialize DMA related functionality. /* USER CODE BEGIN 2 */ HAL_Delay(2000); HAL_UARTEx_ReceiveToIdle_DMA( &huart7, gsm_response_buffer, GSM_RESPONSE_BUFFER_SIZE); __HAL_DMA_DISABLE_IT(&hdma_uart7_rx, DMA_IT_HT); /* USER CODE END 2 */ without the delay the DMA reception was not working. Please put any other / any modification anyone find / know here to make it as a central repository. Edited by ST moderator to be inline with the community rules especially with the code sharing. In next time please use </> button to paste your code. Please read this post: How to insert source code
Split from Interfacing external sensors with I-CUBE-LRWAN End Node STM32L476RG based Library.Hi! Could you please share how you interfaced the RFM95 with the STM32L476RG using the I-CUBE-LRWAN library? I’m new to using the I-CUBE-LRWAN library and would really appreciate your guidance.
I would like to use a TouchGFX video widget on a STM32F469i DISCO board.I created a simple project in TouchGFX comprising the following widgets:Screen1:Video WidgetButtonWithLabel Widget.I associated the video widget with the TouchGFX example video "video1_480x272.avi"I know that the TouchGFX TBS for the STM32F469i DISCO does not directly support JPEG video decode, so I followed the TouchGFX documentation for Video Decode https://support.touchgfx.com/docs/development/touchgfx-hal-development/scenarios/scenarios-video-decodingI can program and run the target from within TouchGFX and compile then debug using STM32CubeIDE, so I am pretty sure that I have implemented the instructions to augment the TBS for STM32F469i DISCO correctly.The video will play but with horizontal lines across the screen.The video will only play with framebuffer strategy set to Double Buffered, when set to Single Buffered, the video will not load.I'm using SDRAM, so Start Address 1 is set to 0xC0000000. I have
Hello Saket_Om, Now is better :). Next challenge is how to convert it for my target. I am using STM32u585Qii3. It seems there is no straight way in STM32Cube to migrate between controllers with different packages. Split from the thread below. (new question) Re: STM32u5 ADC not reading properly - STMicroelectronics Community
Howdy,I’m running into an issue trying to re-flash the original code onto the control board (STEVAL-DPS334M1, which uses the STM32F334R8T6 MCU) for the ST totem-pole PFC board (STEVAL-DPSTPFC1).I’m using an ST-Link V2 with STM32CubeProgrammer to download the provided .bin file of the original control code back onto the board. The download completes successfully, but when I power the PFC board afterward, nothing happens. Normally, the PFC board has a startup sequence before the user can enable it, but now that sequence does not occur.When I check device memory in STM32CubeProgrammer, I see that the first data location is at address 0x08000000 (screenshot attached). This makes me wonder if I also need a bootloader file for it to work. If so, where would I obtain it?For reference, the original firmware I received from ST came as a zip file containing:Drivers folderEWRAM folder (which had the .bin file, no .hex included)Inc folderSrc folder.mxproject file.ioc fileBackstory:I originally tri
I am Using STM32U5G9J Dk2 board. I want to work with the TSC EOAIE interrupt. But some how i am unable to enbale the interrupt for the same. I couldnt find any HAL API related to TSC too. And in the STM32cue IDE when I try to debug the TSC registers. it says Reading disabled by: DCB->DSCSR->CDS == 0
Hello,I had the motor profiling experience to get motor mechanical and electrical parameters using EVSPIN32G4 boardsas following:Now I'm trying to start the project for controlling a new high power motor with EVLSERVO1 board. But, I couldn't find the ST provided firmware for EVLSERVO1 board as listed this. I'm wondering the EVSPIN32G4 firmware is compatible with EVLSERVO1.Thank you for your any advice.
Using STM32CubeWB v1.23.0, I am running the hardware timer in the following order:HW_TS_InitHW_TS_CreateHW_TS_StartHowever, despite this, the callback registered at the time of Create is not executed after the set time.What could be the problem?
I am a beginner, and this is my first time trying to use UART to send data from MCU to PC.I try to follow the deep blue embedded tutorial (STM32 Serial Print & Monitor (UART Data Debug), however the console does not receive anything when I connect to it.This is my main function codeint main(void) { /* USER CODE BEGIN 1 */ //USART vs UART //synchronous generates data on clock and sends it to //the receiver which works accordingly in synchronized manner //asynchronous generates data clock internally /* USER CODE END 1 */ /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_DMA_Init(); MX_I2C1_Init(); MX_I2S3_
Hello ST Community,I am working with STM32H750VBTx on STM32CubeIDE. I use UART7 + DMA with HAL_UARTEx_ReceiveToIdle_DMA()to receive responses from a GSM modem.Problem:- GSM responses are stored in my gsm_response_buffer[] incrementally- For example: first "RDY", then "AT OK", then "ATE0 OK" → all get appended- I expected each new DMA reception to start at buffer[0]. Debug screenshots are attached.Could you please advise how to properly useDMA reception so each new response starts fromgsm_response_buffer[0]?Thanks in advance!Refer the code in the Test_GSM.c file also if needed in the main.c file i call```c /* USER CODE BEGIN 2 */ #if (ENABLE_006_GSM_Folder == 1) HAL_UARTEx_ReceiveToIdle_DMA( &huart7, gsm_response_buffer, GSM_RESPONSE_BUFFER_SIZE ); __HAL_DMA_DISABLE_IT(&hdma_uart7_rx, DMA_IT_HT); #endif``````c /* USER CODE BEGIN 0 */ void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size) { if(huart->Instance == UART7){ HAL_UARTEx_ReceiveToI
Hello,I have a question regarding the antenna area PCB artwork design for the STM32WB1MMC and STM32WB5MMG modules.In the STM32WB5MMG datasheet, it is recommended to:- place the module at the edge of the PCB,- fill the right-hand side of the module with a solid ground plane,and the antenna clearance requirements are clearly specified.On the other hand, I cannot find such information in the STM32WB1MMC datasheet.My questions are:1. Does the STM32WB1MMC not have the same layout constraints as the STM32WB5MMG?2. Is there any available specification or information about the built-in antenna design and placement inside the STM32WB1MMC?Thank you for your support.
Hi We are developing a new product based on the STM32U073CCT6 MCU and STM25DV-I2C tag. Question:Is it possible to update the STM32 firmware through the NFC tag? If so, can you provide a sample code?BRGilberto
I have an SPI slave running on STM32L4 in DMA mode. Here is the basic structure (simplified for this posting): #define NSS (HAL_GPIO_ReadPin( SPI3_NSS_GPIO_Port, SPI3_NSS_Pin )) #define BUFFERSIZE 32 uint8_t SpiTxBuffer[BUFFERSIZE], SpiRxBuffer[BUFFERSIZE]; typedef enum { Idle, Wait, Abort, Done } State_t; State_t State = Idle; int main(void) { /* Usual MX boilerplate here. */ while(1) { switch (State) { case Idle: if(!NSS) { if( HAL_SPI_TransmitReceive_DMA( &hspi, SpiTxBuffer, SpiRxBuffer, BUFFERSIZE ) != HAL_OK ) { Error_Handler(); } State = Wait; } break; case Wait: if(NSS) { if( HAL_SPI_Abort_IT(&hspi) == HAL_OK) { State = Abort; } else { Error_Handler(); } } break; case Abort: break; case Done: DoSomethingWithTheData(); State = Idle; } DoSomethingElse(); /*Do some task while waiting for SPI to arrive*/ } } void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi) { State = Done; } void HAL_SPI_AbortCpltCall
Hello everyone, I'm reaching out to seek guidance in pushing the SPI CLK line output to, at least, 65 MHz.In theory, this should be possible according to the Reference Manual by setting the GPIO speed to Very High in Vdd = 3.3. Currently, I am able to drive the signal at 40MHz and still get a decent square signal with a bit of over and undershoot, however, pushing above these speeds causes signal degradation and distortion. The rise/and fall times for the wave seem to be too slow, causing further problems. I've tried enabling the cell compensation with a sequence similar to the one below as per the Reference ManualRCC->CR |= RCC_CR_CSION; // turn on CSI while(!(RCC->CR && RCC_CR_CSION_Msk)); // wait for the CSI to come online SBS->PMCR &= ~(SBS_PMCR_BOOSTEN); SBS->PMCR |= SBS_PMCR_BOOSTVDDSEL; // reduce harmonic distortion SBS->CCCSR |= (0 << SBS_CCCSR_COMP_CODESEL_Pos) | SBS_CCCSR_COMP_EN; while(!(SBS->CCCSR & SBS_CCCSR_COMP_RDY
Hello!Can I use 'TRGO2' event signals from Advanced Timers (1,8,20) as event sources for Slave Timers? The Reference Manual (RM0440 Rev 9, p. 381), the Internet, CubeMX and Google - all say "Yes", but in practice I could not use them for Slave Timers. I only found in one document that it is not allowed and now I do not understand whether it is true or not. Thank you.
We are seeing an issue where the STM32WB55 module is failing to send a valid write response. The write response is attempted but based on the packet logs, the CRC is failing. This results in the central (app running on Android) forcing a disconnection. This always happens on the first connection to the module and is reproducible. We are using a very lightly modified version of the Cable replacement example. Pcap and project attached
Hello STM Community, I’ve successfully implemented a Zigbee application on the STM32WB series MCU that leverages the Low Power Manager to enter Standby or Shutdown modes, as detailed in AN5289 section 4.6. The application note highlights the Low Power Manager’s ability to support up to 32 users, select the optimal low-power mode (Stop, Standby, or Shutdown), and execute callbacks during mode transitions. In my implementation, I focused on enabling Shutdown mode to minimize power consumption after performing a Zigbee On/Off toggle command. Key points from the code: Low-Power Mode Configuration: The application disables Stop mode and enables Shutdown mode using UTIL_LPM_SetOffMode(1U << CFG_LPM_APP, UTIL_LPM_ENABLE) and LL_C2_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN). CPU2 Handling: As noted in AN5289, CPU2’s low-power mode is managed by the wireless firmware. I ensured the low-power mode selection is set to SHUTDOWN before starting CPU2 to allow the device to enter low-power mode
Hello,I'm working on a daughter board to connect with STM32F769I-EVAL, no problem if it is obsolete. I can't find good CAD resources for the item, I need a step 3D file or a pdf with the position and the height of all components, so I can design my board with a proper placement of components, without the risk to touch something.I have only found the positions of the four connectors, but this is not enough, there are lots of thick elements around.How can I get support for cad resources of this board?Thanks,Regards
I use STM32L431 to build a mainboard and LCD display, then develop the UI with touchGFX; From the button of mainboard to triggle and transfer to screw1.cpp, the number of textArea(picture:red 1 ) can increase when i press the buttom of mainboard, but number of textArea(picture:red2) can't any change and just display 00% with initial value; what was more, with the same code for the function of decrease, the function is ok that the number of textArea(picture :red2) can be visable and decrease when i pressed the buttom; remark: increased and decreased number of center textArea is devided into 2 textAreas; the function is fail and the top textArea is ok , but center textArea can't any change if pressed buttom, just list the initial value 0%void Screen1View::speed_level(uint8_t speed,uint8_t big_spd) // speed icon+ { Unicode::snprintf(speed_valueBuffer,SPEED_VALUE_SIZE,"%d",speed); // display top textArea speed_value.invalidate(); if(big_spd==1) // whe
Cordial greetings dear community.About a month ago I purchased a development pair stm32f746g-disco /mb1191c/dk32f746g$cu2 for a project in a development lab. I recommended this product because I have this same motherboard, but reference stm32f746g-disk /mb1191b and it has always worked very well for me. However, after being programmed the new board does not work correctly, I say this because nothing happens when navigating between the different windows, but the information that was programmed in the main window is correct and fluid.I am sharing some images of the card that belongs to me (green) and the screen purchased for the project in question (blue) for you to buy. the IDE version I'm working with is STM32CubeIDE 1.8.0 and TouchGFX 4.21.1Thank you, I am attentive to your comments.
Hi, I'm planning to use a STM32WB5MMG for a custom board. For this application, I need to measure the frequencies and the duty cycles of three different PWM signals. I know that there is the PWM Input mode of some TIM. However, I verify that there are only two timers with this function. How can I overcome this limitation? Can I use Input Capture direct/indirect mode of the timers?Thanks.Matteo
Hi everyone,I’m working on a project with TouchGFX Designer and I’d like to deliver it to my client, but I don’t want them to have full access to everything in the project.Delivering only a .hex file is not enough in this case, because the client needs to have access to the TouchGFX interface to make modifications.What I’d like is to restrict their usage so they can only do certain actions such as:adding custom containersmoving objects around…but without giving them access to the full project or other advanced settings.Does TouchGFX offer any kind of limited interface / restricted mode for end-users? Or is there another way to lock or hide certain parts of the project while still allowing basic editing?Thanks in advance for your help!
I created a design file in TouchGFX with the following configuration:Portrait format LCDInterface: RGBDisplay Orientation: PortraitI would now like to use this design file with a different LCD that has the following specifications:Landscape format LCD (rotated 90 degrees to be used in portrait orientation)Interface: RGBBoth LCDs have the same resolution.Are there any specific settings I need to adjust in TouchGFX to make the design compatible with the new LCD?
Hello!I have a new project with a STM32F407VET6 and a STM32F103xxx over a RJ45 Jack with I2C.i worked a lot of time with I2C EEPROMs and it works fine, but my communication between the 2 STM's are horrible, or i am too confused.i found the tutorial on https://controllerstech.com/stm32-as-i2c-slave-part-1 in this tutorial, has the Slave the Address 0x12 (without shifting <<1) the code of the master: /* USER CODE BEGIN 2 */ uint16_t slaveADDR = 0x12<<1; uint8_t TxData[6] = {0x1, 0x2, 0x3, 0x4, 0x5, 0x6}; while (1) { HAL_I2C_Master_Transmit(&hi2c1, slaveADDR, TxData, 6, 1000); HAL_Delay (1000); } okay, here are the address shifted, but my slave are not receiving data on 0x24.my logic analyzer says, the master sends data to the address 0x24 (it's shifted.. <<1) and not to 0x12. I used the function HAL_I2C_IsDeviceReady(), but i am wondering, in the description of this function are no comments like "shifted address" or an
I'm attempting to implement a USB MSC Device using the USB_OTG_HS on a STM32U5A9J-DK1. I'm using the STM32CubeMX version 6.14.1 and STM32Cube_FW_U5_V1.7.0 to create a USBX stand-alone (without THREADX) MSC device. The project builds and runs, with successful initialization of the USBX device subsystem. However, connecting to a host does not trigger the OTG_HS_IRQHandler() interrupt. A couple of questions:A call to MX_USB_OTG_HS_PCD_Init() is generated in main by CubeMX, but I don't find anywhere in the code where PA11 and PA12 are initialized to the USB_OTG_HS alternate functions.Since enabling VBUS Sensing via PA9 is not an available option for this device in the CubeMX, and I see from the schematic that VBUS_SENSE is connected to PG1, I'm not at all clear how connection to a host is detected to fire the USB_OTG_HS interrupt.The STM32Cube_FW_U5 only contains examples for USBX Host, so I'm not sure where to look for guidance.
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.