Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hello,I think I have interesting case, but from the beginningI use STM32F446ZEJx and HAL Drivers from STM32Cube_FW_F4_V1.28.3.When I use HAL_StatusTypeDef HAL_SPI_TransmitReceive_DMA(SPI_HandleTypeDef *hspi, const uint8_t *pTxData, uint8_t *pRxData, uint16_t Size)with Size=5 it internally checks the argumentif ((pTxData == NULL) || (pRxData == NULL) || (Size == 0U)) return HAL_ERROR;and passes the Size to/* Set the transaction information */ hspi->ErrorCode = HAL_SPI_ERROR_NONE; hspi->pTxBuffPtr = (const uint8_t *)pTxData; hspi->TxXferSize = Size; hspi->TxXferCount = Size; hspi->pRxBuffPtr = (uint8_t *)pRxData; hspi->RxXferSize = Size; hspi->RxXferCount = Size;later it configures the DMA channels,Rx/* Enable the Rx DMA Stream/Channel */ HAL_DMA_Start_IT(hspi->hdmarx, (uint32_t)&hspi->Instance->DR, (uint32_t)hspi->pRxBuffPtr, hspi->RxXferCount)Tx/* Enable the Tx DMA Stream/Channel */ HAL_DMA_Start_IT(hspi->hdmatx, (uint32_t
Is there a guide that shows how to set up a CDC USB device on the STM32N6 without using ThreadX in baremetal mode? I've tried following both, but it seems to hardfault on both examples crash at __lib_init_array(). I've tried increasing the stack and heap sizes to no success:https://community.st.com/t5/stm32-mcus/how-to-use-stmicroelectronics-classic-usb-device-middleware-with/ta-p/599274 https://community.st.com/t5/stm32-mcus/how-to-implement-usbx-in-standalone-mode/ta-p/614435 It's frustrating that the old USB_Device middleware got removed. We shouldn't be forced to use an RTOS where it is not needed...
Hello,I am using STM32H7B3LIH6Q and planning to interface a TFT display via LTDC (RGB interface). I am considering the following options:NHD-4.3-800480CF-ASXP (4.3", 800×480, RGB)NHD-4.3-480272EF-ASXP (4.3", 480×272, RGB)NHD-3.5-320240JF-ASXP (3.5", 320×240, RGB)Kindly suggest:Which TFT is most suitable for STM32H7 in terms of performance and ease of integration?Is 800×480 the preferred resolution for LTDC + TouchGFX applications?Do these RGB TFT displays support HDMI interface directly?If HDMI output is required, is using an external RGB-to-HDMI bridge (e.g., ADV7511) the correct approach?Thanks.
I am currently working on the STM32N6570-DK board and need guidance on FSBL configuration, multi-layer project structure, and external flash programming.Issue 1: FSBL Peripheral ConfigurationI enabled multiple peripherals in FSBL:USART1, I2CBSPXSPI1, XSPI2CSI, DCMIPPVENC, JPEGAfter enabling these, I am getting an "unsupported relocation" error.Kindly guide:Which peripherals are recommended to enable in FSBLWhich peripherals should be initialized in the Application layer insteadProper distribution of initialization between:FSBLApplicationExternal Memory LoaderIssue 2: Multi-Layer Project UnderstandingCurrently, the project has:Three separate layers (FSBL, Application, External Loader)Each has its own startup file and main functionI would like to understand:How these three layers work togetherExecution flow between FSBL → ApplicationHow memory mapping and control transfer happenThere are three separate build outputs—which one should be flashed?How will all three sections work together in
Hi,We are currently developing a solution based on the STM32WBA65RIV6 MCU, and we would like the internal RTC to remain active while the MCU is powered down.We assume that this is possible, and we would like to clarify the following points:For how long does the RTC retain its values after the MCU is powered down (by default)?Is it possible to connect a backup capacitor or battery to supply only the RTC or part of the MCU in order to extend the retention time?We also want to know if there is any documentation available on this topic. We have not been able to find detailed information.Thank you in advance.Best regards,Luis
Hi,I am working with the STM32WB5MMGH6TR and would like to achieve the following:Stream GATT data to a mobile phoneSimultaneously play simple audio to BLE earbudsThe audio requirement is modest: a tone that rises and falls in a sine-wave pattern (no music, no complex audio, no high-quality audio). The frequency should sweep between 500 Hz and 2 kHz, with a modulation rate of up to 60 Hz.Is this feasible using the standard ST BLE stack for the STM32WB5MMGH6TR? The key requirement is that both operations run concurrently.If it is possible, could you please outline the recommended approach?Thank you as always.
Hi all, I am trying to implement simple USB-FS communication on a BlueCoin board (STEVAL-BCNCS01V1). I am following the official STM tutorial on USB CDC and referencing the official SW package for BlueCoin. So, for USB I need PLL source from HSE clock: BlueCoin schematic shows that there is a crystal oscillator @16Mhz (NDK NX2520SA) installed directly on the board, so I configured RCC HSE as Crystal/Ceramic Resonator; the problem is that the function HAL_RCC_OscConfig(&RCC_OscInitStruct) in SystemClock_Config retrieves HAL_TIMEOUT as a result. Timeout value is default at 100ms. Clock configuration in STM32CubeMX is as suggested in the official USB tutorial: My current debug configuration has BlueCoin connected via SWD to a NUCLEO-G0B1RE, as suggested in UM2240 (see page 14). Could you please help me? Am I missing something? Thanks to anybody who can help!
Hello,My end node activation mode is OTAA, and is supposed to enter shutdown mode and wake up after a specified period of time period, in order to save power, the end node should skip joining the network at every wake up. I was able to skip the joining process by switching the activation mode from OTAA to ABP after the first join process, but after that, the server did not receive every packet sent from the end node like it used to when i was working with OTAA I doubt this is a good solution since a lot of packets are lostMy questions are:1) What do you think of my solution? is it missing something?2) What are my options if I want to stick to OTAA while skipping the joining process?3) Should I just go with ABP?
Can force a specific DR for LoRaWAN?I tried using: uint8_t custom_dr[7] = {0};custom_dr[3] = 1;lorawan_api_dr_strategy_set(USER_DR_DISTRIBUTION, STACK_ID);lorawan_api_dr_custom_set(custom_dr, STACK_ID); but did not work.
Hi everyone,I’m currently working with STM32 Secure Boot and Secure Firmware Update (SBSFU) and integrating it with my custom application. I’m trying to design the project in a modular and scalable way for long-term use, and I would really appreciate some guidance from those who have worked with SBSFU in production. Current ScenarioMCU: STM32 (Cortex-M series)Bootloader: SBSFUApplication: Custom firmware using HAL, middleware, and CubeMX-generated codeDevelopment tool: STM32CubeIDE Challenges I’m Facing1. Shared Drivers & MiddlewareBoth my bootloader and application require:HAL DriversSome middleware components What is the best way to manage duplication vs sharing?Should bootloader and application maintain completely separate copies of Drivers/Middleware?Is there any recommended way to keep them in sync without tight coupling? 2. Impact of .ioc ChangesI use CubeMX via .ioc for peripheral configuration.If I:Add a new peripheralModify clock or pin configurationHow
Hi Team,I have successfully integrated and run SBSFU with my custom application, and it is working as expected.Currently, I am transferring the .sfb file .via USB to the DWL_SLOT. Once the transfer is complete, I trigger a reset using NVIC_SystemReset(), and the process works fine.I have a few questions regarding the .sfb header. It contains fields such as:FW Tag (SHA-256)Header SignatureFirmware Size (FwSize), etc.My questions are:Using FW Tag (SHA-256) for validationIs it possible to use the FW Tag (SHA-256) to validate the received image in the DWL_SLOT before performing the reset?If yes, could you please guide me on the correct process to implement this?Current CRC-based approachAt present, I am calculating a CRC for the .sfb file after it is generated by the Python script. I then transfer both:The .sfb fileA separate CRC fileOn the firmware side, I recompute the CRC from the received data and compare it with the provided value. If it matches, I proceed with
Hello I'm trying to wire up the STM32G0B1CET6N and I don't know how to use the VDDIO2 pin. What is it for and how should I wire it?
Hello!I have a custom board with STM32F746VGT6 MCU, LAN8742A Eth PHY and Ethernet socket. I would like to implement MQTT communication in my project with my board as a client. I am familiar with LwIP and FreeRTOS and use both of these libraries in my current program.I already tried using WolfSSL and WolfMQTT (and succeeded to some degree), but it wasn't very pleasant experience and I had to manually copy and change many files to make it work. I want to rewrite the MQTT implementation as the current one doesn't work very efficiently, but I don't really know where to start. I'm grateful for all suggestions!
Hello,I am trying to port the official BLE_Ota example from STM32CubeWB (WB55 project) to an STM32WB30 device, but I am facing multiple compilation issues after importing the project into STM32CubeIDE.After configuring STM32_WPAN and generating the project for STM32WB30, I get many errors such as:RTC_HandleTypeDef unknown typeIPCC undeclaredFLASH_ECCR_* undeclaredSCB_* undeclaredLL_* functions not declaredHAL and LL drivers missing or inconsistentIt seems like the project is not correctly recognizing the STM32WB30 device definition, and many peripherals (RTC, IPCC, FLASH, RCC) are not properly included or enabled.I already tried:Adding STM32WB30xx define in the compiler preprocessorEnabling STM32_WPAN middleware (BLE stack full mode)Checking stm32wbxx_hal_conf.hHowever, the issues persist and the project still behaves as if it is partially configured for STM32WB55.My questions are:Is the BLE_Ota example officially supported for STM32WB30, or only for WB55?Are there any specific limitat
I want to vary the duty cycle of two adjacent DAC values of an STM32G473. I am using DAC1 channel1 and channel2 for the output. I want to load DAC1s DHR12Rx registers via DMA when TIM3 hits output compare values. I set up a memory to peripheral transfer for each TIM3 channel and set the CMAR and CPAR registers to the memory location of the DAC values and the peripheral addresses of the DAC DHR12Rx registers. I have been able to make this configuration work for making the TIM3 OC events trigger loading of TIM20's CCR registers from memory, but so far, the DMA transfer won't load the DHCR12Rx registers for the DACs. Are there additional configuration settings to make this work? CubeIDE\HAL has configuration options for initializing the DAC in DMA mode, but I need multiple triggers the make the duty cycling work.
HiI've been trying to understand what level of support is available for the H573 security features in Zephyr RTOS with mcuboot but either can't find any information or no one replies to my comments.I have a Zephyr sysbuild build working where mcuboot starts, validates the singed application in slot0 and proceeds tp boot from slot0.What I can't find or confirm is if that security features of the STM32H573 are being used or not. There doesn't seem to be any configuration relating to enabling or disabling the features.Are the security features enabled in Zephyr for the H573?I'm using the latest 4.2 version of Zephyr.CheersDave
I’m currently working on implementing and testing Flash ECC on my controller. According to the datasheet, the device supports ECC, and I can see that it is managed through the FLASH_ECCR register. However, I’m facing some difficulty verifying whether ECC is functioning correctly. Specifically: I am unable to find any ECC-related flags in the FLASH status register. I’m not sure how to intentionally generate an ECC error to validate my implementation (e.g., to confirm that error handling via NMI/interrupt is working as expected). Could anyone please guide me on how to reliably trigger a Flash ECC error for testing purposes on this controller? Any suggestions, references, or example approaches would be really helpful.
Dear Community, dear STMicro, I'm trying to encrypt data on an STM32WL55JC device using the STM32CubeExpansion_Crypto_V4.5.0 library and then using Python on the PC to decrypt it again.I've taken the example code for RSA encryption from the librarySTM32CubeExpansion_Crypto_V4.5.0/Projects/NUCLEO-WL55JC/Applications/RSA/PKCS1v2.2_EncryptDecryptand adapted it.I've created an RSA 2048 bit key on my PC using this code:private_key = rsa.generate_private_key( public_exponent=65537, key_size=2048) pem = public_key.public_numbers() public_exponent = ["0x%02s" % e[i:i+2] for i in range(0, len(e), 2)] n = "%X" % pem.n n = "0" + n if len(n) % 2 == 1 else n modulus = ["0x%02s" % n[i:i+2] for i in range(0, len(n), 2)] f = open("pub.c", "w") f.write("public_exponent[] = {%s}\n" % ", ".join("%s" % s for s in public_exponent)) f.write("modulus[] = {%s}" % ", ".join("%s" % s for s in modulus)) f.close() From this code I get something like thispublic_exponent[] = {0x01, 0x00, 0x01} modulus[]
I'm working with the STM32G4 series and using the backup registers to store time data that persists across power cycles. I have a question about VBAT brownout behavior that I cannot find explicitly documented in RM0440 or the datasheet.Background:Both RTC and backup registers are in the VBAT power domainI'm using a signature in backup registers to detect VBAT lossThe signature check works fine for complete power lossMy Question:Is it possible for VBAT voltage to drop to a level where:The RTC stops functioningBUT the backup registers still retain their contents?In this scenario, my signature check would pass (registers retained), but the time would be invalid (RTC stopped counting).Do the RTC and backup registers have the same minimum VBAT voltage threshold, or can backup registers survive at a lower voltage than the RTC requires?If VBAT brownout can cause RTC failure while backup registers persist, does STM32G4 have any hardware mechanism that automatically clears backup registers when
Hello,I'm designing a 2 layer PCB using STM32WL for LoRa operations at 433MHz and need a review of my RF layout. The board is JLCPCB 2 layer standard FR4, 1.6mm thick 1.46mm core, 1oz copper, 50Ω microstrip at ~2.8mm width, about 38mm long. I have placeholder caps/inductor to be populated after board fabrication. I am seeking expert opinion for:Trace width & impedance - does 2.8mm yield 50ohm given FR4, 1oz copper, and 1.46mm dielectric height?Critical length - Are there implications for 38mm length on transmission-line behavior?Taper - Taper starts 5mm in. Are there optimal lengths for tapers? Should I taper for shunt pads?Stitching vias - Recommendations for via spacing for this trace width? Every 5-8mm?Test points - Recommendations for RF test points without effecting impedance?Any other best practices or tips would be helpful. I thank you for any guidance.Best, John
I am trying to integrate Crypto lib to NUCLEOF303RE Board, Any guide or any suggestions would help
Hi everyone,I’m working on a 4-layer PCB design using the STM32WL (based on the Nucleo WL55JC reference design).For the RF section, I followed the same layout approach as the Nucleo board, including the layer stack-up and RF trace widths.The only difference in my design is that I have some GPIO signals routed close to the RF section. These signals are routed on the 3rd layer, while I am still maintaining solid ground planes on the 2nd and 3rd layers underneath the RF section.I would like to clarify:Is it acceptable to route non-RF signals on the 3rd layer near the RF section if solid ground planes are maintained?Are there any risks (e.g., noise coupling or RF performance degradation) with this approach?Additionally, if I modify the layer stack-up:What parameters need to be adjusted (e.g., RF trace width, impedance matching, ground reference)?Are there any recommended guidelines for maintaining RF performance when changing the stack-up?Any guidance or best practices would be greatly app
Hallo,is it possible to detect in my code whether it was just loaded and started under debugger? The code should behave deifferant as usual because flash loader writes into RAM and .noinit section is modified because of this.I have already checked RSR register. It looks the same as after software reset: CPURSTF, PINRSTF and SFTRSTF are high.Moreover RSR gegister is independent from debug configuration: Debugger / Reset behaviour. I use ST-LINK v3 with ST-LINK GDB server.
First and foremost, they aren't perfect. The code has tons of work left. But it took me SO long to get ANY i2s audio data from my guitar to my computer, the major hurdle being mostly the lack of USB Microphone drivers provided by the stack.Now that I've made them, and I am pretty sure it's the other parts of the code that are at fault for the clock drift, I am sharing it in hopes that it will help someone else who was in the same boat I was.This is designed for the STM32 to be the SLAVE to a CODEC with Full-Duplex mode support (4-5 wire bidirectional I2S Standard, 16 bit 48k. I know, nothing to call home about, but it is the simplest to get working) Try your luck with your specific CODEC, maybe you can configure things differently and get it working right. On the PCM3060, this was the best I could manage.I have no field experience, no college degree, I am just persistent. If I can do it, you can too. Don't give up. I know I haven't, this is just the start.Note: if you're just picking u
Hi all, Quick question for those working with STM32 embedded devices: If you had a tool that could analyze logs or telemetry using AI — would you feel comfortable sending that data externally? Or is data sensitivity (customer data, device behavior, industrial info) a hard blocker? I’m exploring ways to preprocess/anonymize this data before it leaves the device or server. Curious where people stand on this — is this a real need or overengineering?
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.