Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hello Everybody,Here are the software and boards in this case:1. MC workbench 6.3.22. NUCLEO-F401RE3. X-NUCLEO-IHM08M1I try to use the boards to obtain motor parameters. Now I got the result as illustrated in the picture? Should I set the parameter "placement electrical angle" to 131? Thank you!
Dear ForumIm using the SPI of STM32 H7 43ZI.-In master mode,full duplex, not problem: Transmit and receive data precisely, up to 2Mbit/sec (limits come from cable lenght) .Each pack is 24 bytes.-In slave mode, this is what i do (master at 200Kbit/sec): a)FIFO LEVEL=2 BYTES b)Master send 2 bytes . The STM32 Slave Receive this 2 byte , and INT roudine is activate c) save in a buffer , and load 2 byte to be TX.And repeat, up to 24 bytes. Problem is: * I get 24bytes ok *no data are trasmitted.. MISO is fix to low The simplified version of code is this: //SPI3 Slave uint8_t *p_TXDR_SPI3= &(SPI3->TXDR); uint8_t *p_RXDR_SPI3= &(SPI3->RXDR); void INT_SPI_3_RXTX_8BIT(SPI_HandleTypeDef *hspi3) { if ( ( (SPI3->SR ) & ( SPI_FLAG_RXP) )!=0) { //Save the RX data ArrGenRx[IndRx]=*p_RXDR_SPI3; IndRx++; ArrGenRx[IndRx]=*p_RXDR_SPI3; IndRx++; Len_Data=Len_Data-2; /
Want to incorporate LwIP_UDP_Echo_Server example code for NUCELO-H723ZG with another project which has ADC, DMA, and timer system setup for sampling data. Issue is there is no .ioc file for the example code and when trying to look into the code manually for the parameters to feed into cubeMX when trying to configure a new project, there was some values that were missing, and some that were showing up as invalid (even though when testing the example code it was working fine). A bit lost and have been spending a lot of time trying to identify how to go about this. Any help on this would be appreciated.
Hi,I have a lwIP implementation running on an STM32H723 using a CubeMX HAL implementation, so no OS-like stuff involved. In case of heavy outgoing traffic, it seems it is running low on memory at some point. This is not dramatic as tcp_write() knows an error-code ERR_MEM which would give the possibility to deal with that situation.Unfortunately it seems this error code is not used here. Instead of that, the system dies and ends up in HardFault_Handler() via following stacktrace:HardFault_Handler() at stm32h7xx_it.c:85 0x8002f04 <signal handler called>() at 0xffffffe9 mem_malloc() at mem.c:934 0x800d7fe pbuf_alloc() at pbuf.c:284 0x800e348 tcp_pbuf_prealloc() at tcp_out.c:263 0x801299a tcp_write() at tcp_out.c:610 0x8012e48 So...how can I change that? What do I have to do to let tcp_write() return with a proper error code instead of letting the whole system crash?Thanks!
As previously mentioned in the other post I am using the 2 stm32wb55rev6 controller.I have setted the initial node connected to the cube monitor (using the aci facilities menu) to sca mode.And set the pheripheral application running on the other board (BLE_p2p SERVER).In normal mobile app i am able to see the Ble p2p_server but while i am scanning in the transparent mode i am not able to see the p2p_server.This is the p2p_server that is showing in the app.This is the transparent mode peripheral (STM32WB) in the app while advertising.In the cube monitor p2p_server is ot showing.What is the issue?How to resolve this?
i am using the stm32wb55rev6.how can we able to drive the rf transmit mod external power amplifier (PB0) to control the rf.Is there any other things we should do in the cubemx other than enabling the rf?please share the document if it is there.
Hello All, I am planning to use and provide 8 languages support for my Touchgfx project, have anyone used it this way ? I am using STM32H7 series microcontroller for it. I am worried about the memory, Could you please let me know what things to consider and how much memory do I require to support for 8 languages in touchgfx ? How memory can be used and for what purpose for language support ? Regards, Shiv
I am using the Nucleo STM32U385rq development boards to create an I3C controller and a I3C target.I have the following scenario working:1) Controller assigns dynamic addresses.2) Target sends an in-band interrupt.3) Controller acknowledges the in-band interrupt.4) Target calls HAL_I3C_Tgt_Receive_IT with a size of 16 bytes.5) Controller calls HAL_I3C_Ctrl_Transmit_IT with a size of 16 bytes.6) After the controller received notification of the transmit completion, it starts a timer to do a read after a delay.6) Target receives the data and calls HAL_I3C_Tgt_Transmit_IT with a size of 16 bytes.7) Controller timer times out and calls HAL_I3C_Ctrl_Receive_IT with a size of 16 bytes.8) Target sends the data to the controller.There are a few issues with this sequence: a) There doesn't seem to be a way for the Target to be setup to handle a read or write at any time. The Target has to explicitly setup for one or the other and there are times where neither is se
Hi,i want to make a oscilloscope to show two data curve.I found the dynamicgraph can add many lines with different color.BUT i can only use the "addDataPoint" fuction to add one data at one time.So I set the two lines the different LineWidth.Just like this.These two lines show the same data,becuse the addDataPoint function can just input one variate.I want to know how can i draw multiple lines that show the different data in one dynamic graph?
Greetings, I am using STM32-L073RZ nucleo board for the testing of ADC watchdog and sleep mode. I want to keep my instrument in sleep mode and when ADC readings increased by few counts then I want to wake-up my controller. I have written below mentioned code but it seems like my controller is not getting into sleep mode. "uwTick" keeps increasing and ADC watchdog interrupt is not getting triggered. Also, there are no other interrupts in use. I have referred this other post and my settings are same as him but I am not using DMA. (Link) 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
Hi, For my application I need to output the same signal on 2 different IO Pins. I need to use a timer because the signal has to have extremely accurate timing. As a first iteration, I allocated 1 GPIO pin to TIM CH2 and the other GPIO Pin to TIM CH3. I then asked myself the question of why am I wasting a timer channel 3 (which I could desperately use for other things). If the 2 signals will always be the same, why not just take another GPIO pin and write set the alternate function regitsers also to TIM2 CH2, obviously that will then change the specific IO Pin. But that doesn't concern me at this stage of development. I then did this, and it works. I outputted the waveform from Timer 2 Channel 2 on two IO Pins simultaneously. I used Register Access level code to do this. For interest sake, I wanted to then change a IOC file in CubeIDE to do the same thing I mentioned above and it's impossible. CubeIDE prevents me from doing this using their IOC settings. I
Hello, I am working on a low-power STM32 system. In my original configuration I was running the core at 32 MHz (PLL from HSI16) with Voltage Scaling 1, and in this setup USB CDC worked without any issues. To reduce power consumption, I reconfigured the system to run the core at 16 MHz HSI (no PLL) while keeping Voltage Scaling 1. The USB clock source is HSI48. With this configuration, when connecting to a USB 3.0 host port, the device often crashes during enumeration. Sometimes it enumerates fine, but most of the time it fails. Interestingly, if I connect the device through a USB 2.0 hub, the problem does not appear. From my research, I found that: - USB 2.0 controllers are more tolerant and usually accept HSI48’s +/-1–2% drift. - USB 3.0 controllers are stricter, and if HSI48 drift exceeds +/-0.25%, CRC errors occur. This causes descriptors to get corrupted and Windows shows a crash or device not recognized. My question:What are the recommended ways to avoid this issue w
以上就是我配置的所有内容。您能指出我的配置有任何问题吗? edit (translated in English): Hello, I have configured the STM32C071KBT6 for USBX standalone mode. Attached are all the screenshots of my configuration. Could you please review and let me know if there are any issues with my configuration? Thank you.
Hello everyone,This is my first post here, so if there's anything wrong with the way I've formatted or presented it, please feel free to let me know.My current task involves switching from USB HOST to USB CDC. I used CubeMX to generate the necessary USB CDC-related files and integrated them into my original program.On my PC, the program works as expected and is recognized correctly as a COM port.However, on my coworkers' PCs, the device is not recognized as a COM port.Both our PC are win11, and after checking, win11 seems no longer requires the installation of the STM Virtual COM Port driver.Is there anything we can do to further clarify or resolve this issue?
Context (brief):Board: BMS that charges/discharges cells at 1–2 AMCU: STM32G474RET6 using HSI, 3× ADC, 1× DAC, USB FS (D+, D−), a few GPIOs.Constraint: Battery sense node carries an unavoidable ~20 MHz component from an external stim source (cannot eliminate at source).Goal: Accurate voltage sensing while keeping digital/USB activity and power-stage di/dt from polluting ADC/DAC/reference.What I need advice on (grounding only):Single solid plane vs split AGND/DGND:For STM32 with VSSA/VDDA and VSS/VDD, is the consensus to use one continuous GND plane (no hard moat) with functional partitioning—or do you still recommend a true AGND/DGND split in this use case (1–2 A BMS + ~20 MHz on the measured node)?If “single plane,” where do you prefer the AGND focus/tie—directly under/next to VSSA/VREF+ (shortest loop) versus a separate star just for the analog front end?If I were to have two separte ground planeWhat component should I connect to AGND, and DGND?: My assumption was that sin
Hello, I am trying to write code for a transmit and receive program in FDCAN (Classic Mode) , I have configured the PCLK1 as 170MHz, Can I select this PCLK1 as the FDCAN clock in the FDCAN Clock Mux?
1. [Part Number] STM32WL33CC12. [Environment] Windows OS, STM32CubeIDE version 1.18.0, Firmware package STM32Cube FW_WL3 V1.1.03. [Schematics] STM32 Nucleo-64 development board4. [Details] See below.5. [Expected behavior] When the device is woken up from deep sleep the LD2 turns on6. [How to reproduce] Run ST PWR_DEEPSTOP example7. [Occurrence] Consistent8. [Sanity checks] I have tried reading various registers to see if I can see a difference in behaviour.The following code is based on the ST PWR_DEEPSTOP example, with minor modifications, as indicated in the comments. However, it does not behave as expected.Ideally, after a power-on reset, the device should blink LD1 for 5 seconds before entering deep sleep. It appears to do so, as the debugger disconnects likely due to various peripherals shutting down to conserve power.The issue arises when the device is woken up by pressing the B1 button on the N
Hello,I am working on an STM32F746 project where I have implemented a bootloader.The setup is as follows:Application image is stored in external QSPI flash.Bootloader copies the image from QSPI to SDRAM (IS42S32400F at 0xC0000000).After copying, I set SCB->VTOR = 0xC0000000 and jump to the application Reset_Handler.The copy is verified: I have cross-checked the SDRAM contents with the QSPI image, and the data is copied correctly.I also created a test application that only sets a GPIO pin high (no SystemInit(), no HAL_Init(), no HAL_RCC_DeInit()).Even in this simple case, after the bootloader jumps to the reset handler, I get this error: Break at address "0x242" with no debug information available, or outside of program code.The Reset_Handler address from the SDRAM vector table is correct (e.g., 0xC00002B5), and VTOR is updated to 0xC0000000.But execution always ends up breaking at 0x242.Has anyone faced this issue when trying to execute code from SDRAM after copying from QSPI?A
Hi, i am using a STM32F411 for the first time and i am not familiar with the crystal oscillator schematic symbol provided by EasyEDA. Can someone validate this circuit and, eventually, poit out what's wrong plase? Any help would be apreciated
Hello, I am using firmware STM32CubeF1 v.1.8.6, the STM32Cube MCU Package for the STM32F1 series. The folder name in the Repository is STM32Cube_FW_F1_V1.8.6 (version 1.8.6).In order to stay current I downloaded the latest the patch for STM32CubeF1, which is v.1.8.6, see the screenshot below. To my surprise the downloaded zip file 'stm32cubef1-v1-8-6.zip' contains the initial version STM32Cube_FW_F1_V1.8.0. Question: is v1.8.0 the correct patch version for STM32CubeF1 v.1.8.6? It seems 'down rev'.Thank you for your response!
I want to use LAN9250 with STM32U585RITxQ (64pin package) controller using SPI/SQI interface as described in Microchip's datasheet.I find similar interface on STM32 as OctoSPI (using Quad SPI) and SDMMC which looks similar to me.So I don't know which one is the correct choice. I need to use it at as highest data rate as possible (so 4 bit bus...).Personally I don't think OctoSPI (using Quad SPI) is compatible with this as it is design for Memory. But I am not sure right now.Can anybody help me decide on this?
Hi,I need to enable wolfSSL to TCP/IP client and server program with LWIP stack without freeRTOS. How it can be done?. Need sample example for the same board.I'm attaching my code for which i need to enable wolfSSL.Thanks in advance.Thanks and Regards,Harshitha R
I using STM32duino to program the STM32F103C8T6. When I use the Seiral1 to communicate with a 4G, the data reveived exceeds 64 characters, data will lost. By using modify the following #defines, it does not working. I am appreciated if somebody could help. The folowing test prgram file is as following:#define SERIAL_RX_BUFFER_SIZE 1024#include <Arduino.h>char str[] = "config,netchaninfo,ok,tcp,uart,0,0,00,60,47.192.1.114,22004,0,,0,,0,,0,0";char *endptr;uint8_t uxBuffer[256] = {0};uint16_t uxLen = 0;uint8_t timeout = 20;uint8_t ux = 0;long long x64 = 869020060303565;long long x64_1 = 0;void setup(){ Serial.begin(115200); delay(5000); //int x = SERIAL_TX_BUFFER_SIZE; Serial.printf("SERIAL TX BUFFER SIZE = %d\n", SERIAL_TX_BUFFER_SIZE); Serial.printf("%s\n", str); Serial.printf("size of str = %d\n", sizeof(str));}void loop(){ if ( Serial.available()) { &n
Detail: I use CubeMX to create a CMake project and edit it in VSCode. My target MCU is STM32WBA54KGUx. I configured the STM32_WPAN, then clicked generate code. In VSCode, when I clicked the "build" button (or run task "Cmake: clean rebuild"), the build command returned an error of multiple definition. It turned out, the gcc build command linked two same file named "stm32wbaxx_ResetHandler_GCC.s.obj". Further investigation revealed that the "stm32wbaxx_ResetHandler_GCC.s" file located in /Projects/Common/WPAN/Startup/ is built twice:[build] [15/89] Building ASM object CMakeFiles/wba54_test.dir/Projects/Common/WPAN/Startup/stm32wbaxx_ResetHandler_GCC.s.obj[build] [81/89] Building ASM object cmake/stm32cubemx/CMakeFiles/Startup.dir/__/__/Projects/Common/WPAN/Startup/stm32wbaxx_ResetHandler_GCC.s.objTemporary Fix: Go to /cmake/stm32cubemx/CMakeLists.txt and comment out the "Startup" in the "# Project static libraries" section (around line 178). But CubeMX will overwrite it anyway when re-g
void HAL_UART_MspInit(UART_HandleTypeDef* huart) { GPIO_InitTypeDef GPIO_InitStruct = {0}; if(huart->Instance==USART2) { /* USER CODE BEGIN USART2_MspInit 0 */ /* USER CODE END USART2_MspInit 0 */ /* Peripheral clock enable */ __HAL_RCC_USART2_CLK_ENABLE(); __HAL_RCC_GPIOB_CLK_ENABLE(); /**USART2 GPIO Configuration PB6 ------> USART2_TX PB7 ------> USART2_RX */ GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; GPIO_InitStruct.Alternate = GPIO_AF0_USART2; HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); /* USART2 DMA Init */ /* USART2_RX Init */ hdma_usart2_rx.Instance = DMA1_Channel3;// DMA1_Channel5 work hdma_usart2_rx.Init.Request = DMA_REQUEST_4; hdma_usart2_rx.Init.Direction = DMA_PERIPH_TO_MEMORY; hdma_usart2_rx.Init.PeriphInc = DMA_PINC_DISABLE; hdma_usart2_rx.Init.MemInc = DMA_MINC_ENABLE; hdma_usart2_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE
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.