Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
I have stm32u5g9j-dk1 demo board. The LCD on it is J025F1CN0201W. But I am not able to find its data sheet or technical spec. May I have copy of it? Thank you. Kelly
Hi,I want to increase the amount of RAM for my application, but I noticed that the NPU seems to be using memory from address 0x34100000 (SRAM2) in the sample application it is based on. Where can I change this? Are there any limitations to the memory that can be used? BR,Artur
Hello,the following code is generated by CubeMX 6.11.1 in module stm32l4xx_it.c:/** * @brief This function handles TIM1 trigger and commutation interrupts and TIM17 global interrupt. */ void TIM1_TRG_COM_TIM17_IRQHandler(void) { /* USER CODE BEGIN TIM1_TRG_COM_TIM17_IRQn 0 */ /* USER CODE END TIM1_TRG_COM_TIM17_IRQn 0 */ HAL_TIM_IRQHandler(&htim1); HAL_TIM_IRQHandler(&htim17); /* USER CODE BEGIN TIM1_TRG_COM_TIM17_IRQn 1 */ /* USER CODE END TIM1_TRG_COM_TIM17_IRQn 1 */ } /** * @brief This function handles TIM1 capture compare interrupt. */ void TIM1_CC_IRQHandler(void) { /* USER CODE BEGIN TIM1_CC_IRQn 0 */ /* USER CODE END TIM1_CC_IRQn 0 */ HAL_TIM_IRQHandler(&htim1); /* USER CODE BEGIN TIM1_CC_IRQn 1 */ /* USER CODE END TIM1_CC_IRQn 1 */ }Interrupts for TIM1 (capture) and TIM17 (global) are both activated, but with different priorities.The problem is that TIM1_TRG_COM_TIM17_IRQHandler() handles also the capture interrupts from TIM1 with same function&n
I'm implementing UART communication between an Arduino Uno and an STM32L476RG. When the STM32 acts as the master (transmitter) and the Arduino Uno as the slave (receiver), data transmission works as expected. However, when I reverse the roles—making the STM32L476RG the slave (receiver) and the Arduino Uno the master (transmitter)—the STM32 fails to receive data correctly. I'm looking for a reliable solution to ensure proper UART communication in this configuration.
How is ThreadX expected to be used with the STM32U5 family using the STM32CubeIde?I was expecting to see an X-CUBE-AZRTOS-U5 package like there is for the STM32H7 family which is X-CUBE-AZRTOS-H7. I don't see it. I'm using a STM32CubeIDE 19.0 that I downloaded last night. I do see there are ThreadX examples for the U5 development boards that I have not installed yet. So ThreadX does seem supported.I'm wrapping up an H7 project where I used ThreadX, FileX, and USBX with the STM32CubeIDE with STM32CubeMX so got familiar with how all those work together. I'm in the earliest stages of a new project where I have different criteria so the H7 family isn't a good fit. I'm much more board size and power constrained. The U5 seemed like the best fit.Anyone out there using ThreadX and USBX with a STM32U5 processor? Your experiences? I haven't committed yet but am leaning towards the STM32U575. I need Audio ADC support ie SAI and USB Class 1 audio support p
Hello,I was looking into this wiki tutorial on setting up a UDP echo server by @mƎALLEm , and the clock configuration caught my eye and wanted to confirm a few things.On the nucleo board , the 8 MHz crystal (X3) is not soldered and the 8 MHz clock signal comes directly from the ST-Link MCU (U2) via SB149. I have checked this on a oscilloscope. But in the tutorial , in Section 2.1 Clock configuration Section , the screenshot shows the input frequency set to 16 MHz. As far i am aware this should be 8 , not 16 MHz. Can someone please confirm this?
I am using a STM32H723ZGT6. I am trying to Trigger an Input Capture on TIM1 Channel 1 by connecting to the output of the Comparator internally,but cannot get the TIM1 Configuration to fire the Input Capture Callback. I've turned on the input capture interrupt function and comparator. HAL_COMP_Start(&hcomp1); __HAL_TIM_SET_PRESCALER(&htim1, 275-1); HAL_TIM_IC_Start_IT(&htim1, TIM_CHANNEL_1); HAL_TIM_IC_Start_IT(&htim1, TIM_CHANNEL_2); The generated Config Code for the Comparator and the Timer are as follows. /* COMP1 init function */ void MX_COMP1_Init(void) { /* USER CODE BEGIN COMP1_Init 0 */ /* USER CODE END COMP1_Init 0 */ /* USER CODE BEGIN COMP1_Init 1 */ /* USER CODE END COMP1_Init 1 */ hcomp1.Instance = COMP1; hcomp1.Init.InvertingInput = COMP_INPUT_MINUS_1_2VREFINT; hcomp1.Init.NonInvertingInput = COMP_INPUT_PLUS_IO2; hcomp1.Init.OutputPol = COMP_OUTPUTPOL_NONINVERTED; hcomp1.Init.Hysteresis = COMP_HYSTERESIS_NONE; hcomp
HelloI am working in a project where I'm connecting 2 boards STM32 with FDCAN Bus, one board has all the sensors connected, and the other one receives the data, basically I send floats (measures of the sensors) and It is done!, but now, I would like to transmit from my second STM32 (receiver) to a Raspberry Pi 3 via Ethernet. Honestly, I don't know where to start or what configuratios should I try Thanks
Hello everyone,I’m currently working with the STM32H723ZG Nucleo board and am trying to interface microROS using UDP transport. I’m using the following environment:STM32CubeIDE: v1.16.1STM32Cube Firmware: H7 V1.11.2Toolchain: GNU Tools for STM32 (GCC 12.3.rel1)I’ve carefully reviewed several guides covering MPU, Ethernet, LWIP, and FreeRTOS configurations. I was able to get microROS working over USART (per the Micro_ROS guide), but when I attempt the UDP transport I encounter a hard fault. I’ve tried replicating setups from the STM32H723_Nucleo_ETH and LWIP_UDP_Echo_Server examples (generated by CubeMX), but they don’t work as expected.My project files are available here: tapererwaj/h723zg_microros_udpBelow, I have summarized my current configuration:MPU Configuration SCB_EnableICache(); SCB_EnableDCache(); /* Region 0: Ethernet DMA descriptors */ MPU_InitStruct.Enable = MPU_REGION_ENABLE; MPU_InitStruct.Number = MPU_REGION_NUMBER0; MPU_InitStruct.BaseAddress = 0x0; MPU_Ini
I am working with STM32 U575/U5A5 series of STM32 controllers in low power mode. I have programmed the controller to enter into Stop 3 mode and wake from stop3 mode based on wakeup Pin(High on PF2). With this implementation issue what we observed is once immediately flashing hex file into controller using STlink programmer, Controller is entering in stop3 mode but it is not waking up from stop3 mode even after low to high transistion on wakeUp pin(PF2). If I remove the power and connect it back, it is working as expected enterning into stop mode 3 and waking up from stop mode 3 on low to high transistion on wakeUp pin(PF2) all the time. The question here is why for the first time after flashing hex file into controller, entering into stop3 mode but not waking up from stop3 mode and requires power reset?low power mode is configured as follows:void LowPowerInit(){ LL_RCC_SetClkAfterWakeFromStop(RCC_STOP_WAKEUPCLOCK_SELECTED); __HAL_RCC_PW
Dear all,I'm encountering a strange issue with the STM32N657.I have a very simple test application that successfully turns on an LED — everything works as expected.Now, I need to switch the stack and enable the PSP. To do so, I’m using the following code:uint8_t PSPstack[800] __attribute__((aligned(8))); __set_PSP((uint32_t)(PSPstack + sizeof(PSPstack))); __set_CONTROL(__get_CONTROL() | 0x2); // Set SPSEL = 1 to use PSP __asm volatile ("isb"); However, as soon as I execute this code — specifically the line setting CONTROL to 0x2 — the system enters an exception (likely a fault handler), and execution stops.Do you have any idea how to debug this or what could be going wrong?Thanks in advance for your help.Kind regards,Edo
I am using TouchGFX to design GUI, and I want to use a dynamic bitmap to show an image captured by the camera. The camera is about 600*480 size. But I set the CacheAddress as following, and It turns out that the GUI cannot run properly. Is there any problem with it? uint16_t* const cacheStartAddr = (uint16_t *)0xC0008000;const uint32_t cacheSize_own = 0x100000; //1 MB, as exampleBitmap::setCache(cacheStartAddr, cacheSize_own, 1);
Hi everyone!I'm working on USB MSC implementation on STM32U0 series MCU with W25Q32JV (NOR Flash) by using USBX + ThreadX.W25Q32 Memory organization:- It has 64 blocks and each block is of size 64KB- Each block has 16 sectors and each sector is of size 4KB (Total 1024 sectors)- Each sector has 16 pages and each page is of size 256B (Total 16384 pages)- Total size of flash memory = 4MBI've already created and mounted a file system in W25Q32 using FatFS library. Also created one folder with one text file in it. Then, using USBX I tried to implement the MSC and till now I'm able to achieve these things:1) My laptop (USB Host) is able to detect the device i.e MCU as "USB Mass Storage Device" (in the Device Manager -> USB controllers) and "AzureRTO USBX storage dev USB Device" (in the Device Manager -> Disk drives)2) Coming to the capacity information of this disk, it is showing correctly as 4MB but the volume of the Drive (D:) as 2MB. And when I open the Properties of this Drive
Hello,I have an STM32F429 project with a 1PPS input (PA0) and a 10Mhz oscillator (PB3) a PWM output (PA1), I can't get a value in my Timer2 it's always at 0, I don't see where my mistake is, can someone help me?Attached file (.zip)Thanks you all.Sébastien.
I designed a custom board using the STM32H725ZGT3. The references I followed include the datasheet, application note AN5419, and the STM32H745ZIT6 Nucleo board design, among others. After powering up the board, I was able to connect to it via ST-Link using STM32CubeProgrammer, and successfully uploaded a simple blink code using STM32CubeIDE. The code worked, and the LED started blinking. However, after a power cycle (i.e., turning the main power off and on again), the board stopped running the code, and the LED no longer blinked. I tried reconnecting with STM32CubeProgrammer, but I received a "Target not found" error. After that, I connected the BOOT pin to 3.3V. This allowed me to connect to the board again using STM32CubeProgrammer, but I couldn’t upload code using STM32CubeIDE. I then changed a setting in the CubeIDE: System Core → RCC → Parameter Settings → Power Parameters → PWR_LDO_SUPPLY After this change, I was able to successfully upload the code. Howe
I am trying to get USBX Device MSC to work in Standalone mode (without RTOS) on Stm32u083mc microcontroller. However, I am interested in configuring an external Flash as a mass storage device. i am using the same clock frequency of HID standalone example which i referred from official STM32U0 Work shop tutorial from youtube. Now i am planning for mass storage class, i am defining pool_size and stack_size is from app_usbx_device.h file #define UX_DEVICE_APP_MEM_POOL_SIZE (10*1024)#define USBX_DEVICE_MEMORY_STACK_SIZE (10*1024).from MX_USBX_Device_Init() function i am getting usbd_ok. before returing i am calling these function USBX_APP_Device_Init(); VOID USBX_APP_Device_Init(VOID){MX_USB_PCD_Init(); // Endpoint 0 (Control)HAL_PCDEx_PMAConfig(&hpcd_USB_DRD_FS, 0x00, PCD_SNG_BUF, 0x00); // EP0 OUT at PMA offset 0x00HAL_PCDEx_PMAConfig(&hpcd_USB_DRD_FS, 0x80, PCD_SNG_BUF, 0x40); // EP0 IN at PMA offset 0x40 // Endpoint 1 (MSC Bulk)HAL_PCDEx_PMAConfig(
Hi, I am trying to create an online angular velocity controller where my torque is dependent on the angular velocity of the motor (motor being driven by the plant). Basically, I want to resist the movement from the plant in a way that keeps the control loop passivity. My torque control loop is running at a 1 ms interval. The issue is that the encoder feedback loop from STM's motor control, generated mc_tasks is running at 1 ms as well. I am running into bandwidth issues here and need to increase the rate of the encoder feedback loop. Is there a way to reliably do this? I have doubled the rate by editing drive_parameters.h to set the SPEED_LOOP_FREQUENCY_HZ to 2000 instead of 1000. SYS_TICK_FREQUENCY is at 2000 so I am limited here to 2000. At the end of the day I guess I am wondering about how I can increase my frequency reliably, and learn about if there are drawbacks to doing so. For reference, I am using a quadrature encoder encoder.
Hi,I have been working on STM32F4 discovery board, I have developed Bootloader Code. There is 2 option to jump to application that includes blinking led app. First button interrupt runs perfectly, i mean hal_delay() runing with no issue.Second option is, if UART interrupt gets the jump command and address from my computer. In this situation it jumps to application and leds are turn on but not blinking because of hal_delay() func (i guess). In 2 option before the jump func if i use hal_delay() , it crahs also.
Hi, I am working on a project and having the following problem:My UART DMA is not working. I am transmitting a string, that should be visible in the terminal but it is not. The TX complete callback function is being triggered, so it looks like it works but there is nothing in the terminal. Previously, I was using UART without DMA and things were working fine. It confirms that the hardware connections and the VCP connections are correctly set up. What I have done so far: - I enabled UART2, tested UART (without DMA). It worked well. - I enabled DMA which gave me: - Then I set up GPDMA1 for huart2_TX and huart2_RX. My TX configs are: My main function: int main(void) { HAL_Init(); SystemClock_Config(); MX_GPIO_Init(); MX_GPDMA1_Init(); MX_ICACHE_Init(); MX_USART2_UART_Init(); /* Infinite loop */ while (1) { static uint32_t counter = 0; sprintf((char *)pTxBuff, "Count: %lu\r\n", counter++); if (huart2.gState == HAL_UART_STATE_READY) { HAL_UART_Tran
Product: STM32F401VET6Firmware Package: STM32Cube_FW_F4 V1.28.0Tool: STM32CubeIDE (latest version)Description:Hi!I’m currently working on a USB CDC device project using the STM32F401VET6 microcontroller with the STM32Cube_FW_F4 firmware package (V1.28.0) in STM32CubeIDE.I have encountered a series of issues when enabling USB_DEVICE with the CDC class. Specifically:The generated project fails to compile due to errors, such as USBD_ClassTypeDef being undefined in some modules (e.g., usbd_ioreq.h), even though usbd_def.h is included and USBD_ClassTypeDef is defined in usbd_def.h.The structure USBD_HandleTypeDef is not recognized in some compilation units, leading to cascading errors.There seem to be conflicts or inconsistencies when including usbd_def.h, especially between header files like usbd_ctlreq.c, usbd_core.c, and usbd_ioreq.c.Even after ensuring all relevant include paths (e.g., Middlewares/ST/...) are configured correctly in the project, the problem persists.I found t
I am trying to get the RTC alarm working whilst also using a periodic wake, I can get each working independently but not both together.If I DON'T shutdown for RTC wakeup, the RTC alarm DOES work.If I DO shutdown for RTC wakeup, the RTC alarm DOES NOT work.To summarize:I am trying to use RTC Alarm for a shutdown in 1 minuteBut I've also configured an RTC Wakeup Timer to wake every 5 secondsAfter shutdown, RTC Wakeup Timer works — but RTC Alarm doesn'tWhen I re-call MX_RTC_Init(), the Alarm is lostBelow is the function I call to shutdown the mcu for 5 seconds, before waking up again...void shutdownRun (void){ /* The Following Wakeup sequence is highly recommended prior to each Standby mode entry mainly when using more than one wakeup source this is to not miss any wakeup event. - Disable all used wakeup sources, - Clear all related wakeup flags, - Re-enable all used wakeup sources, - Enter the shutdown mode. */ // Save pressure before shutdwon HAL_RTCEx_BKUPWrite(&hrt
I want to interface NHD-2.7-12864WDW3 OLED display having SSD1322 controller with STM32F407G-DISC1.I am doing 3 wire SPI Communication, So i have connected all 20 PINS as follows:Pin1 ---> GNDPin2 ---> 3VPin3 ---> NC (No connection)Pin4 ---> PD9 (DC; GPIO_Output, assigned by cubeide) Pin5 ---> GNDPin6 ---> GNDPin7 ---> PA5 (SCLK; SPI1_SCK, assigned by coubide)Pin8 ---> PA7 (SDIN; SPI1_MOSI, assigned by coubide)Pin9 ---> NC (No connection)Pin10 ---> GNDPin11 ---> GNDPin12 ---> GNDPin13 ---> GNDPin14 ---> GNDPin15 ---> NC (No connection)Pin16 ---> PB12 (RES; GPIO_Output, assigned by cubeide) Pin17 ---> PB13 (CS; GPIO_Output, assigned by cubeide) Pin18 ---> PB14 (SHDN; GPIO_Output, assigned by cubeide) Pin19 ---> PB15 (BS1; GPIO_Output, assigned by cubeide) Pin20 ---> PD8 (BS0; GPIO_Output, assigned by cubeide) After flashing the code into the STM32F407G-DISC1 board, OLED displa
Hello Everybody,MCSDK:6.3.2CubeMX: 6.1.4Workbench : 6.3.2 I want to test the motor first with the open loop APIs. I follow the instructions of the user mannual and write the code as follows:My question is: I captured the U, V, and W three-phase waveforms using an oscilloscope and found that the duty cycle settings are correct. However, the waveforms remain stuck in only one section (they never change) and fail to drive the motor through all six sections. Could you help analyze what might be causing this issue? Thanks!
Hi ! I'm working on a STM32F429VET, with keil as an IDE. My problem is the next, this code which is NOT reached (because it need a command from the terminal to be). Make my entire program crash in contact of loop, causing an IACCVIOL if i let this part of the code commented, works fine if i uncomment it. Anybody have encounter similiar behavior ? I dont get it at all.void adc_measure(uint16_t channel, uint8_t *result) { measureInProgress = true; adc_init(channel); HAL_TIM_Base_Start_IT(&htim2); // while (measure_pending_count < NB_MEASURES) // { // // adc_read(); // __disable_irq(); // Prevent race condition // measure_pending_count++; // __enable_irq(); // // } HAL_ADC_Stop(&hadc1); float measure = adc_compute_value(channel); // convert the value toward needed unit (mA or V) //snprintf((char *)result, RESULT_PRECISION, "%f", measure); }
I am currently writing code for the EVLServo1 board using function calls to control the motor and send information about the motor back to a STM32H735G-DK discovery board using the FDCAN bus. Everything seems to be working really well and I am sending back the measured speed of the motor, Iq, and power using the following function calls from the mc_api.c file:MC_GetMecSpeedAverageMotor1() - Measured speedMC_GetIqdMotor1_F() - IqMC_GetAveragePowerMotor_F() - PowerIn the Motor Pilot software it also shows the temperature of the heatsink as measured by the NTC Thermistor on the board inverter board of the EVLServo1 kit. I'd really like to be able to report this back to the STM32H735G-DK so I can display it on the screen along with the other info, however, I don't see a function call that will return this information. Is there a function call in another file within the project I can use? Is there some other method for doing this?
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.