Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi,I am trying to use the STM32H5 CRC unit via HAL to calculate a CRC32 (ISO-HDLC) over multiple chunks.This works correctly via:hcrc.Instance = CRC; hcrc.Init.DefaultPolynomialUse = DEFAULT_POLYNOMIAL_ENABLE; hcrc.Init.DefaultInitValueUse = DEFAULT_INIT_VALUE_ENABLE; hcrc.Init.InputDataInversionMode = CRC_INPUTDATA_INVERSION_BYTE; hcrc.Init.OutputDataInversionMode = CRC_OUTPUTDATA_INVERSION_ENABLE; hcrc.InputDataFormat = CRC_INPUTDATA_FORMAT_BYTES; if (HAL_CRC_Init(&hcrc) != HAL_OK) { Error_Handler(); } // calculate CRC32 over two identical chunks, HCRC keeps state! temp = HAL_CRC_Calculate(&hcrc, (uint32_t *)data, strlen(data)); // 0x444a273c crc = ~temp; // 0xbbb5d8c3 OK temp = HAL_CRC_Accumulate(&hcrc, (uint32_t *)data, strlen(data)); // 0x405e36b1 crc = ~temp; // 0xbfa1c94e OKNow I need to do something similiar as in https://community.st.com/t5/stm32-mcus-products/hal-function-crc-accumulate-re-init-and-calculate/td-p/672395: the CRC unit is shared for diff
Hi, I recently started a project using the STM32H747BIT MCU and I’m configuring ThreadX v6.4.2 as the RTOS. I followed the usual steps to integrate ThreadX into my system. I decided to use the ThreadX source from the GitHub repository instead of the version provided by CubeMX because ST’s CubeMX package does not include the latest ThreadX updates. During the project configuration, I ran into some issues. I added the tx_api.h, tx_port.h, and libthreadx.a files to the M7 core’s makefile. However, I noticed that the _tx_initialize_low_level.S file is missing. Although the repository provides an example of _tx_initialize_low_level.S, it is not tailored for my MCU. Therefore, I copied the _tx_initialize_low_level.Sfile generated by CubeMX for an older version of ThreadX. After including all these files, when I compile and try to call the functions _tx_initialize_kernel_setup and _tx_initialize_kernel_enter, I get the following error:threadx/common/src/tx_initialize_kernel_ent
Hello, it is possible to call a function to change screens in a "stm32h5xx_it.c" file?The goal here is redirect user to a different screen globally, with no need to do this in every screen individually. This function is called in "EXTI15_IRQHandler(void)" in the same file, which is a hardware button of mine.
I am using the STM32H523 microcontroller with I3C function and a system clock of 250MHz. I am configuring LL-I3C_SetPeriodClockHighI3C (I3C1,0x0D) based on the LL library;LL_I3C_SetPeriodClockLowPP(I3C1,0x0D);LL_I3C_SetPeriodClockLowOD(I3C1,0x0D);At this time, the clock is about 8.9MHz, and the oscilloscope waveform is outputting normally, but when configured asLL_I3C_SetPeriodClockHighI3C(I3C1,0x09);LL_I3C_SetPeriodClockLowPP(I3C1,0x09);LL_I3C_SetPeriodClockLowOD(I3C1,0x09);At this time, the clock is about 12.5MHz. The oscilloscope sees that before sending the normal waveform, the microcontroller will send a byte of 0x3F, which is not what I want. I want to know where the problem lies.
Hello Microsoft Community,I’m currently working on implementing a file system using FileX and LevelX on external NOR Flash (IS25LP064D) connected to the STM32U585AII6Q board.Flash Memory Specifications:Sector Size: 4 KBBlock Size: 32 KB / 64 KBTotal Flash Size: 64 Mbit / 8 MBPage Size: 256 bytesRequirement:I need to create a .txt log file using FileX and once the file reaches 100 KB, it should be deleted and a new file created in its place.Media Initialization Parameters Used:Total clusters: 300Bytes per sector: 512Sectors per cluster: 8Hidden sectors: 0Heads and sectors per track: 1Number of FATs: 1Issue:When writing logs using FileX, I receive a FX_IO_ERROR after a few logs are written—even though there is still available space on the flash.My Questions: What are the correct parameters to pass to fx_media_format() for this NOR flash setup (e.g., sector size, cluster size, number of FATs)?Is there a formula or guideline for determining these parameters when using NOR flash
hey i am using the stm32wle5 board , i try to use the ping pong example from the package provided by stm and it was flashed succesfully but when i checked the serial monitor it is showing timeout for both rx and Tx . I have attached the serial monitor data.
1. Hardware / Software setupBoard: STEVAL-ESC001V1 (MCU: STM32F303CBTx)Motor: BullRunning BR2804-1700 kVSTM32 Motor-Control SDK: 5.4.8 (C:\…\MC_SDK_5.4.8)MC Workbench: 5.4.8.21553STM32CubeMX: 5.4.0, 5.6.1, 6.4.0STM32Cube F3 FW: 1.11.3Target tool-chain: STM32CubeIDE 1.15Drive type: HAL2. What I have triedDeleted the generated folder and ran Generation again → same result.Re-installed/selected CubeMX 5.4.0, 5.6.1, 6.4.0 → all produce identical errors.Checked MCSDK release notes – unclear which CubeMX revision is officially supported.3. QuestionsHow to use the example code to the eval board4. Extra informationlog is attached; let me know if the .ioc or code snippets are needed.Thanks in advance for any guidance!
Good day, I was at a training some time ago: https://content.st.com/stm32wb09-workshop-ame.htmlunfortunately I lost these educational materials. Does ST have them published somewhere on the website? Does ST have materials regarding BLE?
Hello, I need to use Touchgfx on a small CPU and I'm optimizing my code accordingly. However, in the code that Touchgfx Designer generates, I noticed something that I don't understand:The Screen classes inherit from the ScreenBase classes.The Screen classes are actually final, but they have virtual functions, which makes the compiler generate virtual tables for them. The same goes for the Listener classes. Does anyone have any ideas on this?Best regards
Platform: STM32 Nucleo-H7A3ZI-QGoal: Read audio from four microphones in stereo mode (two mics per I²S interface) via DMA, then enqueue complete stereo frames for processing.1. Hardware & DMA SetupI2S1 handles Mic 1 (left) and Mic 2 (right).I2S2 handles Mic 3 (left) and Mic 4 (right).Each I2S interface uses DMA to fill its receive buffer (data_i2s[] and data_i2s_2[]).2. Current Callback Codevoid HAL_I2S_RxCpltCallback(I2S_HandleTypeDef *hi2s){ if(hi2s==&hi2s1){ if(x1Flag == 0){ valX1 = 0; valX1 = sample_left = ((int32_t)data_i2s[0]) >> 8; x1Flag = 1; }else if(x2Flag == 0){ valX2 = 0; valX2 = sample_right = ((int32_t)data_i2s[1]) >> 8; x2Flag = 1; /*if(x1Flag != 0 && x2Flag != 0){ enqueueData(); }*/ } }else if (hi2s == &hi2s2){ if(y1Flag == 0){ valY1 = 0; valY1 = sample_left_2 = ((int32_t)data_i2s_2[0]) >> 8; y1Flag = 1; }else if (y2Flag == 0){ valY2 = 0; valY2 = sample_right_2 = ((int32_
I'm able to generate a simple PWM signal but I wasn't able to generate arbitrary waveform with DMA (HAL_TIM_DMABurst_MultiWriteStart).How should be configured the DMA ?Is there an example that use PWM with DMA on STM32U5 ?
Hello I see on this link that Touch Gfx can only use a single layer from the LTDC.https://support.touchgfx.com/docs/development/touchgfx-hal-development/scenarios/scenarios-ltdc-parallel-rgb Is there some way of using the two LTDC's layers ?,May be is there a Topuch Gfx licensed version (not for free, paying license) which indeed can make use of the two layers ? Regards
I build a LCD driver board with STM32H750ZBT6 ,then i want to use built-in LTDC driver and SDRAM to run 480*270*16 TFT LCD panel , but touchGFX list following wrong message, where reason from ? Generate CodeGenerateDoneGenerate Assetsmake -f simulator/gcc/Makefile assets -j80 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487AllocationBase 0x0, BaseAddress 0x60EA0000, RegionSize 0x310000, State 0x10000D:\TouchGFX\4.25.0\env\MinGW\msys\1.0\bin\sh.exe: *** Couldn't reserve space for cygwin's heap, Win32 error 0simulator/gcc/Makefile:32: recipe for target 'assets' failedmake: *** [assets] Error 1FailedFailed
Question:I’m using an STM32H7A3ZI-Q with four INMP441 MEMS microphones. Each INMP441 outputs PCM (not PDM), and all four share the same BCLK (bit clock) and LRCLK/WS (word select). I’ve split the data lines into two stereo pairs:SAI_A (master) → Microphones 1 & 2SAI_B (synchronous slave) → Microphones 3 & 4Both SAI blocks run in I²S/PCM mode, each with its own DMA stream.Only one stereo pair connected → perfectly clean audioAll four microphones connected → one stereo pair becomes very noisy and distorted hsai_BlockA1.Instance = SAI1_Block_A; hsai_BlockA1.Init.AudioMode = SAI_MODEMASTER_RX; hsai_BlockA1.Init.Synchro = SAI_ASYNCHRONOUS; hsai_BlockA1.Init.OutputDrive = SAI_OUTPUTDRIVE_ENABLE; hsai_BlockA1.Init.NoDivider = SAI_MASTERDIVIDER_ENABLE; hsai_BlockA1.Init.FIFOThreshold = SAI_FIFOTHRESHOLD_3QF; hsai_BlockA1.Init.AudioFrequency = SAI_AUDIO_FREQUENCY_16K; hsai_BlockA1.Init.SynchroExt = SAI_SYNCEXT_DISABLE; hsai_BlockA1.Init.MonoStereoMode = SAI_STEREOMODE; hs
Hi everyone,I’m working with the NUCLEO - WB15CC board and I’m trying to enter STOP1 mode to minimize current consumption. However, despite disabling all unnecessary peripherals, the power consumption remains unexpectedly high (much higher than in the PWR_STOP1 example provided by STM32Cube, which works fine on the same board). What I’ve tried so far: Called HAL_SuspendTick() before entering STOP mode and HAL_ResumeTick() after wakeup Called hci_reset() to reset the BLE stack Configured all GPIOs as analog with no pull (using GPIO_AllAnalog()) Disabled clocks for all unused peripherals: __HAL_RCC_IPCC_CLK_DISABLE();__HAL_RCC_HSEM_CLK_DISABLE();__HAL_RCC_ADC_CLK_DISABLE();__HAL_RCC_LPTIM1_CLK_DISABLE();__HAL_RCC_LPTIM2_CLK_DISABLE();__HAL_RCC_TIM1_CLK_DISABLE();__HAL_RCC_TIM2_CLK_DISABLE(); Disabled all interrupts using __disable_irq() and cleared pending IRQs (RTC, IPCC, etc.) Set both cores (CPU1 and CPU2) to STOP1 using: LL_C2_PWR_SetPowerMode(LL_PWR_MODE_SHUTDOWN);
Hello community,I have been working towards getting a prototype ThreadX modules project on my board (Nucleo U545RE-Q) using CMake from a generated STM32CubeMX project. I have been loosely following the documentation https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/threadx-modules/I have been able to build a ThreadX Module as a library, and a ThreadX Module Manager as a library - CMake samples below:# Interface library for includes and symbols add_library(module_1 INTERFACE) target_include_directories(module_1 INTERFACE ${MX_Include_Dirs}) target_compile_definitions(module_1 INTERFACE ${MX_Defines_Syms}) # Create STM32_Drivers static library target_link_libraries(STM32_Drivers PUBLIC module_1) # Create ThreadX static library add_library(ThreadXModules OBJECT) target_sources(ThreadXModules PRIVATE ${Module_sources}) target_link_libraries(ThreadXModules PUBLIC module_1)# Interface library for includes and symbols add_library(module_manager INTERFACE) target_i
This question pertains to the (relatively) new STLINK-V3MODS programming/debugging device.The UM2502 Users Manual for this product goes into great detail about using Pin #22 of the castellated edge connector aka +5V for ancillary purposes:"Pin 22 of the right edge pin connector can drive a 5 V target with a maximum output currentof 200 mA. The 5 V pin is guaranteed to be in the +/- 5% range if the driven current does notexceed 200 mA."I attached an ohmmeter between pin #22 and the board's +VBUS pin on its USB connector. Because +5V power from pin #22 would be derived from +VBUS pin I expected to see near zero ohms between these nodes. However, I did not and I'm curious why not.Is there a microcontroller-enabled pass transistor between +VBUS and pin #22? When is this transistor enabled?
Hi everyone,I am trying to send the firmware to the MCU via webpage. I want to send chunks of the file (4096 bytes) to the mcu, so it can store in ram, do some checks and then store it in an external memory. The firmware size can be maximum of 1.7MB (all the web pages and content are embedded in the firmware). The webserver is running, and I have the request notify callback function#define fwBufferSize 5000 CHAR fwBuffer[fwBufferSize]; UINT webserver_request_notify_callback(NX_WEB_HTTP_SERVER *server_ptr, UINT request_type, CHAR *resource, NX_PACKET *packet_ptr) { CHAR temp_string[30] = {'\0'}; CHAR data[512] = {'\0'}; UINT string_length; NX_PACKET *resp_packet_ptr; NX_PACKET *currentPacket; UINT status; ULONG total_bytes_sent; ULONG total_bytes_received; ULONG connections; ULONG disconnections; ULONG length; ULONG aOffset, aLength; UINT actualSize; ULONG bytes_read; ULONG packetLength; CHAR *destination_ptr; UINT destination_size; UINT *actual_size; CHAR *serv
Hello!i'm trying the example BLE_HeartRateThreadX but the ioc file is not present in the directory, is that normal? i'm missing it? also the directory arent arranged like a project maked with cube ideis it possible to have an example that is maked like a cube ide project using the MCU or board selector? thank you!best reguards
Hi, I use Nucleo-H753ZI. I am using STM32CubeProgrammer. to debug mt ST_LINK, which stopped working. I read Voltage = 0, ID can't be read out. How to fix it? Thanks
I came across a discrepancy between two ST documents regarding the behavior of an IWDG reset on STM32H5 devices, and I’d like clarification on what exactly is reset when an IWDG event occurs.Document 1: UM3150 Rev 2 – STM32H5 Safety Manual, Table 9 (CPU_SM_6)States that the IWDG reset may result in an "incomplete" local safe state — it only resets the CPU and does not guarantee that application software can bring the system to a final safe state. This implies that I/O and peripherals may not be reset. Document 2: RM0481 Rev 2 – STM32H562/63xx Reference Manual, Section 11.3.2States that an IWDG event results in a system reset, and all registers (except RCC_RSR and Backup domain) are returned to their reset values, which implies that peripherals and I/O should also reset.Can ST clarify this apparent contradiction? Does the IWDG event reset only the CPU (as per UM3150), or the entire system including I/Os and peripherals (as per RM0481)?
Board: NUCLEO-144 STM32H723ZGI'm using ADC_3 with 8-bit resolution, trying to measure an analog sine wave of 1 kHz as a stimulus.I'm trying to use the ADC with DMA. However, I am unable to get any values other than zero. I have tested it in polling mode and have successfully gotten correct values. I have been looking at multiple code examples. It seems like HAL_ADC_START_DMA should be enough to start sampling; however, my buffer isn't being updated. Where have I gone wrong? DMA settingsADC DMA settingsADC_settings ADC_regular_conversionMode CODE:/* 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
Hi team, I am using the STM32WLE5CC microcontroller and I am facing an issue with Readout Protection Level 1. I am utilizing the open bootloader from ST and updating hex files using the STM32Cube Programmer software using USART. Up to this point, everything has been working fine. However, after applying Readout Protection Level 1 to my application code, I entered bootloader mode and attempted to connect to the STM32Cube Programmer software. Unfortunately, it displays an error indicating that Readout Protection is activated. Additionally, when I use open bootloader commands through RealTerm software, it also fails to work. Could you suggest any other tools, apart from STM32Cube Programmer, or provide some solutions regarding the issue mentioned above? Thank you!
Hello ST Community,I recently purchased the STM32N6570-DK development board. However, I accidentally erased the default factory firmware by programming it with my own application, without saving the original files.As a result, I am no longer able to access the default UI features such as Edge AI live video, and other demos that originally came with the board.If anyone has a copy of the original default firmware (.hex or .bin files) that comes preloaded with the STM32N6570-DK, I would greatly appreciate it if you could share it with me.Thank you in advance for your support.
Hello,I am looking for the MCU for my project. I need the Ethernet and Can bus, so STM32F429 was in my mind first, but as I don't need the display function, I tried to find more affordable option.But I couldn't find the right one in STM32F4 series, and instead, I found STM32H5 series (STM32H563). When I did some research, STM32H563 doesn't seem to work with FreeRTOS or some special configuration to add the FreeRTOS. But I want to use RTOS as I need the firmware update via Ethernet.My question is1. Is the firmware update via Ethernet for STM32H563 with FreeRTOS available? 2. If not, is it better to use Zephyr OS even though STM32CubeIDD doesn't support Zephyr OS directly?I want to get the opinions before I order the dev kit.
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.