Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
In the STM32CubeF0 pack, PWR/PWR_CurrentConsumption example for Nucleo-F030R8:void SleepMode_Measure(void){ GPIO_InitTypeDef GPIO_InitStruct; /* Configure all GPIO as analog to reduce current consumption on non used IOs */ /* Enable GPIOs clock */ /* Warning : Reconfiguring all GPIO will close the connection with the debugger */ __HAL_RCC_GPIOA_CLK_ENABLE(); __HAL_RCC_GPIOB_CLK_ENABLE(); __HAL_RCC_GPIOC_CLK_ENABLE(); __HAL_RCC_GPIOD_CLK_ENABLE(); __HAL_RCC_GPIOF_CLK_ENABLE(); GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; // <<< Here! GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Pin = GPIO_PIN_All; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);void StopMode_Measure(void){ GPIO_InitTypeDef GPIO_InitStruct; /* Configure all GPIO as anal
I have designed a custom board. I have connected SWCLK to PA3 and SWDIO to PA12. I found I can not connect. So I made a patch and connected SWDIO to PA2 which seems to be default after boot. Now I can connect to the board. However after downloading my software the board becomes unaccessible. The code is running fine on a NUCLEO-WL33CC1 board.I can not access the board with CubeProgrammer either. It is like bricked.I found one issue with LSE which I have connected to PB14 and PB15 instead of PB12 and PB13. So I changed my code disabled LSE and enabled LSI and tested this on a new board. Initially I can connect but as soon as I try to singlestep through the code contact is lost and after that the board is no longer accesable in CubeProgrammer either.I am running out of boards if I can not find a way to unbrick them. @STTwo-32
An issue has suddenly popped up on my custom boards using a STM32U575CIT6. It manifests as the MCU appearing to not run code that was successfully flashed. Viewing the registers with CubeProgrammer seems to show it repeatedly running the reset handler. Attaching to the running process with CubeIDE shows hard faults occurring in the first instruction of `__libc_init_array` which is `push {r4, r5, r6, lr}`. The hard faults are a precise data access violation and a stacking error. That instruction is the first instruction that utilizes the stack. When attached, CubeIDE cannot read any data from SRAM3. It appears as all ?’s. I found that the RCC_AHB2ENR1->SRAM3EN bit is 0, which is the clock enable bit for SRAM3. This would explain why SRAM3 appears inaccessible. Putting a breakpoint on the first instruction of the `Reset_Handler()` shows that this bit is unset even then. All other SRAM clock enable bits are set. According to the Reference Manual, that bit’s reset value is 1. All tha
Hi!i made a custom PCB with the STM32WB1MMC. But Ii’m getting hardly 2 or 3 meters range.Seems to be the same issue as but my device is right on the edge of the PCB.My antenna keep put zone is a bit narrower than the reference board. Apart from this I not able to see what else could be wrong. Any pointers would be much appreciated. Thanks!
@User_MV Thank you for all this information and for the CMake files. This helped me to create an OEMiRoT project exclusively with CMake, dropping the need for any provisioning script. @Saket_Om I’m looking forward for the possibility of using MCUBoot middleware directly in STM32CubeMX2. We can download it from the “Pack manager”, but it explicitely says “No” in the “Compatible” column (and thus it is not present in the middleware section). So what I did was just a git submodule, using mcuboot’s hal2 branch. A change that I needed to do : increase the memory buffer length of mcuboot, otherwise I was getting errors with MBEDTLS_ERR_MPI_ALLOC_FAILED return code, with an user application of size 0x16000. So I doubled the value of ROT_MBEDTLS_MEM_BUF_LEN, from 0x1000 to 0x2000. As a side note for anyone, make sure to call HAL_RCC_Reset() in either the OEMiRoT, or the user application. ST does it in the user application, but I prefer the other to do it in the OEMiRoT - just before jumping
I’m using a Raspberry Pi host to flash an STM32G030 via I2C.The Raspberry Pi (all models except 5 and newer) have a known hardware bug in their I2C clock-stretching support.See e.g. https://www.advamation.com/knowhow/raspberrypi/rpi-i2c-bug.htmlThe interaction between a Raspberry Pi and the STM32 Bootloader over I2C is thus erratic. It works most of the time (including full verify, erase and flash cycles), but around 10% of the time, it will fail on the first two commands sent. Since it is quite timing-sensitive, with the bug triggering if the STM32 responds within a specific time window, that might be a reason why commands like GET, GET_VERSION, and GET_ID seem to be affected more, but flashing (which is sent much more often) works. Obviously there is little that can be done on the STM32 side. But I wish the AN4221 would document the followup behaviour of the Bootloader more clearly to help identify this issue.Notably, the STM32 gets into an invalid state, in which it does not respond
Hi, Please forgive my ignorance in advance.I have been asked to acquire the equivalent of the hardware show in the attached photographs (both items).I am hoping that someone in the community can point me at the relevant product in on this website. I don’t have experience of what the product is used for to be able to make a proper judgement myself.I suspect the one that I have is old and has been replaced with a newer model, hence my inability to find a direct match in the product pages.Any assistance would be much appreciated.Thank you for your time.
Hi everyone,I am working on an STM32U5G7VJTx project where I am trying to capture analog composite video using a TW9912 video decoder and display it on an RGB TFT using LTDC. Hardware* MCU: STM32U5G7VJTx* Video Decoder: TW9912* Input: Composite Video (NTSC)* Display: RGB TFT driven by LTDC* Interface between TW9912 and STM32: 8-bit BT.656 with Embedded Sync Software FlowMy current flow is:TW9912 (configured through I2C)→ DCMI (Embedded Sync / BT.656)→ GPDMA→ SRAM buffer (YCbCr422)→ CPU converts YCbCr422 to RGB565→ LTDC framebuffer→ TFT display Current ProblemThe TFT powers up correctly.Most of the time the display is completely green.Sometimes I briefly see something that resembles the camera image but in black and white sometime or in the random colour, but it is heavily distorted and not recognizable. What I Have Already Checked* TW9912 is configured for BT.656 output with embedded synchronization.* DCMI is configured in Embedded Sync mode.* The Embedded Sync codes were updated from
I'm facing a very strange issue on my custom hardware based on the STM32N6 when trying to run my application using the Run configuration in STM32CubeIDE. My setup consists of a secure-only application with an FSBL and a separate application. The project is generated with STM32CubeMX, built in STM32CubeIDE, and uses TouchGFX. The build completes successfully. Debugging the application works perfectly, and I don't encounter any issues. However, as soon as I try to launch the exact same application using the Run configuration, it stops working. Both the Run and Debug configurations use the same build and the same ".launch" settings. The behavior is as follows: 1. I power-cycle the board while it is in development mode.2. I start the application using the Run configuration.3. The application does not produce any output on the display.4. After a few seconds, the watchdog expires, the board resets, and it ends up in a boot failure state. Interestingly, if I instead: 1. Power-cycle the board.
Hello, I’m writing in regards to a project that I am doing that involves a STM32G474RGT being used to control a synchronous buck converter. In this set up I plan to use Peak Current Mode Control, which I found was supported by Biricha’s WDS software. As a result I configured my HRTimers and ADC and Comparators like the guides that I found online, mainly the step by step setup on the Biricha Youtube Channel. However, upon opening up the software, I noticed that the circuit tab for the buck setup would only show up as an asynchronous buck, using a diode instead of 2 N-Channel mosfets. Is there anyway to configure the software to use a synchronous buck topology? Brian
This project tests the STM32C5's XSPI capability to drive QSPI display using the NUCLEO-C5A3ZG M.2/SerialMem connector. GitHub - stm32-hotspot/STM32C5-M2-Serial-Mem-QSPI-Display · GitHub
I use H563 and G491 MCUs. There is HAL_ADCEx_Calibration_Start() on both MCUs to calibrate for single or differential ended inputs. If I have mixed single and differential ended inputs on the same ADC, which do I use? Single or differential?
Struggling with a really weird issue here. I'm working on a project using Zephyr on an STM32U5A5ZJT6Q. We are using an LSE-clocked LPTIM as the tick source, PM enabled with STOP0 and STOP1 modes.At some point, we started noticing random crashes, which seemed to occur sporadically, more often on some boards than others. These would usually be in the `idle` zephyr thread, specifically after a `wfi` instruction. Digging around, I found some errata (specifically 2.2.26 for STM32U575xx STM32U585xx, related to flash prefetch, and now also 2.2.6 for STM32U59xxx STM32U5Axxx, related to wake-up from stop mode). HardFault on wake-up from Stop mode may occur in debug modeDescriptionA HardFault may occur at wake-up from Stop mode when the following conditions are met:• Device is in debug mode.• DBG_STOP bit is set in DBGMCU_CR.• A wake-up event/interrupt from an SRD peripheral (except EXTI) occurs in a timing window of four clockcycles during Stop mode entry sequence. SRD peripherals are
Hiya.I’m currently trying to capture an image from the OV7670 camera module over DCMI + GPDMA. I’ve been able to capture images, but I’ve run into an odd issue with vertical blanking. Using the STM32U575RIT3. I have the module configured for RGB565 in QVGA and I can fully confirm that it is outputting what it is meant to, the issue is just with GPDMA and getting it into memory.In GPDMA=Standard Request, I only get ¾ of the image, with the first ¼ being blanked. Sample image in GPDMA Standard RequestIn Linked List mode, I can only seem to get up to ½ of the image. I get ¼ with a single node, ½ with two nodes, but no more when introducing more nodes.Sample image in GPDMA Linked List ModeI can confirm that the GPDMA_CxDAR register shows that it has indexed by an entire image and reached the FrameEvent callback in StandardRequest Mode. In LinkedList mode, it seems to just lost the second half of the image as I do not get the callback and the DAR register records an increment of half the im
I am Having a 2.2 Kwatt PMSM motor i have created a custom power Board, I am using STM32F303Re nucleo board .I am using 2hall sensors for current feed back . my motor starts but does not reach the final full rpm. my power board schematic is attached herewith the powerboard is working correctly, why does the motor not attain the maximum speed. my motor parameters are correct, also i am not able to vary the speed of the motor while running application .from the oscilloscope waveforms it looks like the when the speed tries to increase the feedback drops and motor goes out of sync momentarily. the oscilloscope waveform frequency drops and the FOC again tries to catch the rotor , this keeps on happening and then after some time the motor goes into speed feedback. i am not using Motorpilot, i am running openloop in MCSDK and calling the start motor function from my code after speed ramp function .
The FDCAN_RxHeaderTypeDef typedef (for the STM32G4) includes:uint32_t IsFilterMatchingFrame; /*!< Specifies whether the accepted frame did not match any Rx filter. Acceptance of non-matching frames may be enabled via HAL_FDCAN_ConfigGlobalFilter(). This parameter takes 0 if the frame matched an Rx filter or 1 if it did not match any Rx filter */From the code, this member is loaded with the ANMF bit of an RX FIFO element. The documentation for this shows that ANMF is an abbreviation for “Accepted non-matching frame” - so the comment is correct (‘1’ → did not match a filter). Which means the member name should be something like ‘IsNotFilterMatchingFrame’.Code completion within CubeIDE does not show the comment:which means it is easy to get the state wrong if the name is interpreted semantically!Probably not a lot that can be d
Hi everyone,I am relatively new to the ST ecosystem, coming primarily from a web development and programmatic software background.I recently built a browser-based daily logic game tailored for my local market called hang 5. The core mechanics rely on a responsive visual letter grid, basic string matching for user inputs, and a specific vowel-penalty state machine.As a hobby project, I want to build a physical, standalone desktop version of this puzzle using an STM32 board and a small capacitive touch TFT display. I've been researching TouchGFX to handle the UI, as it seems more than capable of replicating the clean CSS grid layout I am currently using on the web version.Before I purchase my first board, I have two quick questions: Which STM32 Discovery kit would you recommend for a beginner wanting to utilize TouchGFX for a snappy, interactive 2D touch grid? The game requires a daily dictionary array of about 2,500 words. Is storing this plain text array directly in the internal flas
Dear all,I am writing to request assistance with activating an Ethernet connection between my PC and an STM32N657-DK development kit using NetX Duo.While my TouchGFX design is currently functioning correctly on the board, I am encountering issues when attempting to enable communication. Specifically, after flashing the Ethernet configuration, I am unable to successfully ping between the devices. I have attempted several troubleshooting steps but have not yet been able to resolve the connectivity issue.Please provide guidance or instructions on the proper configuration steps to establish this connection. Thank you so much.
Hello,When I right-click - create a new .c source file in a new STM32CubeIDE TouchGFX project, the file gets created in the STM32CubeIDE/Appli/Application/User/Core directory. However, all the project source files are under Appli/Core/Src and headers in Appli/Core/Inc. Is this normal and ok? Why have the separate source file locations?Thank you
TouchGFX version: 4.26.0Visual Studio version: 18.6.3When TouchGFX generates or updates the “TouchGFX/simulator/msvs/Application.vcxproj” file it creates lines with<ClCompile Include="path/to/some/file.cpp"/>but Visual Studio updates the lines to <ClCompile Include="path/to/some/file.cpp" />. Notice the extra space. This means that in version control sometimes commits will be added without the space and sometimes with the space. This overcomplicates merges and causes merge requests. Please update the XML library or fix the output to be consistent with Visual Studio.
Hi experts: I’m working on NUCLEO-G031K8 trying to use its I2C2(I2C1 is OK),I set PA11/PA12 as SCL/SDA, pull-up, OD, when I tried to read data, I found SCL is always high, but SDA has datas, I can’t figure out what’s missing, can you help me with that?Bill
I’m trying to have my own TCP Client with NetXDuo that I can configure with CubeMX in VSCode for the Nucleo-N6.There is an NetXDuo Echo Client example project in N6 FW1.3.0 and 1.2.0 releases. The 1.2.0 version of the sample has no IOC but works in VSCode, the 1.3.0 version has the IOC file but doesn’t work in VSCode.I’ve additionally started from CubeMX and generated a fresh project with the matching configuration from the sample project and attempted both a static IP and DHCP (this works with the sample code) but can’t get either functionality to work.Is there an IOC version of a TCP client with NextXDuo somewhere that is based on CMake that I can integrate into VSCode that has proven to work with either a static IP and DHCP? I have searched countless times and I can’t find any.
I’m working with my stm32f769-DISCOvery board.I’m trying to work through a few things that are unfinished/missing with the various buildroot configs on github and the stock one in buildroot.On boot, it crashes like this:[ 1.705669] Unhandled exception: IPSR = 00000006 LR = fffffffd I’m apparently hitting an error with binutils newer than 2.28.1.It’s looking like this report, except I have also managed to get fffffff1 instead of fffffffdhttps://github.com/fdu/STM32F769I-disco_Buildroot/issues/1#issue-340504566This emcraft patch seems to be intended to mitigate the crash:https://github.com/EmcraftSystems/linux-upstream/commit/2882de1d86bd536c855feee582d44722434c2ac9In theory, the fix should be upstream as as well, and the 5.15 kernel i’m playing with should be new enough. (I’ll need to validate that I guess)https://github.com/torvalds/linux/commit/afc9f65e01cd114cb2cedf544d22239116ce0cc6 Looking at this:https://github.com/fdu/STM32F769I-disco_Buildroot/issues/1It seems it is caused b
On the H743 using V1.12.1 library, CubeIDE, the USB_CoreReset() procedure occasionally fails to reset the Host USB core in debug mode. I have added a reset call which seems to fix the issue in debug, reproduced below.I would like to know if this is a known issue in CubeIDE debug mode?See fix below in USB_CoreReset() // mod - added extra reset as in debug the USB host core fails to reset correctly at timesstatic void USB_Hard_Reset(USB_OTG_GlobalTypeDef *USBx){/* Example from USBH_LL_Init() in usbh_conf.c USB_HOST/Target/__HAL_RCC_USB_OTG_HS_FORCE_RESET();HAL_Delay(50);__HAL_RCC_USB_OTG_HS_RELEASE_RESET();HAL_Delay(50);/* --- FS BACK-POWER FIX START ---HAL_PWREx_EnableUSBVoltageDetector();uint32_t to = 100000;while (__HAL_PWR_GET_FLAG(PWR_FLAG_USB33RDY) == 0U && to--) ;assert(to > 0);*/uint32_t timeout;/* 1. Mask all interrupts and stop AHB transactions */USBx->GINTMSK = 0U;USBx->GAHBCFG &= ~USB_OTG_GAHBCFG_GINT; // disable global int/* 2. Wait for AHB idle */time
Hello,I am making a device which will play encoded audio files from a (Q)SPI flash and I wanted to use the STM32C55 (with its internal DAC). Alas, I haven’t been able to find flash/RAM/CPU frequency requirements for the codecs except for MP3 Helix (https://github.com/liuduanfei/helix), but I would rather use Opus because it has a better bitrate-to-quality ratio.Does anyone have experience with decoding audio on the STM32C55 (or any similar MCU for that matter)? How much flash and RAM was needed for the decoder?Thanks.
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.