Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
I’d like to understand the practical trade-offs — for example, how each level influences execution speed, flash usage, and RAM consumption. Also, are there any best practices or common pitfalls when choosing an optimization level for STM32 projects?
Post edited by a ST moderator. Please use </> button to paste your code. Hi, I’m working with an STM32H7 (dual-core) and I want both CM4 and CM7 to be able to transmit on the same UART. On CM7, I initialize the UART normally MX_USART1_UART_Init(). On CM4, I try to send data via HAL and I’ve protected access with a hardware semaphore. Problem is that CM4 doesn’t see the properly initialized huart1 from CM7 and nothing is transmitted. What exactly do I need to do so that CM4 can use the same huart1, i tried the __attribute__((section(".RAM_D2"))) UART Handle TypeDef huart1; but it doesn't work ither. . Also why both cores declares huart1on their own?? Thanks in advance for any help! code: int __io_putchar(int ch) { // Take semaphore HAL_HSEM_FastTake(UART_HSEM_ID); if (ch == '\n') { uint8_t cr = '\r'; HAL_UART_Transmit(&huart1, &cr, 1, HAL_MAX_DELAY); } HAL_UART_Transmit(&huart1, (uint8_t*)&ch, 1, HAL_MAX_DELAY); // Release semaphore HAL_HSEM_Release(UART_
Hello, I'd like to use the STM32WLE5 in an upcoming design. Looking at the datasheet, I noticed the recommendation for the BGA package is to have the stencil opening larger than the pad diameter, instead matching the ball diameter . To me this seems counterintuitive, as I would typically reduce the paste for balls <0.4mm in diameter. Can anyone help me understand this recommendation?Thanks, Billy
Hi, I designed the us and ms delay functions using timer 2 and 4. Initially in the PLL source, I was using HSI, but it had some errors, so I switched it to HSE. I was using my delay function to control the DAC output, but when I switched to HSE, all my delay functions became twice as long.This is my code.while (1){/* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ HAL_DAC_SetValue(&hdac, DAC_CHANNEL_1, DAC_ALIGN_12B_R, 2854); // Delay_us(500);HAL_DAC_SetValue(&hdac, DAC_CHANNEL_1, DAC_ALIGN_12B_R, 868);Delay_us(500);HAL_DAC_SetValue(&hdac, DAC_CHANNEL_1, DAC_ALIGN_12B_R, 1861);Delay_ms(10);} This is the waveform of the oscilloscope. In the clock tree settings, I only switched the clock source to HSE, and the divider settings did not change. I wonder why this happened. Best,
Hello. This is HPNRT Co., Ltd. We are currently in the process of PESSRAE certification for our escalator auxiliary brake, a component that requires certification. We are developing the system using the STM32H743 MPU and plan to use Azure RTOS as the operating system. We were informed that the development and sales of Azure RTOS are free, but we need the Certificate Document for PESSRAE certification. Could you please assist us with this? Does the PESSRAE-related process require a separate contract? We would also appreciate it if you could provide us with the procedure for obtaining Azure RTOS PESSRAE certification and the email address of the relevant department at your company. Thank you.
Hello everyone, I'm using two STM32H503 boards. One is programmed as an I3C controller, the other as an I3C target, and I'm trying to achieve the following sequence on the I3C bus: IBI from target -> Repeated Start -> Private Read I find two things in RM0492 that may be helpful for my question: One is in Figure 418, there is the following note with 2 asterisks :Repeated start (Sr) if there is a pending transfer to execute and if I3C_DEVRi.SUSP = 0, else stop (P) in push-pull.The other is that there is a register called I3C device x characteristics register in RM0492. Here is the following description in RM0492, I set bit19 SUSP to 0, so that C-FIFO and TX-FIFO are not flushed after an IBI request.Based on this description, I preload a private read with C-FIFO before IBI, but I still saw that IBI completes with STOP, and then a START with private read. Is it possible to generate a repeated start after an IBI request? Does Hardware support for this sequen
Hello, I am struggling to use the following ST library for a project I am working on, I am using an stm32u5 with an MX25UM51245G NOR chip connected to the OSPI1 bus. The library provided is setup to use XSPI_HandleTypeDef, Can this library be used when using the OSPI bus?ST MX25UM51245G Library on github Thank you
Hi all,I’m testing MP3 playback on a Nucleo-WB55RG.Setup:SD card via FATFSHelix MP3 decoder (libhelix-mp3)PCM out via SAI1_A (I²S) → external DACDMA in circular mode, 2× half-buffer callbacksWhat works:A test sine wave buffer played via SAI+DMA works fine at 44.1 kHz stereo.DMA callbacks fire at the expected rate.So SAI + DMA peripheral config is correct.What fails:When I decode MP3 frames with Helix and feed them into the DMA buffer, audio plays but it is ~6× too slow and distorted.Console output shows decoded frames and DMA half/full interrupts incrementing normally.Suspect code (fill_half):static int fill_half(Mp3Ctx *c, uint16_t *target, int targetHalfwords){int written = 0;while (written < targetHalfwords) {if (c->bytesLeft < 4 && c->eof) break;refill_readbuf(c);int offset = MP3FindSyncWord(c->readPtr, c->bytesLeft);if (offset < 0) { if (c->eof) break; c->readPtr++; c->bytesLeft--; continue; }c->readPtr += offset;c->bytesLeft -= offset;i
I am trying to read GNSS data using B-L072Z-LRWAN1 and GPS module. I installed FP-ATR-LORA1 and wrote the project to my B-L072Z-LRWAN1 and viewed it with Teraterm, the following error message appeared."Accelerometer NOT initialized"I don't use an accelerometer. I just want to use GPS module. How can I rewrite the code to prevent the above error message from appearing?
Hello, im new in embedded system and im using the SBSFU project from this https://github.com/STMicroelectronics/STM32CubeU5/tree/main/Projects/B-U585I-IOT02A/Applications/SBSFU . I used the b-u585i-iot02a example and needed to do some changes to work perfectly in STM32U585CIU6. Im wondering now if there is a way do only use USB to communicate between my computer and the bootloader without any USART TX-RX pins.
Hi all,Can anyone give me a pointer of how-to organize and manage a group of widgets so I can enable and disable whole group together?If I have a group of buttons, gauge, text fields widgets and I need two different groups that overlap each other so I have to enable one and disable the other group and vice versa base on one toggle button states.I tried the containers method but unfortunately there are so many details that each group has to be differently so I can't implement the container. Each group has about 20 widgets, and it is just a mess (for me) to make these 20 widgets setVisible(true) vs. setVisible(false).Do any of you know how to organize these widgets as a group? So I can setVisible once for every widgets in the group?Thank you for your time.
标准时间(标准时间)的标签产地和芯片产地不一样,请问这个是否正常 Translation: The label on this device (Standard Time Clock) indicates different countries of origin for the product and the chip. Is this normal? Edited by ST moderator. In next time please use English as this is an international community.
The function printf is not thread-safe in multitasking environments. While correct output can be expected when a single task utilizes printf, concurrent use by multiple tasks may result in garbled or overlapping text. Implementing additional synchronization measures is necessary to prevent such issues.Val Gretchev
I'm reading the RM0008 Reference manual.....I can't find a description of the registers and events associated with the entry point of Vector table for USB_HP_CAN_TX and USB_LP_CAN_RX0....What does it mean USB High Priority and USB Low Priority ?How do these relate to the events?I'm studying Table 63. Vector table for other STM32F10xxx devices...
Hi Team How can I implement the ADAS1000 ECG sensor with an STM32 board to acquire ECG waveforms using 3 leads, and how do I read the data from the sensor leads?
Hello, I am working on STM32U5G7VJT6 with FDCAN1 peripheral.In CubeMX I configured 8 Extended Filters, and in my code I set them as dual filters. That gives me a total of 16 CAN IDs that can be allowed by hardware. Now my application requires filtering of around 50 unique Extended IDs. Since the hardware allows only 8 filters (dual = 16 IDs), I am not sure how to configure this efficiently for 50 IDs. My questions are Is there a way to extend the number of hardware filters beyond 8 (e.g., using extended, or any advanced setting)? If not, what is the recommended approach for applications needing more than 16 IDs? Should I: Use a broader mask in hardware filters (to accept a group of IDs), and then filter the exact IDs in software? Or is there another technique for optimizing FDCAN filters for larger ID sets? Any suggestions or example implementations would be really helpful. Thanks in advance!
Hello,I am working on a project with STM32 + BlueNRG-M2SP/M2SA and using a custom mobile app to connect over BLE.Here is my setup:The BlueNRG-M2SP/M2SA IC module is configured as a Peripheral (Server) with my stm32l0 mcu.The mobile app scans, finds the advertised name of my hardware, and connects successfully without any pin security.My question:Is it possible to connect two mobile phones (two Central clients) together to the same BlueNRG-M2SP/M2SA hardware device when it is in Peripheral/server role?The datasheet mentions “Supports master and slave modes, multiple roles supported simultaneously”. Does this mean multiple Centrals/phones can connect at once, or does it only mean the device can act as both Central and Peripheral (multi-role), but with a limit of one connection per role/same time?If multi-client support in Peripheral/server mode is possible, how can I configure the max number of links in the BlueNRG stack of my stm32l0 firmware code?Thanks in advance for
Hi Everyone, I hope you'll are doing well.I have STM32L562QEI6Q Board and IDQ6MC1 (Quantum Random Number Generator) IC. The IC supports 2 Modes (I2C, SPI) and I am using SPI interface.The IC gets Initialized and Starts OK and also I am able to read CHIP ID too, but when try to get Random Number, then it gives 0000... In order to get Random Data, FIFO should be ready (Must with return val of 0x01 on writing 0x41).I am giving you a Linux Written Driver of SPI, My STM32 Files (Header, Source and Main in .zip Folder) and Datasheet.Can anybody help me in this regard as there is very minimum integration support and I am stuck in getting random data from it.Looking forward to help from anybody...
Dear Team, I hope you’re doing well. I am currently working on a project using the STM32F412ZGT6 board, and I need assistance to play audio via the built‑in codec. I have configured the I2S, I2C Pin and initiated some tests, but I am facing difficulties in getting proper audio output. Could you please help me with: Sample initialization code (HAL / low‑level) for I2S / codec setup Recommended DMA / buffer handling strategy Any tips or pitfalls specific to the STM32F412 series audio path Example code or reference projects that use the built‑in codec If needed, I can share my current code, configuration settings (clock, pin mappings, CubeMX file, etc.). Your guidance would be of great help in moving forward. Thank you very much for your time and expertise.
Hello,I have been using the example for priority inheritance from the FreeRTOS on STM32CMSIS_OS APIv2.0 slide set for some time noe as an example to show to my students how priority inheritance ist working. But since upgrading to STM32CubeIDE v1.19.0 it seems this is not working any more. The is no difference now between using mutexes or semaphores. Has anybody made the sam experience so far?regardsHerbert
I am using the DAC on the NUCLEO-L433RC-P board for development and have also designed a custom PCB using the STM32L433.The DAC is used for audio voice prompts (12 bit, 44.1kHz stored in external flash) and fed into an audio amplifier (TI LM48100Q).However, I am getting hiss and interference from a flashing LED on my custom PCB (but not so much on the NUCLEO-L433RC-P board).I decided to try using a bench PSU to power the VDDA and VSSA pins on the NUCLEO-L433RC-P board, in case the SMPS on my custom PCB was causing the hiss.Bbut I was suprised that the DAC still worked even though the VDDA and VSSA pins were floating after I modified the board.Why does the DAC work when the VDDA and VSSA pins are floating ?I measured the voltage on the VDDA pin (with reference to the VSSA pin) and it was around 1.6V.When I did connect the STM32 VDDA and VSSA pins to the bench PSU and supplied it with 3.3V, it made no difference to the behavior.Below are the modifications I made to th
I want to connect the STM32L433VCT6 to the ML22530TB (ROHM) using SAI communication.Where should I connect the ML22530TB's LRCLK, BCLK, SAI_IN, and SAI_OUT pins on the STM32L433VCT?
I am having the worst time trying to get ANY MCU on the planet to work right for this project. I want to build an i2s-USB bridge essentially. I can get the clocks right, I can get data from i2s (WM8782)➞DMA(Circular)➞|WALL|The only provided examples for any device that I have found that actually work have been DAC implementations. That's neat and all. But I want to make an acquisition of audio and stream it to my computer. I wish to make an Audio Interface.I have tried so hard, so many times, and failed so miserably every time. A few times I have actually managed to rewrite the USB Descriptors well enough to get some remnants of wrecked audio stream to my computer, a sign of life at least. But when I had managed that, it was with a simpler device (STM32F411CEU6) and I hadn't gotten the clocks right, I was unaware at the time of the depth of complexity. I bought an STM32H723ZTG6, it checked all of the proverbial boxes. SAI, fast clocks, provided HSI48 just for USB, the
I have build the project with Nucleo_U5A55ZJ-Q with 1.4.0 and 6.2.0 library from the start, following the example code (working) with IOC setup (USBPD and USBX). After fixing the CSRST issue earlier with missing __HAL_RCC_SYSCFG_CLK_ENABLE() but I note the demo code do not use this command.The code is running, but there is no COM port (the demo code (2021) did work with COM3). I found the USBPD_DPM_CADCallback(..) is not calling.Below is code found in uspd_dpm_core.c where the DEF_TASK_FUNCTION(USBPD_CAD_Task) is working (via breakpoint), which suggests the interrupt is responding okay. I have spent 5 hours trying to figure out the difference between the generated code (2024) and the demo code (2021). I'm open to investigating why USBPD_DPM_CADCallback(..) is not calling. I attached ioc file. DEF_TASK_FUNCTION(USBPD_CAD_Task){uint32_t _timing;#ifdef _LOW_POWERUTIL_LPM_SetOffMode(LPM_CAD, UTIL_LPM_DISABLE);#endif /* _LOW_POWER */for (
To which models does this document apply https://www.st.com/content/ccc/resource/training/technical/product_training/group0/0f/de/60/a5/80/9f/48/dc/STM32H7-Analog-OPAMP_OPAMP/files/STM32H7-Analog-OPAMP_OPAMP.pdf/_jcr_content/translations/en.STM32H7-Analog-OPAMP_OPAMP.pdf? Do any MCUs of the STM32H7R3/S3 series have the built-in opamps? Any information on this subject except this AN?
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.