Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hi Team,Can you please share the any reference code for Bootloader over a Serial communication UART protocol please ?
Seems like transparent background is ignored in final blending, any suggestions will be wellcome.If key-coloring is changed on L2, background color will be shown, so I expect the key-coloring is actually working.L1 has a background picture, and is not updated.Changing L2 alpha from 0xFF to 0x80, normal blending showns both L1 and L2 in correct format, so data seems to be correct picked up.L2 is updated pr. frame, double buffered, and is shown flawlessly but L1 is not visible, when L2-alpha is 255. All Frame-buffers are in internal RAM and each in it's own RAM-bank alligned to 32 byte boundery.
Hi all,I'm working on an STM32F411 project using STM32CubeIDE (bare-metal, no HAL). I'm setting up a 1ms tick using SysTick_Config() and defining my own SysTick_Handler() to keep a millisecond counter. Here's the issue:When I increment a static volatile global counter inside the handler using '++', the system crashes and ends up in Default_Handler. But strangely, if I assign a constant (e.g. millis = 123;), it works perfectly fine. Moreover, if I increment a local temp variable and increment millis, it'll take it just fine. Here's my code snippet. I'm not using the HAL library for this. Would you know why this would be? I'm using an STM32F411CE6 black pill.Thanks! static volatile uint32_t millis = 0; void SysTick_Handler(void) { // This works: // millis = 123; // This works as well: uint32_t tmp = millis; tmp++; millis = tmp; // This causes a crash into a forever loop in default handler: millis++; (void)(SysTick->CTRL); // Clear COUNTFLAG } // SysTick is initialized like
I am currently working on a project where I'm designing a keypad to send HID commands over USB. Now, I want the keys to register as if a keyboard was connected and a a rotary encoder to control mouse scroll wheel operations. To confirm, is this possible with a composite class such that it enumerates as a keyboard+mouse? Also, if anyone has experience with HID, is it possible to send power commands from the STM to the computer if a key is pressed?
I was reading this conversation and found the comment about an example showing support of Audio Class with USBX and ThreadXhttps://community.st.com/t5/stm32-mcus-embedded-software/has-anyone-managed-to-get-a-usbx-audio-device-working-on-stm32/m-p/112225/highlight/true#M5290For some reason, the example is disappearedIs there a reason on why it has been deleted? Is there a way to get it?
Hello friends I don't know what to do and I'm going to ask for help, in my project I use SPI and Full-Duplex mode with the following configuration which works perfectly in this mode. My problem is that I need to use Half-Duplex mode because on hardware I have output data from AD7686 connected to the MOSI pin which I need to read using DMA which is triggered by a timer. Here is the configuration which works for me but only in Fuul-Duplex mode. Timer 2 is used to trigger DMA and the CH1 output generates the CNV signal for the AD7686 SET_BIT(SPI2->CR2,SPI_CR2_RXDMAEN);HAL_DMA_Start_IT(&hdma_spi2_rx,(uint32_t)&(SPI2->DR),(uint32_t)U_RX_buf,U_RX_BUF_SIZE);__HAL_SPI_ENABLE(&hspi2);HAL_DMA_Start(&hdma_tim2_ch1,(uint32_t)&tx_buffer,(uint32_t)&(SPI2->DR),1);HAL_TIM_PWM_Start(&htim2,TIM_CHANNEL_1);__HAL_TIM_ENABLE_DMA(&htim2,TIM_DMA_CC1);
Hi!I'm working on a project with an STM32 microcontroller and need to set up a way to update the firmware remotely. The device will be installed in remote locations so I won’t have physical access once it's deployed.What’s the best way to approach this on STM32?Any tips or examples would be really helpful.Thanks!
Hi, I'm using the ADC1 of the STM32H563 and I'd like to configure an offset (64) for all 12 of my analog channels. I'm using GPDMA1 to obtain an array of 1200 values at 100 kHz. When I configure the offset (before starting the conversion), I don't see the offset subtraction : Here is my configuration: Can you help me please? Ghislain
Hello, I’m currently working with the Nucleo-767ZI board and attempting to connect it to an HTTPS client to send raw sensor data to my Google Trust-based database. However, I’ve been facing issues during the TLS handshake, and neither read nor write operations are functioning correctly. The setup involves using DHCP along with LWIP, mbedTLS, RTC, and SNTP. Despite checking various possible causes—including checksum errors and other protocol-related configurations—the problem persists. I’ve already generated and included the required CA certificates (including both intermediate and root certificates), but the issue remains unresolved. Could you please guide me on any possible solutions or processes that might help me achieve the desired outcome? Best regards,Thumula Bhargav
Hi guys, I'm trying to implement a sd card interface for the STM32U5 series using SDMMC1 interface. Since there is no native FATFS support over CubeMX, I guess, I started to use the generic fat file module from elm-chan.Basic configuration:1. SDMMC1 in SD 4 bits wide bus mode, clock divider 4, power safe for clock enabled, no hardware control, no external transceiver, SDMMC1 global interrupt enabled, gpios pullup all enabled despite of clk2. Modified diskio.c see code exampleThe interface works and I can also kind of work with fatFS, f_mount, f_open works basiclly, but sometimes I got a FR_DISK_ERR. On my scope I can see that the SD clock is always on when the error occures. So I think there is an issue with the low level driver level or better say somethimg is going on with the diskio layer. Please see the attached pictures of working f_mount and f_open and the f_open where the clock doesn't stop.I'm using FreeRTOS and I have a dedicated SD_Card Task.My modified diskio.c:/*------
Hello,I try to decode MP3 files from SD card using I2S and DMA. It works fine with a sampling rate of 48 kHz, but it fails when using 44.1 kHz.Specifically, the MP3Decode() function fails to decode the audio at 44.1 kHz.I have checked the clock configuration and the I2S peripheral settings, but I can’t figure out what causes the failure.(I use STM32F407vgt6)Could you please help me understand what might be wrong or how to properly handle 44.1 kHz decoding in this setup?If someone is interested i can send you the code.Thank you in advance for your support!
Hello,I use EP1 (IN/OUT) for bulk transfer(64 byte) and EP2 (IN) for interrupt transfer(64 byte).I need to use the Vendor-Specific Class for this configuration. Using STM32CubeIDE 1.18.0 to create a usb device, which class shall I use to create this USB configuration. I tried using the Communication Device Class, because it includes EP1(IN/OUT) for bulk transfer andan interrupt transfer endpoint.(primarily for sending notifications back to host)Instead of using interrupt transfer endpoint for sending notifications,I tried modifying this endpoint to send data back to the host when it polls for it.However, the USB device does not seem to respond to the host polling.Is this the correct way to do it?I have also attached my source codethank you very much!!
How can you calculate a CRC-8-ATM using the CRC unit of a STM32F7?I want to check the CRC of the output of an ADC ADS127L11 which is transmitted via SPI. The user manual says the CRC calculation is based on CRC-8-ATM. The output is an 8-bit CRC, and the polynomial is X^8+X^2+X^1+X^0. I cannot configure this in the CRC unit of my STM32F7.Does anybody know if and how you can use the embedded CRC unit for CRC-8-ATM calculation?
When looking through the STM32L072 SVD files (from https://www.st.com/resource/en/svd/stm32l0-svd.zip) I noticed that the RCC CIER register is read-only, whereas in the reference manual it's read-write, which makes logical sense. Is there an updated SVD archive for the L0 family?
A similar problem to this post but not quite the same:I've got my own low-level LPUART transmission code, it works like this:1) Initialize LPUART in FIFO mode with thresholds at 1/2 full2) When a buffer needs to be sent, write bytes to TDR until all bytes sent or transmit FIFO is full3) If transmit FIFO is full, enable USART_CR3_TXFTIE and let the ISR handle the rest.4) When the ISR has written all the bytes to the FIFO, it disables USART_CR3_TXFTIEWhat I see is this:1) Send first packet. It's 10 bytes long, the first byte gets moved immediately to the TX shift register and 8 bytes fill up the FIFO so there's 1 byte left. The interrupt is enabled, the ISR fires, the last byte is written to the FIFO, the interrupt is disabled.2) Send second packet. It's 7 bytes long so fits completely in the FIFO and the interrupt is left disabled3) Send third packet. It's 71 bytes long, the first byte gets moved immediately to the TX shift register and 8 bytes fil
Hello ST Community, I'm currently working with a NUCLEO-H755ZI-Q board and trying to set up a stable Ethernet communication using LWIP without RTOS. Unfortunately, I'm encountering an issue with a long initialization time and subsequent instability that I can't quite figure out. My Hardware & Software: Board: NUCLEO-H755ZI-Q Cube Firmware : V1.18.0 (also tested with V1.17.0) Configuration Steps in CubeMX/IDE (only for the M7, no changes for M4 made): Created a new project for the NUCLEO-H755ZI-Q. RCC: Set HSE (High Speed External Clock) to "Crystal/Ceramic Resonator". Clock Configuration: Configured System Clock (SYSCLK) to 400 MHz. Adjusted all dependent clocks accordingly, ensuring CubeMX/IDE reported no clock configuration issues. ETH: Enabled Mode set to "RMII". LWIP: Enabled LWIP. Disabled DHCP A static IP address was configured: 192.168.001.123 with subnet mask 255.255.255.0 Selected "LAN8742" under "Platform Settings". Generated co
Hello.I have developed an application with touchgfx, lwip, freertos.I had some problems with lwip (see processor goes to HardFault at __ISB - STMicroelectronics Community, HardFault_Handler when enable LWIP and touchgfx - STMicroelectronics Community).I understand some causes of HardFault and this morning code seems to work properly. I tried to run the code without debugger but my processor stuck in some point that I can't see because I have no debugger connected. I reconnect debugger, reflash and rerun. After this operations I obtain the problem described in processor goes to HardFault at __ISB - STMicroelectronics Community Why processor run with debugger but it stucks without it ? Thankyou in advance.
Hi,I´m trying to get a USB HID Host running on a STM32G0 with STM32CubeMX and STM32CubeIDE.Unfortunately all examples or topics in ST communities don´t really work. Also the USB wiki doesn´t provide a clear explanation of all commands available in the libraries. Maybe it´s also a problem, that the examples for the G0 don´t use FreeRTOS...Can anyone help which commands (in which order) I´ve to use to read data (in my case from a CP2110 USB to UART bridge)? My current code:usbState = USBH_InterruptReceiveData (&hUsbHostFS, buf, 5, 0);usbState = USBH_Get_DevDesc (&hUsbHostFS, 10);USBH_SetAddress (&hUsbHostFS, 0x28);usbState = USBH_OpenPipe (&hUsbHostFS, 0, 0x28, 1, 0, 0, 8);USBH_HID_SetReport(&hUsbHostFS, USB_H2D, 0x50, &buf, 10); // Used to configure the CP2110USBH_HID_GetReport(&hUsbHostFS, USB_H2D, 0x01, &buf, 3); // Attempt to read data Best regards,Achim
Hi currently i am using STM32H735G-DK ((DK32H75G$AT4) schematic pack MB1520-H735I-C02) for implementing Azure IOT using ThreadX 1. I followed example of NX_MQTT_Client it is working fine 2. But i need to connect to Azure IOT via Azure c sdk i have added those and removed mqtt, freshly gen required things via cubemx using X-CUBE-AZRTOS-H7 and dhcp as client and ethernet (RMII) in interrupt 3. During assign ip via DHCP ip is not assigning and the ip_address_change_notify_callback() was not triggered i have followed same as NX_MQTT_Client but still it is not assigning 4. I have attached file for app_netxduo.c NOTE: i have referred an example x-cube-azrtos-h5 for AZURE IOT but how to port this one to STM32H735G-DK (DK32H75G$AT4) schematic pack MB1520-H735I-C02 basically the folders and files of AZURE IOT how can we port ? Logs ========================================================================== (C) COPYRIGHT 2023 STMicroelectronics =
我使用 STM32CubeMX 配置 FreeRTOS。当我调用 oskernelstart 时,发现它卡在这个界面里。回溯后,发现下图所示的函数中进入了一个异常。我在 FreeRTOS 中设置了安全模式,但现在我不知道是什么原因造成的 Translation: I used STM32CubeMX to configure FreeRTOS. When I called oskernelstart(), I found that it was stuck in this interface. After backtracing, I found that an exception was entered in the function shown in the figure below. I set the safe mode in FreeRTOS, but now I don't know what caused it
Hi everyone,in my project i have a define that is used to change the "version" of the project.the define is always used on one byte, for example #define VER 0x36, if I change it to 0x37 I see only 20 differences in the .bin (only where is used), but when I write 0x40 I find more than 800 differences. in those 800 differences I also find changes in the startup.Has this ever happened to anyone? Do you have any suggestions?Thanks in advance!
Hi, I'm using STM32H755 nucleo board. I'm running FREERTOS on core M7 and bare metal on M4. I have been sending debug messages through USART3. It has been working ok, but sometimes messages from different tasks are overlapping. I want to change code such a way that debug messages are non-blocking. My plan has been using DMA and ring buffer. Finally, I would like to send debug messages from M4 core also using shared memory. Is this good approach or is there better way to send debug messages? Is there some example codes with this functionality? It seems that I'm not able to receive any debug messages after my kernel starts.
TLDR; STM32Ethernet has udp problems where it freezes for 20 seconds after sending data for 20 seconds and 60 seconds. After this it runs smoothly. However i'd like for it to not freeze twice as it is important the data gets sent asap.Hi, i am using a STM32-F407VET6 together with STM32Ethernet. I am using the provided EthernetUDP class to setup a udp connection. In my program i am sucesfully sending udp packets however. after sending for 20 seconds The Ethernet Link goes down and no messages are being sent out anymore. I have checked if buffers overflowed or something of the sort but to no avail. I have noticed that right at the time the data transfer stops, that an ARP gratuitous message should arrive exactly at that time as if it keeps running and suddenly works those ARP messages are sent just before the data actually started flowing again. I have checked everywhere, from what i could figure out, and saw that the ETH_DMATXDESC_OWN bit is high in low_level_output of ethernetif.cpp.I
I am using STM32H573 and trying to enable ethernet. I have used the below article for it:https://community.st.com/t5/stm32-mcus/how-to-use-the-lwip-ethernet-middleware-on-the-stm32h5-series/ta-p/691100But ethernet is not being initialized. The HAL_ETH_Init is returning error which is resulting in error handler.This is the condition being checked in MX_ETH_Init function. As even after using the steps mentioned in the article mentioned above the ethernet is not working. - Do we have to add RX and TX descriptors specific addresses in the linker file?
Hi,I'm working on firmware upgrade functionality for an STM32G491 series MCU. In our system, the MCU communicates with a processor over I2C, where the processor acts as the master and the MCU as the slave. Currently, we're using I2C1 on the MCU for this communication.However, as per AN2606, I2C1 is not supported in boot mode for firmware flashing, which limits our ability to use standard ISP. Therefore, we're exploring the option of using In-Application Programming (IAP) over I2C1.Is it possible to perform IAP using I2C1 in this configuration? If so, could you point me to any sample code or reference implementations?
ST Community highlights – April to June 2026
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.