Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi everyone, I’m exploring the idea of creating an Android app that can communicate with STM32 boards, mainly for controlling peripherals and monitoring sensor data. I know there are examples for Bluetooth and USB connectivity, but I haven’t seen much discussion around best practices for building a reliable Android-side implementation. For those who’ve tried this: Did you go with native Android development (Java/Kotlin) or use a cross-platform framework? How did you handle real-time data streaming from the board to the app? Any pitfalls or lessons learned regarding power management, latency, or connection stability? I’d love to hear what approaches others here have taken. Any insights, references, or even mistakes to avoid would be really helpful. Thanks in advance!
Hello,I have existing hardware designed using STM32G0B1VET6 microcontroller. I want to redesign this hardware to provide Ethernet interface. I am planning to use ICs like LAN9250 or KSZ8851 or ENC424J600. But all these ICs require TCP/IP stack on host side (microcontroller in my case). I want to know if it is possible to configure having TCP/IP stack using STM32CubeMX for this controller. If yes, is there any way i can interface SPI driver which I will have to develop to interface any one of the above ICs?Thanks,Pradeep
Hello, I wanted to make auto-tune for my engine but there is no STEVAL-IPM30B power board in Motor Profiler tool. Only IPM-05, 10, and 15 are supported. Can I select IPM-15B board and run Motor Profiler with a physically connected IPM-30B?
I Tried to flash the uart code in stm32 N657 Nucleo Board, but it is not responding, i was able to make the Leds, blink in the N6 board. Please help me out, i am using the uart example printf code in the N6 stm32 package. I tried the normal method used in the STM32 F4 MCUs, also the selection of peripherals are different in the IOC file. also please explain how to configure the RCC and other peripherals in the IOC file of these N6 boards
Hello everyone,I would like to update the STM32 remotely using ESP32. So the Idea is to transfer the signed image via Bluetooth and to store it firstly on the esp32, which will transfer it in the end via UART to the STM32.After that the secure boot on the stm32 must verify the image signature. I came across X-CUBE-SBSFU but I actually don't know how to use it in my case. Should I only use the Ymodem protocol ? Best regards
NUCLEO-F411REI am trying to read data from a ADXL1002Z.I have set up my board to use PA1 (A1 on the Arduino header) as ADC1_1/* adc.h */ #ifndef INC_ADC_H_ #define INC_ADC_H_ #include <stdint.h> void pa1_adc_init(void); uint32_t adc_read(void); void start_conversion(void); #endif /* ADC_H_ */ and...#include "stm32f4xx.h" #include "adc.h" #define GPIOAEN (1U<<0) #define ADC1EN (1U<<8) #define ADC_CH1 (1U<<0) #define ADC_SEQ_LEN_1 0x00 #define CR2_AD0N (1U<<0) #define CR2_SWSTART (1U<<30) #define CR2_CONT (1U<<1) #define CR1_EOCIE (1U<<5) #define SR_EOC (1U<<1) void pa1_adc_init(void) { /***Configure the ADC GPIO pin ***/ /*Enable clock access to GPIOA*/ RCC->AHB1ENR |= GPIOAEN; /*Set the mode of PA1 to analog*/ GPIOA->MODER |=(1U<<2); GPIOA->MODER |=(1U<<3); /***Configure the ADC module***/ /*Enable clock access to ADC */ RCC->APB2ENR |= ADC1EN; /*Conversion sequence start*/
I have problem in stm32cubeIde i want to configure BLE Mesh but there is no option to configure it please suggest me how to do in STM32WBA55
I have followed the article (https://community.st.com/t5/stm32-mcus/how-to-create-a-project-for-stm32h7-with-ethernet-and-lwip-stack/ta-p/49308#memory-layout ) to get it working for ethernet but I am facing hardfault. In H7S3L8 I am using AXI-SRAM at address 0x24020000 for ethernet buffers and lwip and configuring this sram as non cacheable, non bufferable and shareable at level 1 I am getting hardfault. I is related to memory but I am not able to resolve it. Any help me to find where is the problem? Linker file is shown below /* ****************************************************************************** ** ** @file : LinkerScript.ld ** ** @author : STM32CubeIDE ** ** Abstract : Linker script for STM32H7Sxx Device ** 64Kbytes FLASH ** 456Kbytes RAM ** ** Set heap size, stack size and stack location according ** to application requirements. ** ** Set memory bank area and size if external memory is used ** ** Target : STMicroelectronics
Im using stm32h735g-dk and i was thinking to start model based development using simulink in matlab.I already done a cluster prototype using touchgfx and stm32cube idenow i need to shift from cube ide to simulink using same gui is it possible??If its posssible how will i integrate with simulinki have already licenced version and stm embedded packages on simulink and embedded codercan anyone help me with a guidance how to integrate without using cube ide
We analyzed the boot and camera initialization time on the STM32N6570-DK using the DCMIPP SnapshotDecimationMode example (~600 ms boot-to-first-frame) and the Object Detection example (~1 s total). In both cases, the IMX335 camera init dominates boot time (≈480–750 ms). Reducing the reset delay for the sensor (from 200 ms→50 ms) did not improve boot speed — instead the wait time shifted into later stages (e.g. CSI_SetConfig or probe), suggesting the IMX335 requires a minimum readiness time before I²C access. Our use case only needs snapshot capture (not continuous streaming), so reducing initialization latency is critical. Has anyone optimized IMX335 (or similar sensors) boot time? Are there recommended techniques for quicker camera startup?
I write drive layer in MCU which is stm32f302r8t6. But I can't active to enable SPI clock register. Can you help me with that problem? Maybe you ask me that write in main.c as register level. RCC->APB2ENR |= 0x0800; Actually I opened SFR and tried to enable SPI clock register but I can't.
Hello, I’m working on a project with an STM32F446RE where I read data from a CAN bus at 500 kbps (CAN1_RX0) and also use I2C to control an MCP4725 DAC, plus timers and DMA for other tasks. The problem: When I test CAN alone, it works perfectly — I can receive all messages from my device (a motorcycle inverter). When I run the full code with all peripherals connected and active (CAN + I2C + TIM2 + DMA), the CAN stops receiving after a short time, or doesn’t receive at all. On the motorcycle, this happens consistently, but on the bench with CAN only, it works fine. What I tried so far: Set CAN NVIC priority higher than other interrupts: Confirmed CAN1_RX0_IRQHandler() calls HAL_CAN_IRQHandler(&hcan1). Reduced I2C timeout to avoid blocking (HAL_I2C_Master_Transmit with 2 ms instead of HAL_MAX_DELAY). Tried opening the CAN filter (mask = 0) to receive all IDs for debugging. Enabled HAL_CAN_ErrorCallback Despite all these changes, when all peripherals ar
I believe the STM32H743XGH6 has 1 MB of internal flash memory. However, using STM32CubeProgrammer, I was able to write and read data to the reserved area at 0x8180 0000. Is it okay to use this area?The built-in Flash Memory areas of the STM32H743XGH6 are recognized as0x8100 0000-0x817F FFFF and 0x8000 0000-0x0801 FFFF.
Hello,Sometimes saving to flash takes the devices a couple of seconds.It enters through APP_ZIGBEE_persist_save() -> APP_ZIGBEE_NVM_Write() -> EE_Write -> EE_Transfer -> EE_ReadEl; and takes a while in this function.Occasionally, the device enters the NMI handler in this same function. Is anyone aware of these issues?Thanks,
Hello, I am using STM32F469BIT with W9812G6KH-6I TR SDRAM and no matter what I did, I could not write to or read from SDRAM since MCU goes into hardfault whenever i want to access SDRAM. I configured FMC according to this article. I am running SDRAM @84MHz and here's my configuration: According to the datasheet:There are 4 banks. 12 address pins and 16 data bits. Also there are UDQM and LDQM pins so i set 16 bit byte enable. Number of column address bits: 512 column, 9 bitNumber of row address bits: 4096 row, 12 bitCAS Latency: 3 for 166MHz operation. I run my SDRAM @84MHz. 84MHz period: 11.9047619 ns Load mode register active delay: tRSC: 2 clock cycleExit self-refresh delay: tXSR: 72ns / 11.9 = 6.05. I set it as 7Self-refresh time: tRAS: 42ns / 11.9 = 3.52. I set it as 4SDRAM common row cycle delay: tRC: 60ns / 11.9 = 5.04 = I set it as 6Write recovery time: tWR: 2 clock cyclesSDRAM common row precharge delay: 15ns /
In application note AN5652, page 7 states that LPBAM can be used in Stop 0, Stop 1, and Stop 2 modes. On page 10, the peripherals that support autonomous mode are listed. Since I cannot use SPI3, I also cannot use Stop 2.Can I configure my MCU in STM32CubeIDE (IOC file) to use LPBAM in Stop 1 mode with SPI1 or SPI2? Are there application examples for this? I have only found projects using Stop 2, and the IDE seems to list only the peripherals available for Stop 2.
hello i am making a custom STM32F405RGT6 board for A DUAL_BLDC_FOC VESC project that am making. i looked up how to programme the chip and it seems i needed to generate the code using STM32cubeMX after instaling the X-CUBE-MCSDK embeded software package then opening it on STM32cubeIDE. but i could't find it even after downloading the latest STM32F405RGT6 MCU PACKAGE and refreshing it multiple times; then i downloaded the X-CUBE-MCSDK6 and it seems the custom stm32F405RGT6 is not suported on the workbench; when i tried to import the (.zip) file it showed an error window. is the F405RGT6 motor control software no longer supported by the new version of the stm32cube? if so what version should i download to find it?
Hi All,I am writing a code to generate an PWM at output. I want to drive an H-bridge outside.All initializations I have done.I am using TIM1 (advanced timer) for this purpose. I am using STM32F Discovery Board (Microcontroller is STM32F407) and STM32CubeIDE 1.19.0 The issue I am facing is whenever I get an interrupt i tried to load value from the LUT but its not working and generate unexpected PWM at output but when I load any fix value then PWM is generated at the output.I am wondering why it is not generating the PWM from LUT.below is my code. kindly tell me what I am doing wrong volatile uint16_t sineIndex = 0; #define SINE_TABLE_SIZE 10 uint16_t sineTable[SINE_TABLE_SIZE] = {400, 657, 794, 746, 537, 263, 54, 6, 143, 400}; int main(){ HAL_Init(); System_Clock_Source(); UART2_Init(); MX_GPIO_Init(); MX_TIM1_Init(); // Here all the settings are done related to PWM timings MX_TIM2_Init(); SPWM_Start(); } void MX_GPIO_Init(void) { GPIO_InitTypeDef GPIO_InitStr
Will ST's ThreadX versions available through CubeMX and on ST's Github eventually be derived from the Eclipse ThreadX project rather than Azure RTOS? Such as...https://github.com/STMicroelectronics/x-cube-azrtos-h7https://github.com/STMicroelectronics/stm32-mw-threadxDoes ST have a plan to transition their middleware to use sources and licenses from Eclipse ThreadX?
Hello everybody, I would like to know when the VBUS voltage measurement is updated. I am using the functions to read the voltage:VBS_GetBusVoltage_dVBS_GetAvBusVoltage_VI am using the threads startMediumFrequencyTask, StartSafetyTask, and my own thread.At system startup, I want to load a buffer. But the measurements taken are incorrect or zero at the board startup.Is there any documentation on the acquisitions? MCSDK : 6.4.1Best regards.
Hello!I have an STM32F777 with FreeRTOS and TouchGFX. An SPI display is controlled in partial framebuffer mode via SPI4 and DMA. The implementation is the same as in the TouchGFX demo projects with partial framebuffer (NUCLEO_C071RB + GFX01M2). I have also attached my display SPI library.The vSync signal is implemented at 60Hz via a software timer, as the hardware does not provide such a signal.My hardware has an Ethernet port that provides a web server with the LwIP stack. This generates many interrupts during high data traffic, which puts a greater load on the processor.During operation, this leads to a deadlock of TouchGFX after a few minutes. TouchGFX gets stuck in the function “getBlockForTransfer(Rect& rect)” in the line “assert(state[sendingBlock] == DRAWN);” (File: FrameBufferAllocator.hpp).After that, the display is no longer updated.If you need further information, please let me know. Attached is the configuration.I hope someone can help me.
hi ,currently working on touchGFX(without RTOS)+stm32h723zgt6+ltdc display .First Screen1 is coming with touchGFX but touch x,y coordinates not changing the screen2.touchGFX screen1 interaction made as follows .i do not attached any touch sensor ! instead of touch sensor i made manual touch x ,y coordinates input by following code . due to manual matrix key button for future use . touch.c as follows#include "Touch_Sensor.h" bool touch_values(uint32_t *touch_x, uint32_t *touch_y) { if(gate) { *touch_x=tempx; *touch_y=tempy; return true; } return false; } touch.h as follows #ifndef TOUCH_SENSOR_H_ #define TOUCH_SENSOR_H_ #ifdef __cplusplus extern "C" { #endif #include "stdint.h" #include "stdbool.h" extern volatile uint32_t tempx; extern volatile uint32_t tempy; extern volatile uint32_t gate; extern bool touch_values(uint32_t *touch_x, uint32_t *touch_y); #ifdef __cplusplus } #endif #endif /* TOUCH_SENSOR_H_ */STM32touchController.CPP as fol
I am using stm32G431C8U6 microcontroller and I use TB6612 motor driver to control two motors with encoders. I have enabled timer 2 channel 3 and 4 for PWM generation and Timer3 and Timer 4 for combined channel encoder mode. Also I have used Timer15 for timer interrupt. I need to move the two motors for a specific counter pulses (eg:25,000) and then I need to stop them when timer3 counter reaches to specified counter pulses. In the code it will not exactly stop at 25,000(specified counter pulses) and it will deviated more than 25,000 (like 25,123,25,200) .Hence I have used PID function to mitigate this issue. I have enabled timer 15 for interrupt and in that interrupt function I have called back my PID function.In the PID function it is supposed to be that counter starts from 0 and every 100ms it will increment by one. For an example initially timer 3 counter at 0 and then next 100ms it will reach to one. Then I have designed the pid function as below,apply_pid(int error){int Kp=0
Hello,I succeeded to download my firmware on my board at first and it works fine. but, I failed to fuse the firmware at the second and I encountered the problem about option byte 0xFF.I don't know what happened. below the error log.=======================13:54:16:823 : Disconnected from device.13:54:17:972 : STLinkUSBDriver.dll loaded13:54:17:973 : STLinkUSBDriver.dll loaded13:54:17:973 : ST-LINK SN : 53FF6A06867857484060026713:54:17:973 : ST-LINK FW : V2J35S713:54:17:976 : Voltage : 3.21V13:54:17:981 : SWD freq : 4000 KHz13:54:17:981 : Connect mode: Under Reset13:54:17:981 : Reset mode : Hardware reset13:54:18:089 : Device ID : 0x43113:54:18:272 : Reading data...13:54:18:273 : r ap 0 @0x40023C14 0x00000004 bytes13:54:18:273 : Reading data...13:54:18:273 : r ap 0 @0x40023C14 0x00000004 bytes13:54:18:273 : Database: Config 1 is active.13:54:18:278 : flash loader C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin/FlashLoader/0x431.stldr is l
Hello everyone,I am fairly new to embedded so bear with me. I am trying to understand bare metal programming.So basically I managed to turn on the LED on soldiered on the board (PA5) but now am trying to create a delay using basic timer TIM6. My issue is that the LED is barely turning on for a very brief moment before turning off. I think my issue lies in how I am configuring the prescaler and auto-reload register. I looked up online and it says that the default clock speed is 16MHz, but I did not configure any clock source.Here is my code down below which I used the reference manual to write: GPIOA->ODR |= (1<<5); // Turning on LED // Initialize TIM6RCC->APB1ENR|=(1<<4);TIM6->CR1|=(1<<0);TIM6->PSC=16000-1;TIM6->ARR=1000-1;TIM6->CNT=0; while(!(TIM6->SR & (1<<0))){}TIM6->SR&=~(1<<0);TIM6->CR1&=~(1<<0); GPIOA->ODR &= ~(1<<5); //Turning off LED Thank you.
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.