Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hello,I am experiencing an interesting problem on the STM32F303VET:UART1 is used to receive and transmit messages (460800 Baud), DMA1 Channel 4 is used for memory to UART TX buffer transfer, DMA1 Channel 5 for UART RX buffer to memory transfer.Under situations of high load (both reception and transmission) UART1 will stop outputting messages after two bytes. The majority of transmissions work out fine, however the error happens in every test case, though the time to failure differes between approximately 5s and 120s. The problem seems to be caused by an unintended reset of the DMA enable transmitter (DMAT) Bit in UART 1 control register 3 (USART_CR3).Above image shows the error:Trace 1 (orange) shows the TX line of UART1, where only two bytes are transmitted.Trace 2 (red) shows data on RX line. One can see that no RX takes place at the same time as TX.Trace 3 shows a debug pin, it is triggered once when DMA transfer is started.Trace 4 shows another debug pin. It is set HIGH when DMA tr
Heyho,after some *** CAN beginner mistakes on my side, I got the FDCAN BRS 8 Mbit working.Or so I thought. It's only working between my custom boards, as I found out after connecting a Kvaser Leaf v3.With the Kvaser (directly connected to the board's D-sub, termination on, signals on the scope look good (enough)) and BRS on, it only works with max 2 Mbit, and only if the Kvaser's bit timing is set below 70% sampling point.So far I played with changes to TDC, sampling point, SJW, and all bit timings (checked the Kvaser timing website).Any ideas welcome!
Post edited by ST moderator to be inline with the community rules for the code sharing. In next time please use </> button to paste your code. Please read this post: How to insert source code. Hello everyone, I have designed a custom PCB using the STM32L031K6 microcontroller. The board includes an external 32.768 kHz crystal oscillator (LSE - Low Speed External). The Problem: I am flashing code to the board using an ST-Link. When running a simple LED blinking application (which uses HAL_Delay), the LED either blinks only once or gets stuck indefinitely within the HAL_Delay function. This strongly suggests an issue with the microcontroller's clock configuration or the LSE activation. Hardware and Code Details: MCU: STM32L031K6 External Oscillator: 32.768 kHz (LSE) Development Environment: STM32CubeIDE Library Used: STM32Cube HAL Problematic Function: HAL_Delay() (This function relies on a properly running clock source, usually SysTick). I will attach the following: S
Hello community,I am running in an issue with the VREFINT calibration value of the ADC.For calculation I use the __LL_ADC_CALC_VREFANALOG_VOLTAGE function from the stm32u0xx_ll_adc.h file and I'm getting wrong values.The Chip is powered with 3.3V and so I expect a reading of approx. 3300 from this function, but what I'm getting is a value of around 2993.The measured voltage at the VDDA/VREF+ pin (48-pin package) is 3.296V, the reading of the VREFINT Channel is approx. 1660.If I change the supply voltage to 3V, I get around 1820 from the VREFINT Channel.The readout of the VREFINT address (0x1FFF6EA4) is 1654 (0x0676) so point 2.1.2 of the errata sheet is not applicable.If I change the value VREFINT_CAL_VREF in stm32u0xx_ll_adc.h from 3000UL to 3300UL the return values are plausible.For me it looks like the calibration was done using 3.3V instead of 3.0V as stated in the datasheet.The marking of the controller reads likeSTM32U073CCT6CQ27C 9R ACHN 435 1M (or LM)Can anyone confirm or is th
I try to understand in details the way the Hash peripheral works on the STM32L552. I need to make the HASH SHA-256 with 224 blocks of 512 bits. The Hash works perfectly until the block 223. Then I enter 16 values in the FIFO (in my code below I have a loop for 15 because I entered previously another value). Then I launch the final digest. I expect the automatic digest of block 224 and the automatic padding in a block 225 to the final hash value. But I always have the wrong value in the final step. Any idea about what I'm missing?
I would like to read some data from the EEPROM on initialization to use in the TouchGFX application.I currently have an API that can request read/write operations from TouchGFX to the backend.At the moment, I've implemented it in the Model.hpp void bind(ModelListener* listener) { modelListener = listener; if (!storageInitialized) { initializeFromStorage(); storageInitialized = true; } }withvoid Model::initializeFromStorage() { #ifndef SIMULATOR StorageResponse_t wr = Storage_Request(STORAGE_CMD_READ, EEPROM_ADDR_STRUCT_2, &struct2, sizeof(struct2)); wr = Storage_Request(STORAGE_CMD_READ, EEPROM_ADDR_STRUCT_1, &struct1, sizeof(struct1)); #endif }but I'm not sure if it's the correct location.I just want to send the read EEPROM command on the first load of TouchGFX and never again
In the above image (logic analyzer) , SPI in DMA was supposed to start at the end of high on the second signal, but it starts a bit later. (3rd signal CS of SPI, 4th signal SCLK)And the SPI was to supposed to be active at every period (the first signal) whose period is 8.607us. The second signal is a slave timer to the first and a period elapsed callback of this signal call HAL_SPI_Receive_DMA.There is also a 1 second timerWhat should i do to correct this? I don't how to proceed, any solutions, learning materal would be really helpful
Hi I am trying to migrate my code from SPL(old version) to HAL based code I have conveted the same setup code to cubemx to generate the init function and I am using a clrc663 IC(card reader) along with it when the Ic Generates an interupt the mcu doesnt process the interuppt but when using test case using software to check the interupt handler it works but when the pin goes from high to low but there is no interupt happening. can anyone explain why it is not working.mcu->spi & interupt ->clrc663DBG: TCONTROL read=0x00state 1 = HIGHDBG: Write IRQ1EN st=0x0000 write=0xC2 read=0xC2DBG: IRQ1 clearedstate 2 = HIGHDBG: TCONTROL written start=0x33state 1 = LOWDBG: Before WaitIrqDBG: MCU IRQ pin after RC663 GLOBALIRQ = LOWthese are the debug outpur ihave used a print statement inside the interupt handle but it is not printed
Could it be time for ST to reveal such an MCU at the summit in a few weeks? Or maybe a Cortex-M55 that actually have integrated flash or MRAM or similar? (STM32N6 is interesting, but I would like to see flash/MRAM/something else integrated...
When using PLL3Q as input with a frequency of 32MHz for USBPHY I have a RCC_CCIPR1 register initialized at value 0x2a00 when entreing USB_CoreReset function that is not correct (should be 0x2b00).
I would like to use the STM32WL33 as a radio receiver and continuously transfer all I/Q samples to my computer for further processing.Also, I want to use the highest possible IQ sampling rate (CHF_E = 0, 500k IQ samples per second = 64 Mbit/s).I've managed to configure it to IQ receiver mode, have it write samples to the databuffers in RAM and output the buffers via USART once both are full.However, I want to record more samples than would fit in the RAM and thus I have to somehow output the buffers faster than they are filled (or equally fast)This is where I've encountered a bottleneck. None of the STM32WL33's interfaces (SPI/USART/I2C/...) can transfer data fast enough, the highest I found is SPI with 32 Mbit/s. So how can I output 64 Mbit/s worth of samples?My idea would be bitbang a parallel interface on the GPIO ports and use another MCU (with a higher clock rate) to convert it to USB or some other serial interface. However, I'd like to know if theres a better way to ac
Hello. I'm working with STM32H573. I have a question related with the use of STSAFE-A110 for TLS. I have to authenticate also the client. I've succeded stablishing TLS mutual authentication with HTTPS server and TCP server (different applications, not related) using this type of functions from NetxDuo with the correct data and test certificates: /* TCP Server */ nx_secure_tls_session_create(); nx_secure_tls_ecc_initialize(); memset(&certificate, 0, sizeof(certificate)); // Server Local certificate nx_secure_x509_certificate_initialize(); memset(&certificate_, 0, sizeof(certificate_)); // Client certificate nx_secure_x509_certificate_initialize(); nx_secure_tls_local_certificate_add(); nx_secure_tls_trusted_certificate_add(); nx_secure_tls_session_start(); /* HTTPS */ memset(&certificate, 0, sizeof(certificate)); // Server Local certificate nx_secure_x509_certificate_initialize(); memset(&certificate_, 0, sizeof(certificate_)); // Client certificate nx_secure_x
I have the STM32F401RE NUCLEO-64 Board and have gone over and over all the instructions but I must be missing something because my board doesn't seem to be read by my laptop. I have everything the way it says on the manual and elsewhere. I have the jumper JD1 off, The other 2 JD's are on and i don't get any reading on my laptop. It doesn't show up anywhere. Not on the ide or the mx programs. Nowhere. If anyone can please help and tell me what I'm doing wrong i really appreciate it. I am connected using a usb to micro i Believe it is or the micro b. Teh one red led stay on the upper right one flashes red and the green led flashers and goes faster or slower depending on when i press the blue button. Thank u
Hello,I am working with the STM32WL55CC (48-pin package). When I imported the official STM32CubeWL example projects from ST, I noticed that they provide both SINGLE CORE and DUAL CORE versions. But the board that these examples are listed under STM32WL55JCIX, which itself is a DUAL CORE device.However, when I create a new project in STM32CubeIDE for the same device (STM32WL55JCIX), CubeIDE always generates a Dual-Core project structure (with CM4 and CM0+ folders). There is no option to generate a Single-Core project, even though the example projects clearly include one.Also, the file structure of the official examples is very different from the structure generated by CubeIDE. Following the tutorials, example projects contain folders like Application/, Utilities/, and files like se-identity.h, But I am not able to find "se-identity.h"Since I am developing for the STM32WL55CC (48-pin) variant, I am having trouble understanding how to properly port the example code (which i
Im using STM32F411E-Discovery (MB1115D) for my project and i need to power it from an external supply instead of USB. I have a external 5V supply but not sure how plug it in, should i inject 5V directly into 5V pin and ground to GND on 25x2 header?
Hello, Using Modbus master and slave communication, where Modbus master working fine, I have issue with slave device communication. Using HAL_UARTEx_ReceiveToIdle_IT() for receiving modbus frame, and HAL_UART_Transmit_IT() to transmit response. Currently doing only read for testing purpose. Issue: LPUART does not wakeup on receive interrupt. Here is the information below During Init() #define LPUART1_EXTI_ENABLE_IT() (EXTI->IMR1 |= EXTI_IMR1_IM28) LPUART1_EXTI_ENABLE_IT(); __HAL_RCC_WAKEUPSTOP_CLK_CONFIG(RCC_STOP_WAKEUPCLOCK_HSI); __HAL_RCC_HSI_ENABLE(); And here I will go to sleep mode if no rx/tx going on. So I will maintain the state busy until rx to tx process is complete. Once it complete, it will go to sleep mode. Here below is sleep mode logic //Preparation for next receive data RS485_RX_ENABLE();//Its macro to receive RX data on line. __HAL_UART_FLUSH_DRREGISTER(&hlpuart1); HAL_UART_AbortReceive(&hlpuart1) HAL_UARTEx_ReceiveToIdle_IT(&a
I am using the STM32 NUCLEO-G474RE control board and the NUCLEO-IHM08M1 inverter board for a motor-control application. I want to run a 6-step (trapezoidal) commutation algorithm, so I need to generate PWM signals from the control board to the driver IC on the power board(NUCLEO-IHM08M1).The driver IC (L6398) truth table specifies:HIN = 0 and LIN = 0 → Low-side ONHIN = 1 and LIN = 1 → High-side ONBut the STM32 timer provides complementary PWM outputs, where each channel only gives PWM + its inverted output, so it does not match the L6398 input logic. With complementary channels, the outputs are only HIGH or LOW for PWM—they cannot give “both HIGH” or “both LOW” on the same phase simultaneously as required by the driver.Therefore, I need guidance on how to generate the correct 6-step commutation sequence for the IHM08M1 board using the NUCLEO-G474RE, given that the L6398 requires both HIN and LIN to be controlled independently.
When sliding the screen in TouchGFX, some widgets may experience rendering issues causing flickering. What could be the root cause, and are there any solutions?The images are all in the external QSPI Flash. Could this be the reason?
I'm working with an STM32F411 and trying to run two I2S master-receiver interfaces (I2S1 and I2S2) at the same time, each receiving data from a pair of PDM microphones using DMA circular transfers.However, I found a very strange and extremely hard-to-debug issue:Observed abnormal behaviorWhen only one DMA is enabled, both I2S1 and I2S2 work correctly.When both I2S + DMA are enabled at the same time, the following happens:If I2S1 has no microphone connected, it correctly receives all zeros.If I2S2 does have a microphone connected, then I2S1 suddenly starts receiving non-zero data, even though no microphone is connected to I2S1.It looks like I2S1 is receiving data that actually belongs to I2S2’s DMA buffer.Sometimes the behavior changes depending on the order of calling HAL_I2S_Receive_DMA().Both DMA buffers are allocated as global arrays (4 × 512-word buffers).I also tried disabling JTAG on PA15 (I2S1_WS), but the issue still exists.DMA configI2S1 RX → DMA2 Stream2I2S2 RX → DMA1 Stream3
Hello everyone, I’m new to STM32 and I’m currently stuck with using timers.I’m working with an STM32F303RE, and the goal of my project is to generate 6 signals at 100 kHz (high time between 100 and 500 ns), each phase-shifted by 60°. These signals will be used to phase-shift power commands, in order to limit current spikes by staggering their switching times. For now, I’m focusing on generating just a single 100 kHz signal with a longer high time so I can easily observe it on an oscilloscope (precise timings are not important at this stage). To generate the signal, I thought about using the combined PWM mode of Timer 1. If I understand correctly, this mode allows the output to go high when the timer reaches CCR1, then go low when it reaches CCR2, and remain low until the ARR is reached or the timer restarts. This method has the advantage of potentially generating 2 (or 3?) signals using TIM1 and CCR1–6, and makes it easy to handle phase shifts. I have already tested
STM32 MCUs hide surprisingly useful hardware features that can save you CPU cycles, lower power, make multi-core life easier, and fix intermittent bugs — if you know they exist. This article reveals 5 “hidden” STM32 features (with concrete examples and code) that even experienced MCU engineers often forget, and exactly how to use them safely in production. Feature 1 — Fast-mode Plus I²C (FM+, up to 1 MHz) Fast-mode Plus (FM+) is an I²C mode that supports communication speeds up to 1 MHz, which is faster than Standard mode (100 kHz) and 2× faster than normal Fast-mode (400 kHz). Why does FM+ exist? Standard 400 kHz I²C couldn’t keep up with: High-speed sensors High-refresh displays Real-time control loops Large configuration registers in ICs Interrupt-driven or polling-heavy systems FM+ allows faster transfers without switching to SPI. Why is FM+ “special” in STM32? Most STM32 MCUs have: Dedicated FM+ pins (because they need stronger current capability) Hardware fil
Hi, I need a little explanation about what is wrong behind my reasoning..I am using STM32F411. reading, two inputs of ADC in scan mode over circular DMA triggered via TIM2 update event.TIM2 is triggering ADC at 100KHz, so I have 50Khz sample rate per adc input. At input of both ADC channels I connected signal generator feeding 1Vrms sine @20KHz.Everything works ok, I am using printf of both channels over (USB-CDC) as and I can see two sinusoide signals on serial plotter. I am using this serial plotter:https://web-serial-plotter.atomic14.com/ Now the problem and confusion starts here:If I change only TIM2 frequency to 10KHz, I am getting 10X lower sample rate also (now 5KHz pre channel, all checked with Logic Analyzer), but I still can see clear 20KHz sine at serial plotter, without degradation and this contradicts Nyquist theorem...How is this possible and what I am missing?
Hello,I recently updated my CubeMX version from v6.14.1 to the latest, and am no longer able to open the .ioc file. Selecting "continue", results in attempting to unzip DB.6.0.141.tar.bz2 where it hangs until failing.Selecting "migrate" results in the following error, "Range [14, 2) out of bounds for length 2".My team is seeing this issue on Windows and Linux.
I've just received a brand new DK from Mouser and I've been trying to get the stock AI demo up and running. The camrea is connected, power is provided via a short USB-C cable on the 2nd USB connector (not the ST-Link one) and the jumpers changed over.When I launch the AI demo via the touchscreen, the camera feed appears but there appears to be noise on the display. The camera stream appears for a few seconds before the screen greys out.Video attached.
HiI have seen mention of STM32Cube_FW_N6_V1.3.0 being released soon, and including important fixes to demos. Is there an expected released date?
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.