Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
BeforeAfterHello everyone.I am in a tough situation when the LCD shift during display without touching the board as some pictures above:I am using STM32F469ZIT6 and SDRAM IS42S16400J-6TLI. Here is the configuration: static void MX_FMC_Init(void) { /* USER CODE BEGIN FMC_Init 0 */ /* USER CODE END FMC_Init 0 */ FMC_SDRAM_TimingTypeDef SdramTiming = {0}; /* USER CODE BEGIN FMC_Init 1 */ /* USER CODE END FMC_Init 1 */ /** Perform the SDRAM1 memory initialization sequence */ hsdram1.Instance = FMC_SDRAM_DEVICE; /* hsdram1.Init */ hsdram1.Init.SDBank = FMC_SDRAM_BANK2; hsdram1.Init.ColumnBitsNumber = FMC_SDRAM_COLUMN_BITS_NUM_8; hsdram1.Init.RowBitsNumber = FMC_SDRAM_ROW_BITS_NUM_12; hsdram1.Init.MemoryDataWidth = FMC_SDRAM_MEM_BUS_WIDTH_16; hsdram1.Init.InternalBankNumber = FMC_SDRAM_INTERN_BANKS_NUM_4; hsdram1.Init.CASLatency = FMC_SDRAM_CAS_LATENCY_3; hsdram1.Init.WriteProtection = FMC_SDRAM_WRITE_PROTECTION_DISABLE; hsdram1.Init.SDClockPeriod = FMC_SDRAM_C
Hello everyone!I tried to explore TouchGFX for the first time to discover the advantages of it.So in TouchGFX 26.0, I started a project for the STM32N6570-DK.What I did: "Create new", then selected "STM32N6570 Discovery Kit".Before doing anything, this problem appears: "Cannot Run Target" and the "Program and Run Target" button appears disabled.I noticed the "STM32U5G9J DK2 has the "Program and Run Target" button enabled.Is the STM32N6570-DK not supported in TouchGFX?Or what did I do wrong?Thank you in advance for your help.
Hello everyone,I'm very new to BLE in general. Here is the story, i'm aplplying this example STM32WBA Bluetooth® LE – Serial communication - stm32mcuI want to create a button EXTI to send a BLE message and i should see the message on my phone via ST BLE Toolbox app. As my button is Pull-up configured, i have declared the EXTI as shown in main.c: void HAL_GPIO_EXTI_Falling_Callback(uint16_t GPIO_Pin) { if (GPIO_Pin == Button_2_Pin) { const char *message2 = "Button 2.\r\n"; static uint32_t last_btn2_interrupt_time = 0; uint32_t current_time = HAL_GetTick(); if (current_time - last_btn2_interrupt_time > 200) { // Button Debounce last_btn2_interrupt_time = current_time; tx_com((uint8_t *)message2, strlen(message2)); // USART debugging message SendBLEMessage(message2); // Actual BLE message } } }This is SendBLEMessage defined in coc_peripheral_app.c: void PeriphSendData( void ) { tBleStatus status = BLE_STATUS_INVALID_PARAMS; /*Data Packet to send to remote*/ status
Hello All,I'm working on my own project using an STM32H573x microcontroller. I use TouchGFX to design the display graphics, and the FMC module to interface with an ILI9341 display controller. Data is transferred to the FMC banks using DMA in linked-list mode.After some time, when the display is flooded with updates, it completely freezes. During debugging, I noticed that the DMA somehow stalls, and the interrupt for transfer completion never triggers again.I tried restarting the DMA module after it crashes, and it does work again, but the display performance becomes poor. This is understandable, since resetting the DMA takes time and causes some frames to be lost. I also noticed that after the first occurrence of the error, the reset DMA function gets called more and more often, which means the error is happening more frequently. This made me suspect an issue with the FMC configuration. However, I checked against the datasheet, and it seems correct for my case.Has anyone experienced a
Does the device enter Sleep Mode during OTA?Please explain separately for the download phase and the update phase.
Hi all,I ran into an issue regarding FreeRTOS tickless idle mode. I wanted to share my findings and solution in case others encounter the same problem and also to ask if that's intended structure (so I am missing something) or if its not generated properly.Background:I was using SysTick as the OS kernel timebase.Tickless idle was enabled (configUSE_TICKLESS_IDLE = 1).I noticed that the portNVIC_SYSTICK_COUNT_FLAG_BIT was cleared unexpectedly during sleep, which caused the tickless idle implementation (vPortSuppressTicksAndSleep) to miscalculate elapsed ticks.Debugging revealed that the auto-generated SysTick_Handler in cmsis_os2.c was clearing the COUNTFLAG, even in tickless mode.The autogenerated handler looked like this: void SysTick_Handler(void) { /* Clear overflow flag */ SysTick->CTRL; if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) { xPortSysTickHandler(); } }Reading the Cortex-M documentation shows that reading SYST_CSR clears the COUNTFLAG.This m
Hello, I modified the SubGHz example from ST, and it's sending the message and goes to sleep, but when it wakes up it get's stuck on error handler.I'm getting stuck on where's the problem but I think it's an issue when it needs to configure the clocks.That's my consumpion graph that shows the transmission and sleep Here it wakes up but no transmission and when I debug it it's stuck on error handler.
Hi Sir,I tried to refer to the PWM example:~\stm32cubeh7-v1-12-0\STM32Cube_FW_H7_V1.12.0\Projects\STM32H743I-EVAL\Examples\TIM\TIM_PWMOutput I see the four GPIO pins are initialized: And I see the four PWM channels are setup: But I can't find the code where each GPIO pin is bound to each PWM channel or the ISR where each GPIO is toggled whenever a PWM channel interrupt occurs. Please advise. Thanks. Jimmy
Hello,I have an issue and until now didn't find the solution :Using ADC2, one channel IN12, triggered by timer every 100µs, using circular DMA sized of 16 half-words, the array [0] value is always 0, the array's index used by DMA is from 1 to 16, not 0 to 15. See below screen shots : code : volatile uint16_t _v_Adc2Values [18]; // Define to 18 to see the shiftHAL_ADC_Start_DMA (&hadc2, (uint32_t *) _v_Adc2Values, 16);HAL_TIM_Base_Start_IT (&htim15);result :When I starts my software this morning to make the screen shots, the 1st start, I have not the issue, the values comes from 0 to 15 in array. Then I restarted my software several times, and all these tries the array result was shifted like the screen shot.Thank for your help.Best regards,Laurent
Exploring ADC discontinuous mode with interrupts. Any issues calling HAL_ADC_Start_IT() from ADC ISR? Looks like a lot of code to run from an ISR.
Hello,I would like to use STM32WL5MOC module with AT Slave interface. In STM32WL package:* Which FW is recommended for STM32WL5MOC module: Single core(LoRaWAN_AT_Slave) or dual core(LoRaWAN_AT_Slave_DualCore)?* I couldn't find any examples for master/host MCU. Is there any example demonstrating how to configure the device using AT commands for any STM32 MCU as host? Thanks.
After flashing firmware to STM32WB5MMG, commands return error codes regardless of which firmware type is flashed:With HCI Layer firmware (stm32wb5x_BLE_HCILayer_fw.bin):HCI commands return 0x01 (Unknown HCI Command)With Full BLE Stack Extended firmware (stm32wb5x_BLE_Stack_full_extended_fw.bin): aci_gap_set_non_discoverable(); // Returns 0x0C (Command Disallowed) aci_gap_ext_start_scan(...); // Returns 0x01 (Unknown HCI Command) aci_gap_start_observation_proc(...); // Returns 0x01 (Unknown HCI Command)ConfigurationDevice: STM32WB5MMGFUS: 1.2.0Both firmware files flashed to 0x080CA000 and verifiedApp Config: Adjusted appropriately for each firmware typeResult: Both report "Wireless Firmware version 1.20.0 build 2"What WorksNon-connectable advertising (ADV_NONCONN_IND) works fine with both firmware typesBasic BLE stack initialization succeedsWhy do both firmware types fail to activate despite successful flashing?Is FUS 1.2.0 incompatible with
Hello everyone,I am working with the B-L072Z-LRWAN1 board using the I-CUBE-LRWAN stack. My goal is to reduce power consumption by putting the MCU into Sleep or Stop mode, but so far I haven’t been able to get it working. Even when I try calling the low-power functions, the board doesn’t seem to enter low-power mode.From what I’ve read, the LoRaWAN stack from ST already integrates low-power management through UTIL_LPM and the sequencer, but it’s not clear to me:Do I need to explicitly call low-power functions, or is this handled automatically by the stack?Is there any configuration I should enable/modify in the project files (e.g. lora_app.c, stm32_lpm.c) to make low-power work?What is the recommended way to confirm that the MCU is really entering Stop/Sleep mode and not just staying active?Any advice or example from someone who has successfully used low-power with this board and stack would be very helpful.Thanks in advance!
Hello Team,With RDP set to Zero Level , Firmware upload succesfully using CubeProgrammer GUI ( USB DFU mode ).But If I set RDP LeveL 1 , Device not able to detect on PC device manager and not able to connect with STM32 using CubeProgrammer USB interface Option. It does not connect at all.Hence , Firmware update not possible with RDP 1 using USB DFU.After Setting RDP Level 1 to Zero using STlink V2 SWD interface , It works fine in USB DFU mode.Is it the correct behaviour ? Everytime do we need to set RDP Level 0 using STlink SWD and Then use USB DFU ?MCU is : STM32F303Rb
Hello,I would like to transfer 3 linked list blocks over UART DMA. When I started HAL_MDMA_START_IT, it transmits only 16 bytes. How can I send big files back to back? Configurations are as follows:MCU : STM32H7 seriesFirmware : Last release
What Linux development environment can I use to program my Discovery kit with STM32G431CB MCU?Since I don't want to use Linux, am I really forced to choose non-ST products?
Hello,[Question]How should I modify the sample project so that I can achieve the expected current consumption in standby mode (as described in the user manual)?[Board]NUCLEO-U385RG-Q[Development Environment]STM32CubeIDE 1.19.0STM32CubeMX 6.15.0[PWR_STANDBY]I am using the sample project “PWR_STANDBY” generated from STM32CubeMX 6.15.0. I would like to modify this project for my purpose.[Goal]I want to put the board into standby mode, measure the current through JP4, and reproduce the expected value described in the user manual (https://www.st.com/resource/en/datasheet/stm32u385rg.pdf, page 115).[Current Situation]When I run the sample project without any modification, I measure about 255 µA. This is much higher than the expected value in the user manual.Thank you for your advice and support.
Been trying to get an test application working on a STM32F469NIH Discovery board.Should be fairly simple - Write a file to the SD Card, with FatFS, the read back:Try as I might, I couldn't get things working.After a bit of debugging, I think the issue lies with the DMA callback functions. I'm using FW_F4 V1.27.1, on CubeIDE, and it seems that the supplied SD_DMATransmitCplt() function isn't quite complete, when compared to the SD_DMAReceiveCplt() function. There seems to be a couple of things missing - Firstly the call to the callback function - This is a must for the SD interface, because there's a queue that is waited on. Without the callback function being called, nothing is ever put on the queue, so a timeout error is received. The other important bit seems to be the line of code that unlocks the HAL. A sensible thing to do, as we've just finished transferring data. Again, without it, some other bits of code later on fail as the HAL is still locked. So I copied the code from the RX
TL;DR: Two-node bus: STM32 (FDCAN1) ↔ CANable (SocketCAN) at 500 kbit/s candump can0 shows frames from STM32, but STM32 keeps flagging ACK error and increments TxErrorCnt. Scope on CANH/CANL (diff trace CH1–CH2) shows a dominant ACK bit in the ACK slot (!) External loopback works. Looks like my MCU isn’t “seeing” the ACK at its RX input—looking for eyes on transceiver mode pins, RX pin mapping/AF, and timing. Hardware MCU: STSpin32G4 Transceiver: SN65HVD230DR Other node: CANable / candleLight on Linux as can0. Wiring: STM32 TXD/RXD ↔ CAN transceiver ↔ twisted pair to CANable. Termination: 120 Ω at each end (I can measure ~60 Ω between CANH–CANL with power off; will re-check if requested). Ground: Common GND between boards. If helpful, I have shared the schematic snippet for the transceiver pins .What works vs. what failsWorks External loopback mode: frames “succeed.” candump sees frames from STM32 in normal mode. Scope on CANH/CANL shows clean dominant bits. The
Hello everyone,I want to use a C05300 based display with DSI. I can write and read in LP mode, but not in HS mode. I guess it's a timing problem.As seen from datasheet, UI should be more than 2ns, so I use a 500MHz bit clock.I use 24 bit data format to send data over DSI, so Pixel Clk = 480 x 2 / 24 = 40 MHz. I there something I miss?
Hello ST Community - I am seeking to migrate a functioning HTTP Client application from a SAMD51 MCU to STM32 silicon, I have an STM32H573I-DK on hand, objectives: HTTP Client Ethernet (wired) connectivity using a static IP address Storing retrieved JSON objects on an SD card DIsplaying selected attributes on the 240x240 LCD Other than the demo program, I have not deeply explored the STM32H573I-DK. Any configuration, and coding tips / examples would be greatly appreciated. Thanks much, Kelly
Hi,I'm interfacing external ADC - 16 bit, 10MSPS (AD7626) with this microcontroller. STM32 SPI will work in slave mode, ADC will provide 80MHz clock. It will work in a burst mode - sampling 288 measurements x 16 bits at 5MHz.I can't decide whether I need BGA for this or LQFP will be sufficient. I remember having issues with internal ADC under performing when used in LQFP package. I don't want to go with BGA unless I have to.Cheers
The datasheet for STM32H573 (WLCSP80 package, rev 5 p. 251) says that the leftmost ball (in the bottom view on the datasheet) is F=0.384mm from the package edge. Horizontal ball pitch is 0.35mm*(1/2)*√3. Therefore centering the ball array horizontally would give F = 3.50/2 - 0.35*(9/4)*√3 = 0.386mm.This 2 micron difference has led to some discussion about whether the ball array should be horizontally centered within the package edges on PCB footprints. (Additional discussion arose from my initial misunderstanding of the datasheet. The datasheet could possibly be improved by measuring the margin to the top row rather than the second row. But now that I realize this, the question about horizontal centering still remains).Does ST have any insight about this 2 micron offset that might give a PCB designer confidence that it was truly intended? Can ST (or the ST community) give a recommendation about whether (or not) to update the KiCad libraries to include this 2 micron offset?
Hi,I’m working with the NUCLEO-H723ZG board and would like to know if it’s possible to use its two DAC outputs to generate a differential signal.Thank you very much
Hello everyone,I am working on the STM32U5G9ZJT6Q MCU and am trying to use the JPEG Encoder by feeding him data through a GPDMA linkedlist mode from RAM. The data to encode is an image of 640*480 8-bit grayscale image (the image is stored in a .c file ; for jpeg, i use tables 0, no chrominance in sight).I am not using the HAL methods for jpeg/dma, eventhough the JPEG_DMA_StartProcess inside HAL_JPEG_Encode_DMA in stm32u5xx_hal_jpeg.h function seems to support dma linkedlist transfers.I ran the JPEG_EncodingFromFLASH_DMA example for stm32u5g9 discovery kit, without issue, but having to work with normal dma transfers and having to handle the input/output in interrupts seems a bit off to me. I would like to use the linkedlist for simpler automation.I configured the jpeg_rx (input) and jpeg_tx (output) dma transfers as linkedlists. The jpeg output works fine, the nodes are correctly updated and stream data as wanted.However, the jpeg input dma stalls after the first node, eventhough the ne
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.