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'm trying to measure the current consumption of the MCU/NPU on a NUCLEO-N657X0-Q board. According to the reference manual (https://www.st.com/resource/en/user_manual/um3417-stm32n6-nucleo144-board-mb1940-stmicroelectronics.pdf - see par. 7.4.4), I tried both removing resistor R13 and measuring the current with a multimeter across pins 9-10 on CN12, and removing R40 and measuring across pins 3-4. In the first case, I couldn't measure anything at all, so I assumed the board was in SPMS mode and tried the second option instead. However, when measuring the current across pins 3-4, I got a reading in the order of 40 microamps, which seems implausible. Notably, I'm trying to measuring while AI validation is ongoing in CubeMX.I'm wondering whether I might have made a mistake with the board, or if the issue lies with the measuring instrument. Thanks!
Hello,To protect the device's software, I am updating the RDP values in my own bootloader software, and to protect it in the event of a sudden power outage, I am also updating the BOR values. I am performing these updates only using HAL APIs. Additionally, I am writing the option bytes one by one. During development and testing, this worked flawlessly. However, the device has now entered serial production, and we are programming in large quantities. So far, 200 MCUs have been programmed, and approximately 50 of them ended up with an RDP value of 0xFF and the BOR value not set. I urgently need assistance regarding this issue. Production has been halted and is waiting for this problem to be resolved. Please help me.I am adding the code block where I perform this operation below. /* USER CODE BEGIN 2 */ #ifndef DEBUG FLASH_OBProgramInitTypeDef ob_init; // Unlock Flash and Option Bytes HAL_FLASH_Unlock(); HAL_FLASH_OB_Unlock(); // Get current configuration HAL_FLASHEx_OBGetC
I'm relatively new to STM32 and it's my first time working with DMA so this will probably be a very basic question.I'm using STM32G474 and I want to have 3 channels of advanced timer TIM8 working in "PWM generation CHx CHxN" mode. At a later stage I'm looking to run FOC on them, but for now I just want to change the duty cycle of each channel period by period, by reading the duty cycle for the next period from a predefined table and transferring the duty cycle value using circular burst DMA to update all 3 channels at the same time without software overhead.These are my DMA settings for TIM8 in the ioc fileI can't find the settings for which register i want to write to using DMA. I have ChatGPT telling me that DMA can only write to CCR register and Gemini telling me I can set which register to write to in the ioc. Both are pointing me to reference manual RM0440 (https://www.st.com/resource/en/reference_manual/dm00355726.pdf), but I'm getting overwhelmed there and can't find anything re
Greetings,I have a project on the Nucleo F767ZI board where I try to send a CAN message to another device (in particular, an Maxon EPOS4 Compact 50/5 drive). I can receive messages from this device with no problem, however, as soon as I press the button to start sending messages from the Nucleo board to that device, the drive enters into fault state, allegedly because of a 'CAN passive mode error', which arises because of a bad network configuration or baud rate setting. The Nucleo can still receive messages with no problem after this happens.I have checked the H/L connections with a scope, and can see that there is data coming from both devices. My setup is as follows:Hardware Setup:Nucleo board connected to CAN_H/_L through a TJA1050 transceiver board (schematic attached)120 Ohm termination resistor in both the TJA board as well in the other device (resistor in the EPOS drive). I get a 60 Ohm reading between H and L when using a multimeter, as expected.Connected device powered b
Hi Everyone,I’m working with an STM32U575 and facing an issue when trying to use USB-PD (X-CUBE-TCPP) together with TouchGFX.In CubeMX, it does not allow enabling both X-CUBE-TCPP (USB-PD) and TouchGFX Generator at the same time. It shows a restriction that only one application can be selected.We are trying to implement USPD along with touchGFX on STM32U5757. We have implemented induvial and tested both are working well. But when we trying to merge them, then both are not running . We have seen in cubeMX that is not allow us to select both at same time, it says you can't use both at same time. Then we read the st community and found we can merge them manually . We tried to merge but after initialization of one other one hangs. Can you clear that is it possible to use both at same time in U575 MCU? Note- we are using free RTOSThanks & Regards,Rajkumar
I want to use the standalone CRC module to offload calculations AND transfers from CPU - using purely DMA memory transfers - is this possible on the STM32G474RE?
Hello everyone,I'm currently working with the STM32WBA65RI Nucleo board.For my upcoming application, I require a stable BLE throughput of over 800 kbps. However, using the provided example, I can only achieve around 600 kbps.So far:I'm using an MTU of 244 bytes.2M PHY Manage to minimize connection interval : 11.25 ms when using the ST BLE Toolbox app, and 7.5 ms when using a custom script on Windows.I’ve tested with several smartphones/ configuration and also tried increasing the MCU clock, but none of these changes improved the performance significantly.Has anyone managed to achieve a higher throughput with this setup or found effective optimizations?Thanks in advance for any insights.
Hi everyone,Im currently trying to use SPI with DMA mode on STM32U031G6 with an S2LP,In this specific case I want to obtain the number of bytes present in my FIFO (10 bytes here), but the problem is that my reading through DMA mode does not work.Below is the data that I analyze in SPI using a logic analyzer : we have the read command (0x01) + the FIFO status command (0x90) + the command (0x00) where I get my response 0x0A or my 10 bytes. What I don't understand is that the read_1_registre_DMA function returns 1 on the 3rd data item that I want to read as below :Below is the function where I give my 3 Tx commands and where I expect 3 responses in return for Rx but the data is not correct for RX[2] (3rd element, or for me I should find my 0xA)://----------------------------------------------------------------------------- uint8_t S2LP_Read1Registre (uint8_t address) //----------------------------------------------------------------------------- { S2LP_Init_DMA_Mode(); // Pré
Hi.I'm working on stm32wb for some time, handling CPU2 updates of BLE stack application.Lately, version 1.23 was published with new FUS version, so I tried updating it with my application running on user flash. I searched for the magic word but I found something strange, empty word in the middle of the footer:I compared it to previous version and it appear there also.As described in AN5185, magic word is placed after FW version, so what am I missing?Any help is welcome.Thanks in advance.
Hi there, I am using and STM32F469-disco board and want it to communicate via SPI2 with a Battery Management System. When launching only the BMS task it runs perfectly, the communication is stable and I can read cell voltages and temperatures through SPI2 line. The thing is that when adding touch gfx task (uncommenting the initialize of the kernel) it runs the BMS task as well as Touch GFX task but the BMS task does not work correctly, it does not communicate with BMS. The same code, same task, but adding Touch GFX task creates a conflict that does not lend the SPI2 communicate with other devices. In theory, the pins for SPI2 (PB14 and PB15) are free of use. I also tried to disable interruptions when reading BMS in BMS task (__disable_irq()) but does not work neither.Could someone think of a solution, or testing to know where is the problem?Thank you very much!PD: I would say that both Cube and Touch are updated to last version.
I was performing a firmware update to my board when the board lost connection to my computer. Ever since then I have been unable to connect to the board. I tried going through STM32CubeProgrammer to perform a connect under reset, which just says "Error: Problem occurred while trying to connect". I have also attempted to hold the reset button while performing a full chip erase but I receive an error: must connect before performing action. I have all my jumpers in the correct place and even tried jumping BOOT0 while performing the connect under reset. I would love some help from someone who has possibly been through this before, thank you.
Hello @ST Community,I am working on a project with the STM32F746NG board. In this project, I want to communicate with a PLC using the EtherNet/IP communication protocol. To achieve this, I plan to integrate the OpENer stack into my project.I am looking for guidance on how to properly build and port the OpENer stack to the STM32F746NG board and how to test it to ensure it communicates correctly with the PLC. Any examples, step-by-step instructions, or references would be greatly appreciated.Thank you in advance for your support!
I use STM32F469I-DISCO.I update TouchGFXDesigner4.25.0 to update my project.but screen setting is flip and differenet from before.How should I do to return to the original orientation?
I'm trying to get the Debug Authentication provisioning to work. I managed to write it from within the application, but then I found the errata sheet(es0565-stm32h562xx563xx573xx-device-errata-stmicroelectronics.pdf) which states otherwise:"Chapter 2.2.35: Debug Authentication provisioning cannot be done from the application when TZEN is disabled" I tried to do the provisioning with RSSLib->DataProvisioning(), as mentioned in the errata sheet, but I end up getting a hardfault.I'm using the nucleo-h536zi-board, trustzone is disabled. RSSLIB_DataProvisioningConf_t a; a.pSource = sData; a.pDestination = (uint32_t *) (0x0FFD0100); a.Size = 0x60; a.DoEncryption = 0xCACA0AA0U; a.Crc = 0; uint32_t c = RSSLIB_PFUNC->NSC.DataProvisioning(&a);Since the CRC is not correct, I expect to get the CRC error instead of a hard fault. Is there something I need to set up before calling DataProvisioning? I tried to find an example, is there one somewhere?
Hi. i have a 743i eval board . and i've gone through the touch gfx examples (i'm not experierenced in c++ ) and i've found other examples ive worked though .. The project i'm on revolves around receiving CAN data and displaying on LCD and also touch screen button / external buttons that send messages back. i've taken my button press example (controllers tech adapted to my board) this turns the display backlight on and off - so i know i can have external control. i also have a a can example i've split in to a can.c can.h and added to the project (set up the interrups in cube ide and added the callbacks) .. but with breakpoints on the call back when i send a message nothing happends. After looking at webinars etc.. i'm guessing the rtos has got to schedule stuff so i may have to go back a step or 2 and re-look at those. but can't find the code to look at from the ST webinar - had display turning on external led and doing animation from a button . if anyone can shed light or o
Hello,I am using STM32 microcontrollers on CAN FD ISO buses.The problem is that I am not able to configure CAN FD bus with a nominal rate of 500kbps and a data rate of 1Mbps. All others configurations are working as expected, see below all combinations tested:Nominal rate (kbps)Data Rate (kbps)BRS500500No5001000Yes5002000Yes5004000Yes5005000Yes5008000Yes10001000No10002000Yes10004000Yes10005000Yes10008000YesI tried the following issue on STM32G431KBU and STM32H723ZGI. CAN input clock is 80MHz, Sys Clk is 512MHz for H7 and peripheral clock is256MHz. On G4, Sys clock is 160MHz and peripheral clock is 160MHz. So on both microcontrollers CAN clock is lower than peripheral clock.Bit timings for nominal rates are the following:Nominal bitratePrescalerSJWTseg1Tseg2 Tq per bitTheoretical bitrate (kpbs)500162721050010008272101000Data ratesPrescalerSJWTseg1Tseg2 Tq per bitTheoretical bitrate (kpbs)50016472105001000827210100020004472102000 Any help would be appreciated,Best regards
Hi all,I’m currently using the EVSPIN32G4 development board for a drone project. I’m controlling motor forward and reverse using ST Motor Pilot.I’ve noticed that when switching from forward to reverse, there’s a short pause before the motor starts spinning in the opposite direction.Is there a way to implement a seamless transition between forward and reverse motion so that the motor can switch direction without this stop?Thanks in advance for your guidance!
What is the sequence and APIs to erase and program the Engineering bytes?There are APIs to handle Main flash, and APIs to handle OTP, but it is not clear how the Engineering bytes should be handled.Thanks
Hello everyone,I’m working with an STM32WB55 microcontroller with BLE stack. I use also low-power modes in my app. Before entering a low-power mode, I set an RTC ALARM_A to wake the system up at a specific time. The device then enters either Sleep or STOP2 mode with the RTC enabled.However, I’m noticing an issue where, when in these low-power modes, the RTC ALARM_A does not seem to wake the device as expected. The timing appears to freeze or behave unpredictably, and the alarm sometimes triggers late or not at all.Here is the output just before entering sleep mode with the configured alarm:Current time vs Alarm RTC Settings:(PREDIV_S = maximal SubSec = 32000)| Field | Current (Cur) | Alarm (Alm) ||------------|------------|--------|| SubSec | 7234 | 6594|| Sec | 21 | 21 || Min | 0 | 0 || Hr
Greetings!I am using the STM32U031 with STM32CubeMX HAL as an SPI Slave and would like to receive data that has variable length (max 50 bytes). I am using software NSS and my current approach is to start a DMA Rx/Tx transfer (using HAL_SPI_TransmitReceive_DMA) of the maximum expectable length when NSS goes down (in the corresponding GPIO callback) and to abort the transfer when NSS rises again (using HAL_SPI_Abort). From a functional perspective this approach works, but the abortion of the Transfer currently takes about 1.4 ms (at 8 MHz MSI Clock). As a result, the answer to the Master is not ready when it clocks again. Is there anything I can do better / different to improve the timing?I know that using HAL_SPI_Receive_DMA instead of HAL_SPI_TransmitReceive_DMA for Rx would reduce the time required for aborting the transfer, but then it seems that I have no control over the data that is transmitted while receiving, which causes trouble on the Master side
Hi,I want to integrate on the same PCB both a STM32WB5MMGH6TR and a STM32WL5MOC. Are there any issue in terms of RF interference? Are there any shielding recommendations to avoid problems while both modules are transmitting?ThanksMatteo
Hello @Community, I am working on the STM32F746NG board. In my application, I want to communicate with a PLC using the EtherNet/IP communication protocol to exchange real-time data. The problem I am facing is that my board does not respond to ping when FreeRTOS is enabled. Without FreeRTOS, the board is pinging correctly. Has anyone faced this issue before? If yes, please guide me on how to resolve it. Any suggestions or solutions will be greatly appreciated. Thank you!
We have a working production firmware for the STM32H7B3 that uses a Winbond W25Q01JVZEIM external flash using QSPI in memory-mapped mode to store data and assets for a TouchGFX and other applications.Now, due to internal flash limitations, we are attempting to execute some code directly from the same external flash. As a starting point, we created a simple test function to run from external flash:__attribute__((section("ExtFlashSection"))) void test_ext_flash_func(void) { volatile int x = 1; x++; }The rest of the application continues to run from internal flash. However, when this function is called, the MCU enters a continuous reboot loop. We have added Hard fault handler but couldn't see any prints for different register values.Current ConfigurationLinker ScriptMEMORY { ... OSPI (xr) : ORIGIN = 0x93170000, LENGTH = 32M } SECTIONS { ... ExtFlashSection : { *(ExtFlashSection ExtFlashSection.*) *(.gnu.linkonce.r.*) . = ALIGN(0x4); } > OSPI }2. MPU
We have developed an IoT sensor using the STM32WLE5JC LoRa module. It is a device we expect to reboot a few times (when necessary). It was discovered that when a downlink command (to reboot the device) is sent, the device reboot, but then it hangs during the join process.After much debugging, it looks like NVM context data is corrupted. Then I disabled context management by setting the flag CONTEXT_MANAGEMENT_ENABLED to 0. . After this, the device consistently joins after a reboot. We can also see that keys are cleared and the join process is fresh each time.Additional context: According to lorawan_conf.h, where CONTEXT_MANAGEMENT_ENABLED is defined, the comments state that "context management must be enabled for LoRaWAN 1.0.4 or later ". We ar currently on LoRaWAN version 1.0.3 and don't expect that to change for the foreseeable future.Question - Are there any critical concerns or downsides to disabling context management?
Hello, I am working on simple program to read ADC using the STM32u585QII microcontroller. I am using polling method in Scan mode on 4 channels. All set as 14 bit but understood the readin will be in 12 bit. The problem is the values I am getting are not reflecting the real value at the input. I am receiving something like 1586 cnts on 1st and 3rd channel and 2395 cnts on 2nd and 4th channel. Values make no sense assuming I have stable (verified with oscilloscope) voltage 1.61V. Vref is 2.5V external. Also when I am trying change voltage at the inputs the reading doesn't change. Can someone point me the possible issue with the configuration. /* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2025 STMicroelectronics. * All rights reserved. * * This software i
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.