Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
NUCLEO-F767ZI I'm trying to use the LwIP middleware which I have enabled in MX. First I'm trying to check if an ethernet cable is attached or not. I have setup UART3 to use printf (which works as expected) I've set the callback in lwip.c to print when the cable is removed or plugged in or so I thought but I get no message when I connect or disconnect the cable. The LEDs on the socket light up when the cable is connected, so the board at some level does see the cable. What am I missing here? EDIT:: LWIP_NETIF_LINK_CALLBACK was enabled in MX // In main.c MX_LWIP_Init(); /* USER CODE BEGIN WHILE */ while (1) { MX_LWIP_Process(); /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ } /* USER CODE END 3 */ // In lwip.c the callback function that is registered in MX_LWIP_Init() static void ethernet_link_status_updated(struct netif *netif) { if (netif_is_up(netif)) { /* USER CODE BEGIN 5 */ printf("Cable connected\r\n"); /* USER CODE END 5 */ } else /* netif is down */ { /* USER C
Hello, I configured a timer in STM32CubeMX2 to use 2 channels (HAL_TIM_CHANNEL_1 and HAL_TIM_CHANNEL_3). After the mx_system_init() I use the following code: hal_tim_handle_t *htim5 = mx_tim5_gethandle(); if (HAL_TIM_OC_StartChannel(htim5, HAL_TIM_CHANNEL_1) != HAL_OK) { return (-1); } if (HAL_TIM_OC_StartChannel(htim5, HAL_TIM_CHANNEL_3) != HAL_OK) { return (-1); } if (HAL_TIM_Start(htim5) != HAL_OK) { return (-1); } The first channel starts as expected, but when I attempt to start the second channel the code causes an assert in HAL_TIM_OC_StartChannel: /* Check and update the channel state */ ASSERT_DBG_STATE(htim->channel_states[channel], HAL_TIM_OC_CHANNEL_STATE_IDLE); Do I need to do anything different? Regards, -Gil
The entry for address 0x1FFF7838 in Table 17 ( Organization of option bytes) shows FLASH_PCROP1ASR as the "Corresponding option register" - it should be FLASH_PCROP2ASR.
Trying to Interface ADS1293 with STM32U5 for 3-Lead ECG – Need Help with Lead II Data Hi STM32 Community :waving_hand:, We’re trying to build a 3-lead ECG signal acquisition setup using the ADS1293 analog front-end connected via SPI to an STM32U5G9ZJT6Q microcontroller. The goal is to capture and plot Lead I, Lead II, and derive Lead III using TouchGFX. What’s Going Well: We are able to receive and plot clean ECG data for Lead I (RA - LA) using CH1 of the ADS1293. SPI communication is stable, and the plotting is handled through TouchGFX without lag. Sampling is working at 500–1000 Hz using a DRDY-based interrupt routine. What We’re Struggling With: When we try to configure CH2 for Lead II (RA - LL), the data appears noisy, flat, or unstable. We’re using the same initialization and acquisition process for CH2 as we did for CH1, but the result is not usable. For Lead III, we are trying to derive it in software using: Lead III=Lead II−Lead 
hello ST Community,There's an STM32 board in a USB pen drive format with a small flash memory capacity and only a few pins (3-5 pins) for UART serial communication. On this STM32 board, inside the USB pen drive, I can program the dedicated software for serial communication.If it exists, can you tell me the model and serial number? I can't find it online.Thanks for the information.
Hi all.I wish disable auto PAD disable CRC append. Send packet use low_level_output(), before call HAL_ETH_Transmit_IT()I set TxConfig.ChecksumCtrl = ETH_CHECKSUM_DISABLE; TxConfig.CRCPadCtrl = ETH_CRC_PAD_DISABLE;but packet allways pad to 60byte,if use TxConfig.CRCPadCtrl = ETH_CRC_PAD_DISABLE;, no packet outputif use TxConfig.CRCPadCtrl = ETH_CRC_INSERT; output fine but have 4byte crcr append.How to do , NO-PAD NO-CRC send packet?
I'm trying to interface with a W25N NAND flash chip on an STM32H7, over QSPI. I've only got consistent output out of the reads, and even then, I notice the system hangs forever and can't accept anymore input after a read. Everything else will hang immediately, even a print statement to the terminal at the top of the function won't appear, and the whole system hangs. From some similar issues I found online, I thought it would be a timing issue, and so I tried to implement a status register check. That's my first function in my excerpt below. However, this function couldn't even run alone without again hanging the system (meaning something else is causing the resets, program, clear, and even status check to hang). What else could be the issue that stops everything from running? Any advice much appreciated. Thanks very much in advance.uint8_t W25N_status(void) { QSPI_CommandTypeDef cmd = {0}; uint8_t status; cmd.InstructionMode = QSPI_INSTRUCTION_1_LINE; cmd.AddressMod
While I was experimenting with the 'L476 Disco, the RM wording goes across multiple families, so it may be relevant to most/all of them. In particular, for Shutdown mode (which is supposedly the lowest-VDD-consumption mode), the RM says: What does "switch to Backup domain is not supported" mean, exactly (assuming VDD and VBAT have separate sources)? as soon as Shutdown mode is entered, RTC (backup domain) is switched to VBAT even if VDD is present, potentially draining the VBAT source (battery, capacitor) in Shutdown, while VDD is present, RTC is powered from VDD; but when VDD is removed, RTC is *not* switched to VBAT, resulting in backup-domain reset and/or RTC corruption in Shutdown, while VDD is present, RTC is powered from VDD; but when VDD is removed, most of the time the switch flips to VBAT as expected, but this is not reliable and sometimes RTC corruption occurs in Shutdown, it's unpredictible, what is the backup-domain switch state, even while VDD is present These are
Hello, is it possible to boot FSBL and load application from SD card upon powerup, bypassing onboard flash? I didn't see any clear guides on this procedure.Thank you
I’m designing a board using the STM32U083MCT6TR, and my system supply voltage is VDD = 1.8 V.The design does not use USB at all. The datasheet specifies that VDDUSB normally requires 3.0–3.6 V for USB operation, but it’s not fully clear what the correct connection is when USB functionality is not needed. My question:What is the recommended way to handle the VDDUSB pin when USB is unused and the MCU is powered at 1.8 V? Should VDDUSB be tied to VDD (1.8 V)? Should it be left unconnected? Or is another configuration required? If anyone has experience with the STM32U0 series or clarification from ST, I’d appreciate the guidance. Thanks, -Tal
Hi everyone,I’m currently working on a project involving LR-FHSS and I’d like to know whether there are STM32-compatible end devices and gateways that already integrate LR-FHSS-capable radio chips.From what I’ve found so far:End Devices (sensor/node): They must use a chip from the SX126x family.Gateways: They need to be based on the SX1302 or SX1303.Before I start designing custom hardware, I’d like to confirm whether there are existing commercial end devices or gateways that already include these chips with LR-FHSS support.If anyone has experience with this or can recommend specific hardware, I would really appreciate it.Thanks!
This is probably an old hat to most of you here but I'm facing this problem momentarily:Using an STM32F103CBT6 (Blue Pill) where GPIOB Port is used already with the following PB3 - SPI1_SCKPB5 - SP1_MOSIPB6 - Some Interface Function (OUTPUT)PB7 - Some Interface Function (OUTPUT) I want to use PB0, PB1, PB4, PB8, PB12,PB13,PB14,PB15 for a keyboard matrix scan and outputa running pattern to these pins. Writing the bits should be nondestructive what the remaining bits is concerned. At the back of my mind I recall something like BSRR, but could someone help me to get on the right track?I'm using HAL in this app (under STM32CubeIDE).
Hi, I am working with the SBSFU_Boot on the STM32U5A9 chip. After the SBSFU_Loader has written the update image into internal memory, a reset happens in order for the SBSFU_Boot to write the image to be booted. When performing the update, it ends up in a process where it has to do some encryption. The SAES engine is initialized successfully, and then AES_Encrypt is called. This keeps on failing because a read error is reported in the SAES->SR reports a read error upon enabling the SAES peripheral. It should be noted that the initialization and encryption sequence is strictly followed per instructions in RM0456 Rev 6 sections 50.4.4 (Initialization of SAES) and 50.4.8 (ECB/CBC encryption sequence) respectively. What am I missing?
@FBL Can you explain me about buffer descriptor table (BDT)? Is it fixed?I have got behavior that I can't explain.Dumping packets on host I got wrong data. Length is ok, but data is wrong.In BDT I wrote correct address and length. Data wrote in pma (adress that is in BDT) is correct.But when I stop in debugging address in BDT is changed. As I think in BDT there is a place for each endpoint (or it is like cyclic buffer?)What I found if I set break point with "if" condition, just before sending address in BDT is OK, and data on host is OK. It seems to me that I am working incorrectly with BDT.
Hello,I am following the blog "Implementing Debug Authentication on STM32H5 using CLI tools" (https://community.st.com/t5/stm32-mcus/implementing-debug-authentication-on-stm32h5-using-cli-tools/ta-p/622308) to provision my STM32H533RE based custom board on which i have configured secure word only(All the peripherals configured as secure) and i have disabled Non Secure Project from "Project Manage" tab of STM32CubeMX, and I am now stuck with the device in CLOSED state with no way to regress.Environment:Board: NUCLEO-H533RE (STM32H533RET6)STM32CubeProgrammer: v2.22.0STM32CubeH5 Firmware: v1.6.0ST-LINK FW: V2J47S7SFSP Version: v1.2.0OS: WindowsWhat I did (step by step):Step 1 — Flashed secure firmware (succeeded with mode=UR):STM32_Programmer_CLI.exe -c port=SWD mode=UR -e all -d C:\H5\Binary\Sec_FP_Sensor_v1_2_Secure.elf -vResult: :white_heavy_check_mark: Download verified successfullyStep 2 — Set product sta
I am coding from the scratch to learn how STM32 works with MIPI-DSI LCD, because I am going to use customized MIPI-DSI LCD. I refer to the official code, but some incorrect content as below:official default code: in main.c , static void MX_LTDC_Init(void):// SETVCOMuint8_t InitParam60[4] = {00, 00, 00, 0xC0};if (HAL_DSI_LongWrite(&hdsi, 0, DSI_DCS_LONG_PKT_WRITE, 4, 0xC7, InitParam60) != HAL_OK){Error_Handler();}BUT, I check HX8379C datasheet (LCD control ), SETVCOM command is (B6h), and there is no 0xC7 command ?so what's this code for? and HX8379C datasheet dosen't mention initial sequence , how do we know that we need to set SETPOWER, SETDISP, Set display cycle timing,.....SET GAMMA,....,then Exit Sleep Mode to let LCD work? I don't use touchgfx now, just want to test if DSIHOST, LTDC work successfully, so I declare a framebuffer[480*480] then in MX_LTDC_Init(), write:pLayerCfg.FBStartAdress = (uint32_t)framebuffer;then using for loop
Split from WiFi or WiFi+BT modules architecture and parts recommendations as that's really a separate question!Thank you @Andrew Neil I didn’t explain myself very clearly. The part I’m mainly interested in is the audio side — specifically, a microcontroller with some kind of audio I/O capability, such as microphone input and speaker output, for recording (and then saving to uSD - perhaps using DMA if it makes sense). I’ve never worked with microcontrollers for audio recording before, so if such micro is not available, I’m also open to a low-cost solution/architecture that uses external components.Thank you
(I tried to submit a ticket but the system seems broken, giving an obscure error about an incorrect zip code).I need to confirm which version of STM32 is placed on a board. There are two versions, GP and PD. The datasheet does not really specify how the top marking is different for the two versions. Any ideas?Thanks, Pete
We want to use the STSPIN32G0A1 evb, we cant find its schematics of it.
Hello, in the STM32H753xI datasheet, Table 11, "Total current into sum of all VDD power lines (620mA)," is the voltage condition VDD = 3.3V? I would also like to know the current at VDD = 1.8V.
I am trying to capture data from the LINE_IN (blue jack on board), but I am not receiving the correct input. I evaluated my output at the oscilloscope and noticed that I am not receiving the sinusoid I am injecting; the frequency is correct, but the data appears clipped, as shown in the picture. I tried to reduce the Vpp, but it just started getting noisy instead of giving the correct input.My second test was to record on the sd card, and the problem persisted; I am only getting data above zero and noiseI am using the BSP library stm32h735g_discovery_audio.c, and to get the correct frequency that I was inputting, I modified these values in the BSP_AUDIO_IN_Initmx_config.FrameLength = 64;//changed: prev:128 mx_config.ActiveFrameLength = 32;//changed /An changed the number of slots like this:hsai->SlotInit.SlotNumber = 4; /* WM8994 TDM mode: 4 slots */I also tried to modify these registers from the audio codec directly, but nothing seems to make it work:* Disable mute on IN1L_TO_
Hi I am trying to use the AEK-POW-BMSWTX to read cell voltages from an Optipower OPR50006S50 Lithium Ion battery. I only want the cell information, not interested in battery management itself. I'm using SPI2 from an STM32G474RE. I have spliced pin C0 to the GND EXT pins and the GND terminal of the battery, then used C1 through C6 for cell wires. C6 is spliced to C7 through to C14, finally the positive terminal of the battery is connected to VBAT. The issue I am finding despite no MISO comms from the board is LED D2 goes off after 60 or so seconds. My SPI function is as below: void BMS_Read(uint8_t *rxBuf, uint16_t len) { uint8_t wake[5] = {0x55,0x55,0x55,0x55,0x55}; uint8_t rxBuf[8]; HAL_GPIO_WritePin(SPI2_BMS_CS_GPIO_Port, SPI2_BMS_CS_Pin, GPIO_PIN_RESET); HAL_SPI_Transmit(&hspi2, wake, 5, HAL_MAX_DELAY); for (uint16_t i = 0; i < len; i++) { uint8_t dummy = 0xFF; HAL_SPI_TransmitReceive( &hspi2, &dummy, // generate clock &rxBuf[i],
I have a project that is using custom hardware with a STM32G0B1CBT6 processor. The code is developed using STM32CubeIDE and STM32CubeMX. However, there are times when I am unable to run a debug session and I'm seeing (very) occasional Hard Faults.I have a diagnostic serial port and have successfully modified my Hard Fault Handler to dump additional information out that port.So what I'm after is some code that can read registers and/or the stack to provide additional information that I can use (along with the map file, etc) to determine where my Hard Fault is happening.Can anyone point me in the right direction? All my searches have shown me code that references registers I can't seem to find in the docs.Thanks.
Hi,I am setting up SBSFU on our STM32H750. I want to test the RDP and WRP security protections.Steps taken so far:I have enabled WRP and RDP Level 1 by setting the option bytes through cubeprogrammer and enabling SFU_WRP_PROTECT_ENABLE & SFU_RDP_PROTECT_ENABLE in app_sfu.hI have enabled SFU_TEST_PROTECTION in app_sfu.h Note:There are several test cases in sfu_test.c that I am using. The tests in questions are attached below:TEST_ERASE_FLASH is failing. Output:I am not sure why this would be. Does anyone have any advice?
After updating from TouchGFX 4.24.x to 4.26.0, the code generated cannot be compiled w/o manual correction - there are commas missing: const touchgfx::AbstractShape::ShapePoint<float> downArrowDisplayPoints[4] = { { 0.0f, 0.0f }, { 80.0f, 0.0f }, { 40.0f, 10.0f }{ 40.0f, 10.0f } };downArrowDisplay.setShape(downArrowDisplayPoints);downArrowDisplay.setVisible(false);add(downArrowDisplay); upArrowDisplay.setPosition(80, 61, 80, 10);upArrowDisplay.setOrigin(0.0f, 0.0f);upArrowDisplay.setScale(1.0f, 1.0f);upArrowDisplay.setAngle(0.0f);upArrowDisplayPainter.setColor(touchgfx::Color::getColorFromRGB(217, 141, 0));upArrowDisplay.setPainter(upArrowDisplayPainter);const touchgfx::AbstractShape::ShapePoint<float> upArrowDisplayPoints[4] = { { 40.0f, 0.0f }{ 80.0f, 10.0f }, { 0.0f, 10.0f }, { 40.0f, 0.0f } };upArrowDisplay.setShape(upArrowDisplayPoints);upArrowDisplay.setVisible(false);add(upArrowDisplay); upArrowLed.setPosition(80, 191, 80, 10);upArrowLed.setOrigin(0.0f
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.