Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi,I am trying to interface the SparkFun Neo M9N GPS module with an STM32F446 MCU using UART4, but I am unable to receive any GPS data. Interestingly, when I switch to USART1, the module works perfectly.Could you please help me understand why UART4 is not functioning while USART1 works fine? Additionally, I could not find any reference code for interfacing the module using I2C. If any source or example is available, it would be greatly appreciated.Thank you!
Dear Support Team,I hope this message finds you well.I am currently working on a project where I am trying to interface your BNO085 IMU module with an STM32L433RC-P Nucleo board. Despite numerous attempts, I have not been able to retrieve any meaningful data from the sensor.Here are some of the key points of what I’ve tried so far:I’m using I²C (also tested with UART) for communication.Verified all hardware connections and logic level compatibility (3.3V).Tried using both polling and interrupt-based approaches with STM32 HAL.I have already tested the sensor separately with Arduino, and it works fine.I also attempted different initialization sequences and delays, but the sensor remains unresponsive on STM32.I would appreciate it if you could help guide me with any known compatibility issues or suggestions specific to using the BNO085 with STM32 microcontrollers. If you have any example code, documentation, or tips for STM32 integration, it would be immensely helpful.Looking forward to y
Dear CommunityI have a problem with the UART1 on the STM32U585x board. I try to read some bytes in polling mode using HAL_UART_Receive();And i set the size parameter to any number greater than 1 and i only receive 1 byte, even though i am sending more data from the other side.This is really bizarre, i have used this function countless times in other projects with other controllers, and this is the first time this happens.When i use the HAL_UART_Receive_IT(); It reads the whole message that can be 4,8 or 10 bytes.I have an idea of what i am doing and i used the UART peripheral of the STM boards a lot and everything i tried didn't solved this.Can someone please help me to figure out how to solve this? or is this some kind of a problem with the specific boards?Thanks, #define RX_BUFFER_SIZE 100 char rx_buffer[RX_BUFFER_SIZE] = "Hello_World\"r\n"; HAL_UART_Transmit(&huart1, (uint8_t*)rx_buffer, strlen(rx_buffer), HAL_MAX_DELAY); rx_buffer[RX_BUFFER_SIZE] = 0; char ch; uint16_t i
Hi ST community, Recently i am working on a project, home automation, and i would like to use STM32F429VIT6 MCU and 3.5 inch 320RGB x 480 LCD display on the project. The LCD display controller is ST7365P from Sitronix, with Frame Memory Size: 320 x 480 x 18-bit = 2,764,800 bits. My question is, is it possible to interface STM32F429VIT6 MCU with the TFT-LCD display through LTDC without using an external RAM just by using the On-chip Frame Memory? Attached are the TFT-LCD display and the ST7365 controller datasheet. Regards,
Hello everyone,I'm using Nucleo-wl55JC boards with the PingPong example code (which is working). I saw in the datasheet that we could have 2 different power supplies LDO and SMPS, I also saw that the SMPS mode was more economical than LDO, that's why I'd like to use it.I'd like to know if it's possible to activate this mode in the PingPong code? Is it already active?Best regardsKYZ.
Hello,I have 2 STM32 Nucleo F746ZG boards, and I am trying to use one board (MCU 1) to program the second board (MCU 2) through its default bootloader through code. To do so, I used the following command in the MCU2 to start its default bootloader:#define DEFAULT_BOOTLOADER_ADDRESS 0x1FF00000 BOOT_JumpToAddress(DEFAULT_BOOTLOADER_ADDRESS); void BOOT_JumpToAddress(uint32_t address) { printf("Jumping to 0x%08X\r\n", address); // Function pointer to reset handler void (*app_reset_handler)(void) = (void *)(*((volatile uint32_t *)(address + 4U))); // Disable RCC, HAL, reset SYSTICK, and remap vector table offset HAL_RCC_DeInit(); HAL_DeInit(); SysTick->CTRL = 0; SysTick->LOAD = 0; SysTick->VAL = 0; SCB->VTOR = address; uint32_t msp_value = *((volatile uint32_t *)address); __set_MSP(msp_value); // Jump into application app_reset_handler(); } Then, on the programmer, I send the start byte 0x7F. When I receive ACK, I send the bytes for the "Go to applicat
Hi team.I want to implement 6-step sensor less voltage mode on stm32g474. So, I referred the MCSDK V6.2.1, 6-step sensor less Voltage mode with stm32g431 with IHM03 code.But I couldn't understand how to commutate timing is controlled.Also, I read the "md_docs_2six-step-firmware-algorithm.html" at MCSKD installed folder, but no mention.The reason why I want to know the commutation timing is because PWM overrun occurs at high speeds commutaion.Currently, I am using a code to check the commutation timing on every PWM cycle. Actually this cycle is Tim1's CH4 compare interrupt.The commutation waveforms at low speed and high speed are as follows.What kind of control and timing should be used to perform commutation successfully?fig1. Commutation at low speedfig2. Commutation at high speed
Hello,we are using a STM32F429.The bootloader is located in the first 64kB. The firmware in the remaining sectors.It erases the remaining sectors of the flash and writes the new firmware.Now, 3.6.5 Read-while-write (RWW) of the reference manual states that "This feature allows to perform a read operation from one bank while an erase or program operation is performed to the other bank."Does this mean that reads from the same bank as a sector is erased is not allowed?If so, how should the bootloader update the firmware in Bank 0, where the bootloader sits itself?Many thanks in advance for your answer!
I have a stm32g031k8 board. I was trying to give a pwm input signal like a square wave, measuring the frequency and duty cycle and generate pwm signal of that frequency and duty cycle using another timer. I was also changing the frequency and duty cycle of the input signal on the fly and it should change the output signal instantly. I was unable to do it. I was able to measure the frequency but nothing works. Please help me with the procedure. Thank You.
Hi.I was searching for a crystal that meets the requiremets for the HSE of the MCU I´m using (STM32L4P5RGT6) at the beginning I tried to make the corresponding calcuations by myself but after researching I noticed that for some calculation I needed make physical measurements of the crystal (I dont even have the crystal as well as the oscilloscope) because of that I tried to have some guidance on evalutation boards that implemented the same line of the MCU I was trying to use on its evaluation board, but I found that many of the evaluation board use LSE using 32.768kHz crystals, so in that point I ask my self "What external clock source do I need in first place?" I`m going to implement the above MCU with basic componentes that ones to can start the MCU as well as some DCMI interface ans some serial interfaces as well (I2C, SPI), analog peripherals and USB. I´m beginner in the MCU design so, what external clock source do I need? Thanks for your help.
I use the stm32g0b1 microcontroller to USB Host. I use the HAL library from STMicroelectronics. Class for FS IP: Communication Host Class (Virtual Port Com). And it works great with other microcontrollers that use Class for FS IP: Communication Device Class (Virtual Port Com). Both from ST and from other companies. But if I connect a device from FTDI (for example FT230X or FT232) or from WCH (for example CH340/343) to the host, nothing works. Everything freezes on Appli_state == APPLICATION_START.As far as I understand, many people have encountered this, but I have not found any solution to this on the Internet. Is it possible to somehow change the standard library for USB Host from ST so that it would be possible to connect such devices?
Hi everyone, I'm working on a project using an STM32H743 and LwIP (v2.1.2) without an RTOS (NO_SYS=1), and I've been debugging persistent issues related to LwIP's heap allocation and MPU configuration. After days of digging, I’d really appreciate the community's input. What I'm trying to do: I want to place the LwIP heap in RAM_D2 at address 0x30008000, enable MPU regions for protection, and successfully use Ethernet and ping using LwIP. My configuration: .ld file (.lwip_heap section): .lwip_heap (NOLOAD) : { . = ABSOLUTE(0x30008000); KEEP(*(.lwip_heap)) . = ALIGN(4); } >RAM_D2 In mem.c: attribute((section(".lwip_heap"))) attribute((used)) u8_t lwip_heap[MEM_SIZE]; #define LWIP_RAM_HEAP_POINTER ((void*)lwip_heap) In lwipopts.h: #define NO_SYS 1 #define MEM_ALIGNMENT 4 #define MEM_SIZE (64*1024) #define MEM_LIBC_MALLOC 0 #define LWIP_SUPPORT_CUSTOM_PBUF 1 The symptoms: With MPU disabled: I can receive ARP requests and the STM seems to process them correctly by trying to send a b
Greetings,We've found several STM32 MCUs with what appear to be poorly executed laser engravings. Is there anyone I can contact to get an official opinion on these chips?We are not the firm that designed and built the boards. We are reviewing other firm's boards and do not have access to supplier or similar information.Thank you.-David
Hello,i'm trying to implement firmware upgrade in my Windows application via USART for stm32f103 following AN3155. My issue is with the Write Command. More specifically:- if i send 1 byte of user data at time it works, it's just slow cause i have to introduce 1ms delay or shorter between each write (or it stucks and i get no message from the bootloader)://PSEUDO CODE: for (i=0 to N_byte){ USB_Out_Buffer[0] = FirmwareBytes[current_chunk_num, i]; USB_write(1); //sends 1 byte delayms(1); }- if i send the whole 256 byte block (or lower) it stucks after sending the checksum and i get no message from the bootloader://PSEUDO CODE: for (i=0 to N_byte){ USB_Out_Buffer[i] = FirmwareBytes[current_chunk_num, i]; } USB_write(N_byte+1); //sends 256 bytesI'm using USART on PA9, PA10. i tried everything, reduce baudrate, adding delay etc. Any idea what could be the issue?
We're using a STM32H747IGT6 and using hardware semaphores to coordinate between the two cores.On the CM4 I've set up TIMER3 to run at full blast: LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_TIM3); LL_TIM_SetPrescaler(TIM3, 0); // Count at system clock LL_TIM_SetAutoReload(TIM3, 0xFFFF); LL_TIM_EnableARRPreload(TIM3); LL_TIM_SetCounterMode(TIM3, LL_TIM_COUNTERMODE_UP); LL_TIM_SetClockDivision(TIM3, LL_TIM_CLOCKDIVISION_DIV1); LL_TIM_EnableCounter(TIM3); I believe that means the timer is running at 240 MHz (do you agree?) which is one tick every 4.166 nsec.So now I grab and release a hardware semaphore that is not used anywhere else in the code: start_timer = LL_TIM_GetCounter(TIM3); WRITE_REG(HSEM->R[TEST_SEMAPHORE_NUMBER], (HSEM_R_LOCK | LL_HSEM_COREID | SHMEM_CM4_PID)); uint32_t readBack = HSEM->R[TEST_SEMAPHORE_NUMBER]; if (readBack == (HSEM_R_LOCK | LL_HSEM_COREID | SHMEM_CM4_PID)) WRITE_REG(HSEM->R[TEST_SEMAPHORE_NUMBER], (LL_HSEM_COREID |
Bonjour ! Je travaille avec une carte NUCLEO L496ZG. Maintenant, j'aimerai intégré le STM32L496ZGT6U dans mon projet mais j'ai besoin du schéma de la carte NUCLEO pour étudier certains points. Où puis-je trouver ce schéma ?Merci d'avance !Google translates:Good morning ! I'm working with a NUCLEO L496ZG board. Now I'd like to integrate the STM32L496ZGT6U into my project, but I need the NUCLEO board schematic to study some points. Where can I find this schematic?Thanks in advance !
I have a custom board with an STM32U083KCU6 MCU - see schematics belowVBAT = +3.6VI have 2 boards:1. board: I flashed it via SWD but forgot to enable it in STM32CubeMX, which means that I'm not able to flash it again via SWD2. Board: This time, I remembered to enable SWD inside STM32CubeMX and was able to flash it successfully. It worked fine for a long time, but now it suddenly seems like my ST-LINK V2 programmer is no longer able to flash it for some reason...NRST is connected to RST on the ST-LINK V2 programmer.I can use the same ST-LINK V2 programmer to flash a STM32U083 Nucleo board, so it does not seem like the ST-LINK V2 programmer is brokenSTM32_Programmer_CLI -c port=SWD sn=223215051117303030303032 -d ------------------------------------------------------------------- STM32CubeProgrammer v2.15.0 ------------------------------------------------------------------- libusb: warning [libusb_exit] device 4.76 still referenced libusb: warning [libusb_exit] device 4.75
Problem: when i call the function "MX_TouchGFX_Process();" the screen becomes unstable. After using this function, the image becomes and remains stable. (1)What can be the issue?How can i update the screen during blanking period, when the LTDC is not fetching? AN4861 cites the following on page 37(see pictures below): To update the screen during blanking period, I'have tried the following code, but doesn't work, the RRIF flag doesn't set(RRIEN is enabled), sometimes it only sets one time, when calling the function for a second time, (2)does someone have a better code or correction of my code? I can't find example codes about this. My code: void vGenfuncScreenUpdate1( LTDC_HandleTypeDef *hltdc ) { HAL_LTDC_Reload(hltdc, LTDC_RELOAD_VERTICAL_BLANKING); // __HAL_LTDC_ENABLE_IT(hltdc, LTDC_IT_RR); while( __HAL_LTDC_GET_FLAG(hltdc, LTDC_FLAG_RR) == 0U ) { //wait here // printf(" waiting, %lu \r\n", __HAL_LTDC_GET_FLAG(hltdc, LTDC_FLAG_RR) ); } printf("
Hello,I'm using NucleoU575 with CubeMx and I want to make a file system on my SD card.I want to use FreeRtos but there are no Fatfs in CubeMx and the FileX cannot work with FreeRtos (image). Is there anyway i can use Fatfs with STM32U5 ?Thank you.
Hello All,I am working on STM32WLE5 , and low power mode used for controller is stop 2 mode. And I am using MSI at 4Mhz as system clock. When i enable debugger mode, controller takes reset after a while and reset type shown is also not correct. While controller is in stop 2 mode, 3 timers are running for the walk by purpose . I have gone through debug configurations and they are ok i think.Can you please help, what might be the issue?Thanks
I’m using the STM32H563VI microcontroller in my project, together with an external STWD100PY watchdog connected to it. When I try to flash the microcontroller’s memory, the watchdog resets it during the programming process, causing the write to be interrupted. How can I solve this? I’m using the Segger J‑Link programmer in SWD mode (SWCLK and SWDIO).
Application note AN5361 "Setting up with ST-LINK GDB server" says "Set the Cortex®-M7 core running so that the HSEM semaphore is released and Cortex®-M4 wakes up from Stop mode" and this post implies that it's "HSEM 0" which I'm assuming is HSEM channel 0.Am I correct that HSEM channel 0 is not available for use by my application? Is that fact documented in the Reference Manual (I can't find it anywhere)?
Hello,I am working with stm32 h757 riverdi kit. I get this error in stm32cubeidearm-none-eabi-g++ -o "Riverdi_70STM32H7_CM7.elf" @"objects.list" -l:libtouchgfx-float-abi-hard.a -mcpu=cortex-m7 -T"C:\TouchGFXProjects\AKUSTEK_V3\STM32CubeIDE\CM7\STM32H747XIHX_FLASH.ld" --specs=nosys.specs -Wl,-Map="Riverdi_70STM32H7_CM7.map" -Wl,--gc-sections -static -L../../../CM7/Middlewares/ST/touchgfx/lib/core/cortex_m7/gcc --specs=nano.specs -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -lstdc++ -lsupc++ -Wl,--end-group C:/ST/STM32CubeIDE_1.18.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eabi/13.3.1/../../../../arm-none-eabi/bin/ld.exe: Riverdi_70STM32H7_CM7.elf section `.text' will not fit in region `FLASH' C:/ST/STM32CubeIDE_1.18.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.13.3.rel1.win32_1.0.0.202411081344/tools/bin/../lib/gcc/arm-none-eab
#include "cmsis_os.h" #include <stdio.h> #include <stdlib.h> #include "main.h" #include <stdbool.h> extern I2C_HandleTypeDef hi2c4; uint8_t DATA, DEVICE_STATUS = 0x00, XH, XL, YH, YL; uint16_t X_AXIS, Y_AXIS; #define DEVICE_ADDRESS (0x38 << 1) // Shifted for STM32 HAL uint16_t x_axis = 0, y_axis = 0; uint8_t STATUS = 0; void STM32TouchController::init() { // Initialization if needed (e.g., configure GPIO, I2C, etc.) } bool STM32TouchController::sampleTouch(int32_t& x, int32_t& y) { static uint16_t prev_x = 0xFFFF, prev_y = 0xFFFF; STATUS = HAL_GPIO_ReadPin(GPIOG, GPIO_PIN_2); // Touch INT pin low = active if (STATUS == GPIO_PIN_RESET) { // Read X high & low HAL_I2C_Mem_Read(&hi2c4, DEVICE_ADDRESS, 0x03, I2C_MEMADD_SIZE_8BIT, &XH, 1, 100); HAL_I2C_Mem_Read(&hi2c4, DEVICE_ADDRESS, 0x04, I2C_MEMADD_SIZE_8BIT, &XL, 1, 100); // Read Y high & low HAL_I2C_Mem_Read(&hi2c4, DEVICE_ADDRESS, 0x05, I2C_MEMADD_SIZE_8BIT,
I am working on a H755zi-Q Nucleo board , I am using the flash memory to store some parameters and i have implemented flash wearing as well, All this works fine , my data persists across resets and is correctly loaded upon reset, and i have even verified this in the memory , in debug mode i see each page being written perfectly on every write command, when i upload a new code or sometimes when i terminate and relaunch the debug session and open memory , i see that data is erased. How do i prevent this?i want to retain that sector's data over flashes and debug sessions, the memory sector i am using is far away from my code's sector, (i am using bank 2 last sector). This is my initial data in the memory, i have entered debug mode, and after performing a new write operation, here we are again, but from now if i keep performing write operations they are preserved correctly./* * @brief Find the page of the memory sector to write the * data of the params struct */ uin
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.