Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hello everyone,I’m working on a BLE project using two STM32WB55 boards.My goal is to create a connection between them without using the ST BLE Toolbox App.One board is configured as a Custom Server (Peripheral), and the other as a P2P Client (Central).I want to ensure that I am properly connected to my server and receiving notifications.But I am not sure about how using:Start scanningIdentify the correct serverConnectDiscover servicesEnable notificationsReceive data Please without saying follow the P2p example, because I didn't catch it
The same issue has been reported years ago https://community.st.com/t5/stm32-mcus-touchgfx-and-gui/method-allowverticaldrag-in-scroll-list-container-does-not-seem/m-p/169035#M10136If you create a mySelectorScroll and in the code mySelectorScroll.allowVerticalDrag(false); the scroll list will continue to be scrollable no matter whatAlso, accoridng to docs (https://support.touchgfx.com/docs/api/classes/classtouchgfx_1_1_scroll_base#function-allowverticaldrag) it should be OFF by default enableIf true, vertical scrolling is enabled. If false (default), scrolling is disabled.
What is the lens used on the B-CAMS-OMV kit? Or, what is the field of view? or, what is the focal length?
Hi everyone,I'm working on a multichannel ADC1 + DMA setup using an STM32G070CBTx MCU, and I'm running into an issue with buffer readings.My ADC configuration involves 8 channels mapped as follows:Joystick: ADC1_IN9 (Rank 1) and ADC1_IN10 (Rank 2)Battery level: ADC1_IN7 (Rank 3)Motor 1 feedback: ADC1_IN2 (Rank 4) and ADC1_IN3 (Rank 5)NTC sensor: ADC1_IN8 (Rank 6)Motor 2 feedback: ADC1_IN0 (Rank 7) and ADC1_IN1 (Rank 8)I've attached a screenshot of the ADC1 channel/rank configuration from STM32CubeMX.I followed a tutorial for setting up ADC with DMA, and the configuration seems correct. However, when I debug the code, I noticed that the DMA buffer doesn’t get updated correctly when it’s declared as uint16_t (as shown in the second screenshot), despite casting the buffer to uint32_t.I tried declaring the buffer as uint32_t adcBuffer[8], and that actually fixed the problem. Oddly, I’ve used the same code on an STM32F4 Discovery with similar ADC configuration, and it worked perfe
Hi all,I have two ADC channels (channel 1 and channel 3), and I configured them in multi-channel interrupt mode. The cubeMx ADC settings is shown in image below:Continuous Convertion mode : EnabledEnd of Conversion Selection: End of single convertion However, when the interrupt is triggered and I read both channel values, the readings are incorrect. Specifically, the value from channel 1 appears to be assigned to both variables, even though only channel 1 was triggered. Code: /* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2025 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file c
Hi ST Community,I'm working with a sensorless BLDC motor and using the ST Motor Control Profiler to extract the required motor parameters, as I don't have access to the exact datasheet values. I'm facing some issues and would appreciate guidance.What I did:Entered motor information including Max Current, Max RPM, and Number of Poles.When I entered the actual Max Current, the profiler often gave Speed Feedback Faults or failed profiling.To overcome this, I reduced the current in steps from 93% down to 80% of Max Current, and profiling succeeded with reduced current values.Observations:The profiler gave significantly varying results, even though the motor and setup remained the same.Not reaching max RPM Specified.Some examples of variation:BEMF Constant: ~±3 Vrms/kRPMFriction: 700 to 1450 µN·m·sInertia: 20,000 to 45,000 µN·m·s²This creates confusion — which profile values should I consider as trustworthy for tuning my motor with Motor Control Workbench?Questions:Which current value range
I've got an STM32G491RE on a NUCLEO-G491RE board and I'm driving the DAC using TIM4's TRGO and pulling values out of a memory buffer using DMA. It was a bit of a challenge getting set up, but now that it's running it's beautiful.What's weird is that I've got TIM4 initialized with both prescaler and counter set to 4, and since that board is running at 72 MHz that means I'm triggering the DAC every 347 ns but it's supposed to have a max of 1 Msps.Am I correct in assuming it's just ignoring those extra timer triggers? Are there any error bits set when you "overdrive" a DAC like this?
Hello everyone,I am currently working on a project that requires a dual-core microcontroller with the following specifications:Flash Memory: 256 KB to 1 MBRAM: 16 KB to 64 KBArchitecture: 16-bit / 32-bit MCUsRTOS Support: YesClock Frequency: 48 MHz to 100 MHzCore: Dual coreOver The Air programming: YesI would greatly appreciate your suggestions on the best STM32 models that meet these criteria. If you have experience with any specific models, please share your insights regarding their performance, ease of use, and any potential drawbacks.
Hi everyone,I'm working on an STM32G070CBTx, and I need to execute two different functions depending on the GPIO mode of pin PA12.Specifically:If PA12 is configured as input (GPIO_MODE_INPUT), I want to run function1()If PA12 is configured as output push-pull (GPIO_MODE_OUTPUT_PP), I want to run function2()Is there a way in HAL or LL to check the current mode of PA12 at runtime?Or do I need to track the mode manually when I configure it?Any suggestions or best practices for this kind of conditional GPIO-mode-based logic would be appreciated!Thanks in advance!
I have an STM32F401 nucleo board and it used to work fine but now after a minute of connecting it with usb, the LD1 suddenly dims to very low light like pin on float. Before that it works fine, I can program it, debug it.
BonjourJe suis a la recherche d'un tuto pour lire une pt100 via le MAX31865 avec ma carte nucléo.J'ai essayé plusieurs solutions trouvées sur github qu'il y a toujours des petits détails que je n'arrive pas à résoudre.Je ne suis pas assez doué .J'ai réussi avec la MAX6675 mais la je caleJ'aimerais surtout comprendre plutôt qu'une solution toute faiteCordialement PascalGoogle translate:Good morningI am looking for a tutorial to read a pt100 via the MAX31865 with my nucleo card.I've tried several solutions found on github and there are always small details that I can't resolve.I'm not good enough.I succeeded with the MAX6675 but now I'm stuckI would especially like to understand rather than a ready-made solution.Sincerely Pascal
Hello, I am developing a electronic card that is supposed to be used in an automated test bench. I'm using an STM32G474 to control the card. I have already created one iteration of the card but I realised I made a mistake.I wanted to use the bootloader to program the card but realised far too late that I didn't install it properly and cannot use it. Plus I'm unable to debug with it.I now want to replace this system but I can't figure out what to use and how to route it.I think I could use STlink but I can't seem to figure out how it works and how to route it on the STM.Could anyone help me figure out this ?Thank you very much.
Hello everyone,I’ve integrated USBX configured as a Mass Storage Class (MSC) device into my project, which uses the STM32H743BITx MCU. The project compiles successfully, and the system detects when a USB device is connected. However, enumeration fails.I’m wondering if this issue could be related to the USB type or the clock configuration. I’ve read that many USB problems stem from clock accuracy.I’m currently using the internal clock source, specifically the 48 MHz HSI48 oscillator for USB. Is this oscillator accurate enough for USB operations, or is it preferable to use a PLL-generated 48 MHz clock? Unfortunately, I don’t have an external crystal available.When I try to configure the USB clock using a PLL (e.g., PLLQ) with HSI, I encounter the following error in CubeMX:“PLL Mux should have HSE as input”Also, I’m following the same layout as the schematic of the Discovery board. Has anyone experienced similar issues or found a reliable configuration without an external crystal? Th
The FDCAN module generates timestamps for sent and received messages, and you can configure it to use TIM3 as the source. Unfortunately, the documentation is rather thin, so I am left with a few questions:Do TIM3 and FDCAN need to run from the same clock or are they synchronized?What triggers the timestamp? I suspect this is the SOF bit, and it is sampled once every normal time quantum, so that the trigger resolution is one time quantumOne probably should not use the timer overflow flag in the CAN module when using TIM3, but check directly in the timer?Is there a recommended sequence to get FDCAN time quanta and TIM3 aligned, or should we just run TIM3 with a higher frequency?
Has anyone in this community tried integrating LVGL code generated by NXP GUI guider with STM32 boards. Currently I am trying to integrate nxp gui guider generated code with STM32 for faster UI development. I have integrated LVGL library and I am able to run LVGL example widgets and animations. But when I integrated nxp gui guider generated code and tried running it, I am not getting output. Display flashes for less than a second and screen becomes blank. Please help me with this.Thank you.
Hi all,I am using a mass-produced PCB board for a project, the chip model is STM32F429BIT6. The PA1 pin is used as ADC1-IN1 for access to the sensor.However, I found a strange phenomenon that after configuring the ADC, the initial reading of the pin was a value such as 4092. But that's not to say that ADC doesn't work, because the number varies, sometimes it's 4089, sometimes it's 4091, it changes. Everything measured with this pin is 4092, but GND value is correct, almost single digits.I found the problem, but I don't know what's causing it. After measuring this pin with a multimeter, it is itself with 3.3v voltage, even if it is configured as `GPIO_MODE_ANALOG` in the code, changing `GPIO_InitStruct.Pull` to pull up or pull down, still does not work.At first I thought it was a problem with my code configuration, because I modified it based on someone else's code, but I used 'CubeMX' to create a new blank project and configure the PA1 pin, only read the ADC value without adding additi
I have this SRC1m1 board and would like to run some tests with it at 20V. Your user manual is conspicuously not mentioning running it above 5V. It does have a lot to say about running it at 5V if you do not have UCPD. Sortof implying if you do have UCPD you can run it above 5V. But I don't see how.Can anyone clue me in on how you can run this board with a 20V source? As far as I know PD requires 5V connection, then negotiation to get 20V. This board has no capability to output more than a single voltage. So there is no way to do the negotiation at 5V then switch to 20V. So running above 5V is not possible. Correct?Or am I supposed to monitor the PD data when when I see the ACCEPT message sent out I should quickly (within tPSTransition 550ms) change my PSU to 20V?
when creating new project, only 'Empty'.""This functionality works correctly in v1.18.""The issue appears after upgrading from 1.18 to 1.19, or when directly installing 1.19."
Hi, I'm trying to initialize SDADC of my STM32F373CCT6 chip based on the Standard Peripherial Library. The program can be compiled with no errors but doesn't work after I uploaded it to the chip. I used a LED program to test it and found that the initializing function got stucked at the statement of waiting for calibration to complete. I used a self designed board. The intializing function and the main function of my program, as well as the schematic diagram of my board is attached. I'm a STM32 beginner and haved been troubled by this issue for days, I sincerely hope to get your help. Thank you so much!
Hi,We're faced to an issue in the RTC module. RTC registers: time, date and backup register aren't saved after power off ( we measured the VBAT supply is about 3v given by the supercapa), we used a magic number to ensure that data aren't reinitialized at each software startup: /** Initialize RTC Only */ hrtc.Instance = RTC; hrtc.Init.HourFormat = RTC_HOURFORMAT_24; hrtc.Init.AsynchPrediv = CFG_RTC_ASYNCH_PRESCALER; hrtc.Init.SynchPrediv = CFG_RTC_SYNCH_PRESCALER; hrtc.Init.OutPut = RTC_OUTPUT_DISABLE; hrtc.Init.OutPutPolarity = RTC_OUTPUT_POLARITY_HIGH; hrtc.Init.OutPutRemap = RTC_OUTPUT_REMAP_NONE; if (HAL_RTC_Init(&hrtc) != HAL_OK) { Error_Handler(); } /* USER CODE BEGIN Check_RTC_BKUP */ if(HAL_RTCEx_BKUPRead(&hrtc, RTC_BKP_DR0) == 0x55AA) { // Time and Date are OK return; } /* USER CODE END Check_RTC_BKUP */ /** Initialize RTC and set the Time and Date */ sTime.Hours = 18; sTime.Minutes = 4; sTime.Seconds = 0; sTime.SubSeconds = 0x
Hi,I am using STM32L476RG as a part of my ultrasound project. STM32 basically has the following functions in this system:Send 3 2MHz pulses every 40msRead 500*2 ADC points using an interleaved ADC triggered simultaneously with pulsesSend ADC data through SPI to ESP32This is my schematic that I will use on my board (The stm32 part of the board, the other parts of the board design is not finished yet)My firmware code is in the attachments: I also checked the design self-check guide and everything seemed fine to me. There are some notes in my mind:1) The board is supplied by a converted 3.3V from 3.7V battery. I am not sure about the affect and placement of the ferrite bead when using a single 3.3V.2) Is there a need to add diodes if I channel st-link 3.3V to the start of battery 3.3v line. When the stm32 is powered by stlink would that affect the 3.3V line(Because 3.3V also powers the pulser IC on the same board.3) I am not using any external crystals because the system is already w
Good afternoon Team,I am working on a project where I need to interface two SPI peripherals with an ST microcontroller (STM32G070RBT6).One peripheral (ADS124S06) operates in SPI Mode 1 (CPOL=0, CPHA=1), and the other (64128L FC BW-RGB Display) in SPI Mode 0 (CPOL=0, CPHA=0).Both peripherals must operate concurrently to ensure real-time data visualization.Is it possible to use a single SPI interface for both peripherals, even though they require different modes?If yes, what is the best way to handle this? ---Should I reconfigure the SPI mode dynamically before communicating with each device?Are there any potential timing or synchronization issues to consider?Thank you in advance for your support!
I am using the H743 microcontroller and am looking for some more information about the GPIO EXTI controller.Specifically, how long does a signal need to be held on a GPIO in order for the EXTI to detect a rising or falling edge?I notice in the timer peripherals, you can set different filters on the input using the ETF (External trigger filter) bits in the TIMx_SMCR (TIMx slave mode control register). This way you can decrease the sampling frequency and require multiple samples at a specific polarity before detecting a rising/falling edge.However there is no information like that for the GPIO EXTI detection. What I want to know is what is the sampling rate at which the microcontroller samples the GPIO when placed in EXTI mode? And is it the first sample that crosses the high/low input polarity (~1V for low, ~2.3V for high @3.3V) or do several samples in a sequence need to be detected?
MCU is STM32H7R/S.Some paths is incorrect in make script .Failed Log:Generate CodeGenerateDoneGenerate Assetsmake -f simulator/gcc/Makefile assets -j8Reading ./application.configReading ./target.config../Middlewares/ST/touchgfx/framework/tools/videoconvert/videoconvert.rb:43:in `read': No such file or directory @ rb_sysopen - ../MDK-ARM/AICAMERA_V3_ONLYAPP.uvprojx (Errno::ENOENT)from ../Middlewares/ST/touchgfx/framework/tools/videoconvert/videoconvert.rb:43:in `check_compiler'from ../Middlewares/ST/touchgfx/framework/tools/videoconvert/videoconvert.rb:251:in `block in <class:Main>'from ../Middlewares/ST/touchgfx/framework/tools/videoconvert/videoconvert.rb:101:in `chdir'from ../Middlewares/ST/touchgfx/framework/tools/videoconvert/videoconvert.rb:101:in `<class:Main>'from ../Middlewares/ST/touchgfx/framework/tools/videoconvert/videoconvert.rb:19:in `<main>'generated/simulator/gcc/Makefile:229: recipe for target 'videos' failedmake[1]: *** [videos] Error 1simulator
Dear all,I'm working on an custom hardware project using the STM32G0B1 MCU running ThreadX. My goal is to use/port the USBPD stack for both source as sink device, but I'm failing to do so partly because the stack provided is closed source.The CubeMX skeleton code generated for my project does not offer a working solution and all example code nor documentation available is not targeting ThreadX.Also I'm somewhat confused about which PD stack to use since X-CUBE-USB-PD is no longer recommended? Then what would be the alternative stack to use?Does anyone have practical experience, can provide meaningful documentation or example code porting USBPD to ThreadX? I would be forever thankful.Thanks and looking forward to your replies.With regards,Peter
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.