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've built a STM32H745ZIT6-based board. The microcontroller uses the LDO to generate VCORE. The idea of this board was to build a standalone solution based on my Nucleo-H745ZI-Q project.I did prepare a very simple project, where I toggle a pin with a simple delay, to check that everything works, but sadly nothing seems to work. I'm trying both HSI and HSE clock source, but there is no difference.The first strange thing that I noticed is that during debug the M4 core is stuck in hard fault, even if the configuration used is the same of my project based on the Nucleo: Here is the debug window, and the fault analyzer output:To understand if at least the CM7 works, I commented the "#define DUAL_CORE_BOOT_SYNC_SEQUENCE" to allow it to continue the execution. Nonetheless, the microcontroller seems completely unresponsive.During debug it seems to go through "HAL_GPIO_TogglePin(CH8_GPIO_Port, CH8_Pin);", but the pin doesn't physically change state (it remains LOW). Furthermore
I'm finalising a design with an AD1701 using the STM32 as the USB-audio driver (it's a modular, mix and match design but the STM32 is the most appropriate for the "reference design".And herein is the issue, for a decent sample rate of 48 or 96 KHz (not audiophile but good enough) an accurate master clock running at 12,288 MHz which I can't get from the 1701 and in any case throwing that sort of frequency down jumpers is likely to end up in the board getting hoisted by a few kilograms of a home-made petard.CubeMX calculates the error as high as 1.72% for 96 KHz for example with a 25 Mhz HS clock input. I'm a little confused (I hail from the days when CPUs ran at 4-8MHz and we thought they were fast) so it might be my age but I don't understand how to correct this sort of error. I'd appreciate if someone more knowledgeable about I2S (or the SAI peripherals) of how to best ameliorate this issue.I know how PLLs work to lock onto a signal but I'm out of my depth (I'm primarily a writer
I am trying to erase a sector of the flash memory on my STM32H503RB. I have successfully validated that I can write to the flash, but when I attempt to erase the sector that I wrote, the contents that I wrote stay the same. I have a feeling that I am just erasing the wrong sector, but I can't seem to find where I went wrong. I'm pretty sure that I can erase, because if I put in a deliberately wrong sector number (sector 4, which corresponds to the location of the LL drivers) the device hard faults (which is what you expect when you erase the drivers).I am trying to erase the sector starting at 0x0801_0000, which I would expect to be sector 8. (sectors are 8 kiB, correct?) I have tried erasing sector 8 of bank 1, sector 8 of bank 2, and sector 0 of bank 2, but none of these seem to work. Am I misinterpreting how the banks and sectors interact?Code:#define FLASH_BASE_ADDR (0x08000000UL) // FLASH_SECTOR_SIZE is 0x2000U FLASH_EraseInitTypeDef erase = { 0 }; ui
I'm trying to implement a USB touchscreen on a NUCLEO F446ZE. I'm making a full-speed device using ST's USB library (Custom HID class) and I'm testing it with on a Windows 10 host. The first contact registers, but when I try to press another, it doesn't. This happens even when the contacts are being pressed independently.I'm using the sample report descriptors provided in the Windows Hardware Developer docs, modified such that the X and Y usages only report intended touches. I've also excluded the Device Certification Status Feature Report for simplicity. My report descriptor is as follows: /* USER CODE BEGIN 0 */ 0x05, 0x0d, // USAGE_PAGE (Digitizers) 0x09, 0x04, // USAGE (Touch Screen) 0xa1, 0x01, // COLLECTION (Application) 0x85, 0x01, // REPORT_ID (Touch) 0x09, 0x22, // USAGE (Finger) 0xa1, 0x02, // COLLECTION (Logical) 0x09, 0x42, // USAGE (Tip Switch) 0x15, 0x00, // LOGICAL_MINIMUM (0) 0x25, 0x01, // LOGICAL_MAXIMUM (1) 0x75, 0x01, // REPORT_SIZE (1) 0x95, 0x01,
Hopefully i chose the right thread, right so i have sn stm32h523 chip running a PCISPH fluid simulation, but its incredibly slow, that was expected, which is why i optimised the algorithm to include spatial hashing to reduce particle-particle computation time from 0(n^2) to O(n+k) (forgot what k was but its alot faster than the latter). However, this hasnt fixed my issue at all, if anyone can suggest any optimization methods that would be great(On reddit i read someone tweaked some compiler settings which im wondering if i should do the same but i dont know how. If theres papers i can read on this i would love some recommendations thanks.
SWV 16MHz, SYSCLK 16Mhz = logging worksSWV 16MHz, SYSCLK 25Mhz = logs gibberish (expected)SWV 25MHz, SYSCLK 25Mhz = logs nothing at allSWV 48MHz, SYSCLK 48Mhz = logs nothing at allWhy would this be?It works with HSI 16MHz, so my wiring and configuration must be correct. I'd expect gibberish from a mismatch, seems odd to see nothing at all.Maybe the V3PWR is at fault? I've ordered a V3SET and V3MINIE to compare.HSI isn't accurate enough for my needs. My HSE is 25MHz and PLLP output must be >= 24MHz, so I can't try HSE 16MHz.
I'm trying to control a BLDC motor attached to a STEVAL-ESC002V1 board though the UART connection, but so far without success.I updated the symbols and recompiled the supplied firmware to disable the PWM control and enable the UART. It compiled without errors and I was able to upload the BIN file to the board.Then using a terminal app on my laptop, I connected it using a USB-UART interface, to connector J2 on the board. The settings were 57600,8,1,Even, Noflow control.However after rebooting the board I was unable to get any output on the terminal, nor sending any commands to the board.Am I missing something ?
I am currently experimenting with STM32F030RCTX and STM32F030CCTX devices.My goal is to use RS485 with auto-baudrate detection, since I have modules that operate either at 115200 baud or 500k baud.On STM32F030RCTX, I use USART1.On STM32F030CCTX, I use USART3.The UART init functions are identical, except for the instance selection.Example init function:void mcu_UART3_Init(void) { huart3.Instance = USART3; huart3.Init.BaudRate = 115200; huart3.Init.WordLength = UART_WORDLENGTH_8B; huart3.Init.StopBits = UART_STOPBITS_1; huart3.Init.Parity = UART_PARITY_NONE; huart3.Init.Mode = UART_MODE_TX_RX; huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE; huart3.Init.OverSampling = UART_OVERSAMPLING_16; huart3.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; huart3.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_AUTOBAUDRATE_INIT; huart3.AdvancedInit.AutoBaudRateEnable = UART_ADVFEATURE_AUTOBAUDRATE_ENABLE; huart3.AdvancedInit.AutoBaudRateMode = UART_ADVFEATURE_AUTOBAUDRATE_ON0X55FRAME; if (
Helo my frends i am making a customiser PCB and i what to conecct a camera IMX335 direct to the pines from the stm32N6, but i donot know if it is posible?Could that direct camera connection to the STM324 work without the ECMF2-40A100N6?
Hello Everybody,I'm designing a motor control board using the STM32F405 MCU in an LQFP64 package. When using STMC board designer, I noticed only a limited selection of MCUs is available (please refer to the attached picture ). Could you advise how to import my specific STM32F405 configuration into the tool? My goal is to use MCSDK for generating runnable code for this custom hardware. Thank you!
Hi,Master:MCU: stm32h743iiIDE:keilQuestion:There is a 32M external SDRAM, and the scatter file is as follows:LR_IROM1 0x08000000 0x00200000 { ; load region size_region ER_IROM1 0x08000000 0x00200000 { ; load address = execution address *.o (RESET, +First) *(InRoot$$Sections) *(_drv_set_) .ANY (+RO) .ANY (+XO) } ... EXT_SDRAM 0xC0000000 0x2000000 { ; RW data *.o(ext_sdram) } }Suppose there are some variables in the program that are specified to be located in 'ext_sdram' section.static lv_color_t buff1[1024 * 600] __attribute__((used, section("ext_sdram"))); static lv_color_t buff2[1024 * 600] __attribute__((used, section("ext_sdram"))); ...During the scatter file loading, these variables will be initialized. Therefore, the external SDRAM needs to be initialized before the scatter file loading, as shown below:Reset_Handler PROC EXPORT Reset_Handler [WEAK] IMPORT SystemInit IMPORT __low_level_init IMPORT __main LDR R0, =SystemInit BLX R0 LDR R0, =__low_level_init B
Hi,MasterMCU: STM32H743IIQuestion:Both FDCAN channels in the MCU are currently in use. I now intend to reset each FDCAN instance (i.e., reset all its registers) during its respective bus-off event, and then reinitialize the instance. Resetting all registers of an instance is typically done through the corresponding FDCAN RST bit in the RCC. However, since both instances share the same RCC, triggering the reset would affect both instances simultaneously. Therefore, I've made modifications for resetting a single instance as follows:HAL_FDCAN_DeInit(hfdcan); hfdcan->Instance->CREL = 0x32141218; hfdcan->Instance->ENDN = 0x87654321; hfdcan->Instance->DBTP = 0x00000A33; ...However, the aforementioned method can only reset some of the registers. Are there any better ways to achieve a reset of a single FDCAN instance? Thank you very much.
Hello, I have implemented a sdcard socket on my board based on the STM32F411, I use SDIO & fatfs r0.15c p2, The SDIO DMA NVIC configuration is : /* DMA2_Stream3_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA2_Stream3_IRQn, 6, 0); HAL_NVIC_EnableIRQ(DMA2_Stream3_IRQn); /* DMA2_Stream6_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA2_Stream6_IRQn, 0, 0); HAL_NVIC_EnableIRQ(DMA2_Stream6_IRQn);DMA /* SDIO DMA Init */ /* SDIO_RX Init */ hdma_sdio_rx.Instance = DMA2_Stream3; hdma_sdio_rx.Init.Channel = DMA_CHANNEL_4; hdma_sdio_rx.Init.Direction = DMA_PERIPH_TO_MEMORY; hdma_sdio_rx.Init.PeriphInc = DMA_PINC_DISABLE; hdma_sdio_rx.Init.MemInc = DMA_MINC_ENABLE; hdma_sdio_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD; hdma_sdio_rx.Init.MemDataAlignment = DMA_MDATAALIGN_WORD; hdma_sdio_rx.Init.Mode = DMA_PFCTRL; hdma_sdio_rx.Init.Priority = DMA_PRIORITY_VERY_HIGH; hdma_sdio_rx.Init.FIFOMode = DMA_FIFOMODE_ENABLE; hdma_sdi
Hi STM community,I’m working on a project with an STM32L031K6 paired with a Fujitsu FRAM MB85RC256V and an SHT31-D temperature/humidity sensor (on a breakout board). Both peripherals are on the I²C bus PB7 = SDA, PB6 = SCL.I’m trying to test the setup using Tera Term, but I’m not seeing any UART output at all — even though I’ve added print statements. No text appears on the terminal.Here’s what I’ve tried so far:1. Verified that my code reaches the print statements; I added edge cases and test prints.2. Confirmed my pinout configuration: PB7 → SDA, PB6 → SCL with pull-up resistors connected to 3v3 rail.3. Enabled USART2 with TX = PA2, RX = PA15, and ensured the global interrupt is enabled with priority 0.4. Enabled I²C communication.Despite these steps, I’m still not getting any serial output.Has anyone encountered a similar issue on the Nucleo-L031K6 where USART2 over the ST-Link Virtual COM Port does not show output in Tera Term? Any suggestions or troubleshooting steps would be grea
Hi,I am designing a custom PCB with an STM32H723. To programm it, i bought a brandnew ST-Link v3 MINIE. CubeIDE reads the serial number of the V3 but can not connect to the target.- Target is supplied with VCC.- From the Board-to-Board-Connector after a lengthy search i connected TMS to SWDIO, TDI to SWO. RESET, CLK, GND and VCC where obvious.- BOOT0 i connected to GND.- Config as follows:starting debuging i get this return:[EDIT: solved sidequest] Searching for solutions i found the programm ST-Link Utility and wanted to start by updating the firmware but the V3 gives me a communication error.When i klick ok, sometimes a version is read and the "Yes" button for upgrade is enabled. But when i klick it i get another error:I tried a different V3MINIE even a new USB-cable for this.[EDIT: Solution for the sidequest] Use the upgrade only software named ST-LinkUpgrade.exe : https://www.st.com/en/development-tools/stsw-link007.htmlMy question: what am i missing?
Hi Everyone,I am using SPI NOR Flash (AT25SF128) with STM32F429 microcontoller. The requirement of my system are as follows: I write data to the SPI Flash using only HAL_SPI_**** statements. I want to read the data written to this flash using a USB (By creating a MSC class of USB). The USB interface is required only for data reading.I have seen similar examples with SD card (SPI or SDIO). However, these examples cannot be applied to the SPI NOR Flash mainly due to following problems that I see. 1> The windows only see a USB when it sees a proper FAT partition, which I don't know how to configure it by using stm32 only. SD Cards can be formatted separately before plugging in with the microcontroller. 2> The FATFS middle present in the CUBEIDE doesnot have an option for a SPI NOR flash. If anyone knows about this implementation, please guide me to the relevant post / page / link.Note: Please refer to example with SPI NOR Flash and not the SD Card
When using the NUCLEO-WBA55CG development board and running the BLE_HeartRateFreeRTOS example, I found that the delay time of osDelay is extremely long, nearly 10 times longer than the set delay time. What is the cause of this and are there any solutions?
I have the following flash protections requirements:1) Write protect the last sector (with start address 0x0803F800)2) Read protect the entire flash with Level 1.3) If the read protect is lowered, the data in the last sector must be unchanged.I'm performing the following operations in a chronological order:1) Program a proprietary bootloader and do a soft reset.2) Enable single bank operation (DUAL_BANK=0) and do a soft reset.3) Program the application and do a soft reset.4) Program the last sector with data and do a soft reset.5) Write protect the last sector (WRP1A_END=0x7F) and do a soft reset.6) Set PCROP area that covers the last sector (PCROP1A_STRT=0x1FC and PCROP1A_END=0x1FD) and do a soft reset.7) Increase read protection level from 0 to 1 (RDP=0xBB)8) Power cycle the device (POR is performed)After this, I reduce the RDP level from 0 to 1 and, when checking the data integrity of the last sector, I verify that the entire sector was set to zeros. The sector is not erased, as exp
DK1 interface a one lane DSI display. DSI display is using SH8601A LCD driver. SH8601A only can be initialized in LP mode, not HS mode. In Mx, DSIHOST configuration, 1. Bus Turn Around Request is enabled2. Transmission commands in LP mode is configured3. After start DSI, I try to read the display, it returned TIMEOUT error. HAL_StatusTypeDef status;uint8_t ID_info[1] = {255}; if(HAL_DSI_Start(&hdsi) != HAL_OK) return 1; uint8_t InitParam0[1] = {0x00};status = HAL_DSI_Read(&hdsi,0,ID_info,1,DSI_DCS_SHORT_PKT_READ,0xDA,InitParam0); TIMEOUT error. The reason it is time out is that the following condition inHAL_DSI_Read function is always false. The GPSR value is : 262229if ((hdsi->Instance->GPSR & DSI_GPSR_PRDFE) == 0U)May I know what could cause read failure? In PHY timing, The HS and LP means which status, HS means HS 0 or HS 1? LP means LP11, LP01 or LP00? The read failure might relate to wrong tim
I'm porting OEM ROT examples from STM32WBA65I-DK1 to STM32WBA63CUI7 and need guidance.Devices:- Target: STM32WBA63CUI7 (2MB flash, CSP17)- Source: STM32WBA65I-DK1 (2MB flash, UFBGA169)Questions:1. Device Support: Any known STM32WBA63xx definition gaps for OEM ROT?2. Package Differences: CSP17 vs UFBGA169 considerations for GPIO/clocks/security?3. Memory Layout: Any subtle differences despite identical 2MB dual-bank flash?4. Build Integration: Best way to add STM32WBA63xx to STM32CubeIDE projects?5. BSP: Need custom BSP or can adapt existing ones?Any insights or similar experiences appreciated!Thanks!
Hi All, I want to build a system to sense 240 low current signals at 20kSPS at the same time using 15 ADC with 16 channels each (DDC316 by Texas Instruments, Datasheet: https://www.ti.com/lit/ds/symlink/ddc316.pdf). I intend to use something like the NUCLEO-H723ZG to drive this system. My question is: Is it possible to use OctoSPI to connect to 8 ADCs at the same time?As far as I can see from the datasheet the sorting of the data will be wrong since the interface expects a parallel data input but maybe I am missing a setting that allows for my use case. A secondary option would be using multiplexed QuadSPI. Something like this seems to be intended for the ADC, as it features a 4-datalane communication mode. However, again the data sorting (page 13 on ADC datasheet) is different from all the documentation I was able to find on QuadSPI (for example RM0468 or AN5050). I would be very greatful for any input on this issue and appreciate any support. Best regardsMarco
hi,Question 1: Should I tune PolPulse directly at the end of profile? Without any pre-operation, such as changing "FOC Mode" from "profiling" to another one?Question 2: Which phases are the PWM waves and currents from? Are there any requirements when I probe the signals?Question 3: What kind of "Pulse current goal" is the best goal? (1/4 short circuit current as a starting point, What is ending point?) How to tune the PolPulse step by step?Here is the Profiling Result as a reference.Above all, thank you!
Hi everybody,On my project, my µC receives data from a rapsberry pi on a serial bus.For another project, I've used this method : https://github.com/MaJerle/stm32-usart-uart-dma-rx-tx/blob/main/projects/usart_rx_idle_line_irq_F4/Src/main.c to receive data with unknown length, it was working very well.So, i'd like to use the same thing, but I have something that I don't understand.For my test, Raspberry in sending the following frame every 10s ("DATA RASPBERRY"). My buffer has 64 bytes.The following line gives me the position of cursor : pos = ARRAY_LEN(buffer_rx_dma_rs1) - __HAL_DMA_GET_COUNTER(huart->hdmarx);So, the first time, it gives me 14, the second time 28 and the third time 32 (instead of 42), but 32 is the half of 64.When I take a look on the values, ARRAY_LEN(buffer_rx_dma_rs1) = 64 and __HAL_DMA_GET_COUNTER(huart->hdmarx) = 22, but pos = 32, how is it possible that the substract operation is false ?
Hello all,We are trying to get into the bootloader of the NUCLEO-U5A5ZJ-Q over SPI using a STLINK-V3SET. But are having issues with connecting the V3SET in the STM32Programmer and through the CLI, which is getting this error.So far, we are seeing this happen on the SPI lines through a logic analyzer: And we are not sure why...We followed these two ST posts but neither post seem to be faring any success for our board combination:- Solved: STM32H563 bootloader command over SPI - STMicroelectronics Community- How to use STM32CubeProgrammer and the STLINK-V3SE... - STMicroelectronics CommunityWe have correctly applied the correct pattern from the AN2606 document, which is Pattern 12 for the STM32U595 and have this pinout between the boards:SignalNucleo U5A5ST-Link V3GNDCN7CN6 pin 3T_VCCCN8 - 15 (VIN)CN6 pin 1SPI1_MOSICN7 pin 12 (SPI1 MISO)CN9 pin 2SPI1_MISOCN7 pin 14 (SPI1 MOSI)CN9 pin 3SPI1_SCKCN7 pin 10 (SPI1 SCK)CN9 pin 4SPI1_NSSCN7 pin 16 (SPI1 CS)CN9 pinAre we missing s
Hello,I’m running a TouchGFX application on LTDC Layer 2 with pixel format ARGB8888.Underneath it, on LTDC Layer 1, I have a simple colored rectangle as a background.I have configured the LTDC blending factors for per-pixel alpha, and the blending works — for example, when I set Layer 2’s constant alpha to zero, I can see Layer 1 correctly.However, even when using images with transparent areas in TouchGFX, the “transparent” parts appear as solid black on the screen and completely block Layer 1. It seems that TouchGFX is filling those pixels with an opaque color (alpha 255) instead of leaving them transparent (alpha 0).What I expect is that transparent parts of the UI would allow Layer 1 to show through, but instead they are rendered as black.Is this the expected behavior for TouchGFX? If so, is there a supported way to make untouched areas of the framebuffer remain transparent so that hardware blending between Layer 2 and Layer 1 works as intended?Thanks in advance.
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.