Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi,I have a custom developed stm32 project with stm32f411ret6 mcu, i have done my full board and got the pcb printed. I have a 4 pin header on my pcb with vcc,gnd, swdio, swclk for uploading the bootloader for the first time. I have done this several time earlier successfully with stlink/v2 programmer, but now it shows the error(image 3 at bottom): Next I bought a stm32f446 nucleo board and tried with the onboard stlink by removing both the jumpers to program this mcu on the custom pcb, still stlink does not connect. On my pcb header 3.3v power is also coming successfully I have checked it too. Also, my boot pin and nrst is connected on custom pcb like this: under both stlink connection methods i am getting this error, trying to solve these for many days and getting the same connection issue as follows, please help me,
Hi, Im using my own I2C library but after i write the device adress when i receive SB interrupt the adress bit never seems to be set to 1. I have tried testing it with HAL and it seems to work fine. I would be happy if someone could helpvoid I2C_EventInterruptHandler(I2C_Com* i2c) { uint8_t temp; //Check if event interrupt bit is set if(I2C_CheckBitStatus(&i2c->i2cReg->I2C_CR2, 9)) { //Start condition if(I2C_CheckBitStatus(&i2c->i2cReg->I2C_SR1, 0)) { temp = i2c->i2cReg->I2C_SR1; i2c->i2cReg->I2C_DR = i2c->deviceAddress; } //Check for address sent if(I2C_CheckBitStatus(&i2c->i2cReg->I2C_SR1, 1)) { //Check if its in read mode and if rxLegth is 1 if(i2c->deviceAddress & 1 && i2c->rxLength == 1) { //Disable ack i2c->i2cReg->I2C_CR1 &= ~(1 << 10); i2c->i2cReg->I2C_CR1 |= (1 << 9); } temp = i2c->i2cReg->I2C_SR1; temp = i2c->i2cReg->
Hi,I recently bought two NUCLEO-WL55JC1 boards and was testing the SubGHz_Phy_PingPong example to establish communication between them. Everything was working fine at first, but at some point (I’m not sure if I changed anything), one of the boards stopped being recognized by STM32CubeIDE when trying to debug.The error message is:"Target no device found. Error in initializing ST-LINK device. Reason: No device found on target."When I connect the board to the PC via USB, it is detected, but a FAIL.TXT file appears with the message:"The interface firmware FAILED to reset/halt the target MCU".I know the firmware is still loaded because, when powered, this board still sends messages that are received by the other one (which works normally).The jumpers on both boards are configured the same way, and I have tried debugging through both USB and SWD without success.Is there a way to make STM32CubeIDE detect the board again? What could be the cause of this issue?Thanks in advance for your support
After adding many text fields, resources, and typographies to a screen, I went to compile and was met with errors that generated base classes were using text IDs that did not exist. The text ID's had been added to the source files for the containers they were used in, but not to the header file or TEXTS enum.In an attempt to "clean" the project I deleted the contents of the TouchGFX/generated folder. The designer regenerates source files, but generated/texts/include/texts is empty. I have tried to add/remove resources in the designer so it would detect changes in the spreadsheet without any luck. With an empty folder my compile errors are now:../TouchGFX/target/generated/TouchGFXConfiguration.cpp:17:10: fatal error: texts/TypedTextDatabase.hpp: No such file or directory #include <texts/TypedTextDatabase.hpp> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~How can I force the designer to regenerate these files?
Hello STM32 Community,I'm having trouble getting UART communication working on my NUCLEO-L4R5ZI-P board and would appreciate any guidance.Board Details:NUCLEO-L4R5ZI-P with STM32L4R5ZIT6PUST-Link firmware updated to the latest versionProgramming/debugging works fineLED control works perfectlyProblem: No UART output appears in any terminal program, despite testing multiple configurations. The virtual COM port is detected by both macOS and Windows, but no TX activity occurs (TX indicator never lights up in terminal programs).What I've Tested:USART2 on PD5/PD6 (as shown in STM32CubeIDE pin configuration)USART3 on PD8/PD9 (based on datasheet D0/D1 assignments)LPUART1 on PG7/PG8 (documented as virtual COM port option)USART2 on PA2/PA3 (standard NUCLEO configuration)Multiple alternate function mappings (AF7, AF8)Different baud rates (9600, 38400, 115200)Tested on both Mac (CoolTerm) and Windows (PuTTY)Hardware Verification:Solder bridges SB130 and SB131 have resistors (closed)GPIO test on PD
Good day I am having many troubles with implementing FUOTA on my Dev kit. Firstly, I have downloaded the STM32Cube_FW_WL_V1.3.1 firmware. When i edit the script files to build using the latest cube ide (1.19.0) the build fails with many errors. I then downgraded to V1.17.0 and changed my script file. The Lorawan FUota single core project was able to build and i was able to flash it to my device. When i attempt fuota on my nucleo-wl55jc1 device everything happens as expected. However, When the device switches from class A to Class C and begins to receive fragments I encounter a hard fault: The server continues to send fragments but the device has essentially stopped. I did deep dive online and found that this is a known issue:https://community.st.com/t5/stm32-mcus-wireless/stm32wl-fuota-single-core-not-working-on-fw-wl-v1-3-0-in-eu868/m-p/608263 Please could you add this to my enquiry I am losing hope that I may get FUOTA working. Kind
I think from what I've read this should be possible, but before diving into the details and trying to make it work I'm hoping someone can just give me a yes/no answer for this question. Basically, what I'm trying to do is use DMA to send a block of SPI data and when that block is done start another DMA transfer on another channel sending a very short block of data to a GPIO port BSRR register to toggle some I/O pins and when that block is done restart the first DMA transfer of SPI data. The idea is that the SPI data followed by the toggling of a few I/O pins (all on the same GPIO port, through a sequence) in an infinite high speed loop. Can MDMA be used to make this happen on an STM32 micro?Thanks.
Hi ST team, I am working on STM32WL55JC1. I am trying to enable the HSE external crystal oscillator, but it never starts.In firmware, I configure RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; and set HSEState = RCC_HSE_ON. After enabling, I confirmed that HSEON set, however HSERDY flag in RCC->CR never becomes set.I have tried:Both Crystal/Ceramic Resonator mode and Bypass mode in CubeMX. In Bypass mode with external clock it works but in Crystal mode failed.Using HAL_RCC_OscConfig() followed by HAL_RCC_ClockConfig().Forcing HSE output on MCO pin (PA8) → no signal observed.Hardware Verification Done:External 32 MHz crystal (NX2016SA-32M-EXS00A) with correct load capacitors (as per datasheet).Verified soldering, power rails, and grounding.Crystal reference design followed exactly (same as ST Nucleo-WL55 board).Supply voltage and decoupling capacitors confirmed OK.Attempts Made:Full chip erase + reflash minimal firmware that just enables HSE and outputs it on MCO.Che
I acquired a Utility to display simple text on a display with the STM32H743 using the attached LCD driver Utility files from ST MCD Application Team. I would like to also use this on my bootloader for the STM32H563, does anyone have the files to be able to use this with the STM32H5xx and ST7789V LCD? The STM32H743 has stm32h7xx_lcd.h/.c files that I had found for that micro that supports LTDC, the H5 does not have LTDC and I'm using an SPI interface to the ST7789V LCD display. The stm32_lcd.c/.h files use the following BSB functions that I need to support for the STM32H5xx, I have the driver files for the ST7789V as I'm already using this display with TouchGFX for the application, but for the bootloader just need to display lines of text using UTIL_LCD_DisplayStringAtNextLine() with this utility. BSP_LCD_DrawBitmapBSP_LCD_DrawHLineBSP_LCD_DrawVLineBSP_LCD_FillRectBSP_LCD_ReadPixelBSP_LCD_WritePixelBSP_LCD_GetXSizeBSP_LCD_GetYSizeBSP_LCD_SetActiveLayer
Hello,We are working with an STM32F03 and an ECS-320-8-37B-CKY-TR 32 MHz crystal (CL = 8 pF).Our earlier design used an 8 MHz crystal (CL = 8 pF) with 4 pF load capacitors and a 5.1 kΩ series resistor. After switching to the 32 MHz crystal, the HSE no longer starts. This sparked criticism about the correct component values depending on the crystal used.Here are some results from my testing with 32 MHz + 5.1 kΩ:Startup works reliably at ~0 Ω and ~1 kΩMarginal at ~1.5 kΩFails at ≥2 kΩBased on the ECS-320 datasheet (CL = 8 pF, and estimated ~3 pF stray), the correct load capacitors should be ~10 pF each, not 4 pF.Where we are unsure is the interpretation of AN2867:Harmonic suppression (§3.5.3): Formula Rext = 1/(2πfCL²) → ~1.2 kΩ at 32 MHz with 4 pF loads, which matches our *failing* results.Drive level trimming (§3.3): Says to use Rext = 0 Ω unless the drive exceeds the crystal spec. We don’t have low-C probes to measure the drive directly.Empirical: Anything in the hundre
Hi, Dear STM experts:I used MCSDK6.3.2 HSO for BLDC control when porting from stm32Q473 to stm32f405, but when using void IMPEDCORR_setLs_si(IMPEDCORR_Handle pHandle, const float_t Ls_H); A hardware failure occurred during the function, and the possibility of external parameter input has been ruled out. Therefore, I would like to confirm again that the libImpedCorr. a library file must rely on the stm32Q47x chip to run?If necessary, then I can only give up the transplant.Hope to receive a reply。Best Regards.
I am using NUCLEO-WL55JC1 to use LoRa communication. And I add acceleration sensor of LSM6DSOX to this board and I want to get acceleration data while communicating LoRa. But I could not get correct acceleration value. And I could get correct acceleration value when I comment out MX_LoRaWAN_Process() in main.c. So It seems that acceleration sensor doesn't work when LoRa is enable. Do you know why and could you give me advices of this issue.
[PN]: STSPIN32G4[VERSION]: 6.4.1[TOOL]: Motor Control Workbench[DETAILS]:In this design, both motors sit with all motor phases at Vmotor, despite specifiying high side off in Motor control workshop. All six high side drivers are turned on and stay on until a motor start command is sent. Interestingly, by default the drive signals read PE8 to PE13 all read back as zero in the GPIOE IDR register, but the outputs GHS1, GHS2, GHS3 are all at VM voltage and GLS1, GLS2 GLS3 are all at 0V.When the PWM signal starts, the high side FET does not seem to switch off fully as the low side FET is turned on and a fault current is detected. Sometimes the fault current is just low enough to allow the motor to start. See attached picture.[EXPECTED BEHAVIOR]: The Hi side FETs should be turned off in the default state, (maybe even the Low side could be turned on?)[HOW TO REPRODUCE]: Compile and run. default state is visible.
Hello Everyone,I'm using an STM32L496 (1MB of flash) with an MT25QL128A external flash memory (16MB) for graphics assets in my TouchGFX application. I'm finding that I'm running out of code memory (the memory on board the STM32, not the memory on the external flash - that has plenty of room left). I've got all of my normal TouchGFX graphics assets (texts, fonts, graphics) going onto the external flash as per typical TouchGFX setup, but I've still at 93% usage on the STM's internal flash. I believe this is mostly due that high number of screens. Is there any way to move all or most of the GUI code (view and presenter code) into external memory as well?
Hello Community, I am using 2 function calls __LL_ADC_CALC_VREFANALOG_VOLTAGE();__LL_ADC_CALC_TEMPERATURE_FLOAT();My implementation:uhADCxConvertedData_VrefAnalog_mVolt = __LL_ADC_CALC_VREFANALOG_VOLTAGE(aADCxConvertedData[1], LL_ADC_RESOLUTION_12B);temperature = __LL_ADC_CALC_TEMPERATURE_FLOAT(uhADCxConvertedData_VrefAnalog_mVolt, aADCxConvertedData[2], LL_ADC_RESOLUTION_12B); I am seeing the above macros not respond and there is a hard-fault whenever I call the above functions. Any help would be appreciated. Thank you
Hello,I am trying to use the GPDMA linked list on an STM32U5 to toggle seven chip-select GPIOs before and after SPI transfers.Setup:MCU: STM32U575ZITXI build a linked list of nodes:Write CSx_Pin to GPIOx->BRR (drive CS low)Dummy delay node (memory→memory)Write CSx_Pin to GPIOx->BSRR (drive CS high)word width, DataSize = 4, SrcInc = FIXED, DstInc = FIXED.Destination addresses are the GPIO BSRR/BRR registers.Problem:Only 3 out of 7 chip-select pins actually toggle when the DMA queue runs. The working pins are:PE3PE1PB6The non-working ones are on GPIOG (PG9, PG11, PG13) and PB8.If I write to these pins directly from the CPU with HAL_GPIO_WritePin, they work correctly. Only DMA writes fail.Questions:Are all GPIO ports on STM32U5 supposed to be reachable by the GPDMA?Is there a known limitation where certain GPIO ports (e.g. GPIOG) cannot be written by DMA?Any clarification on which GPIO ports are DMA-accessible would be appreciated.Thank you.Linked List Setup Code :#define ADC_COUNT
Hello,I have custom hardware with a WB55 on it that I'm trying to use as a client, I've chosen the P2PClient profile for this board.I also have a Nucleo-WB55 board that is configured as my server, Server Profile with a Custom Template. The custom template has one characteristic that is a variable length CHAR_PROP_NOTIFY.Modifying the app_ble.c and I can successfully connect to the Nucleo-WB55 board using the full name as can be seen in the code below. /* search AD TYPE 0x09 (Complete Local Name) */ /* search AD Type 0x02 (16 bits UUIDS) */ if (event_type == ADV_IND) { /* ISOLATION OF BD ADDRESS AND LOCAL NAME */ while(k < event_data_size) { adlength = adv_report_data[k]; adtype = adv_report_data[k + 1]; switch (adtype) { case AD_TYPE_FLAGS: /* now get flags */ /* USER CODE BEGIN AD_TYPE_FLAGS */ /* USER CODE END AD_TYPE_FLAGS */ break; case AD_TYPE_TX_POWER_LEVEL: /* Tx power level */ /* USER CODE BEGIN AD_TYPE_TX_POWER_LEVEL */ //int RSSI = (int8_t)*(ui
STM32G473 via SPI I have most of the other commands working, but the Get Checksum command (0xA1) fails to return an ACK when I send the CRC init value. I am using the default CRC configuration:#define DEFAULT_CRC32_POLY 0x04C11DB7U#define DEFAULT_CRC_INITVALUE 0xFFFFFFFFU It accepts the command, start address, memory size, and polynomial, then fails on the init value.I haven't found any documentation that indicates what init value is accepted on this MCU, but I do find it hard to believe it does not accept the default init value from the HAL itself.
Hi to all, I'm trying to use EVSPIN948 with stepper motor. I bought the demo board EVSPIN948 and STM32F401 to use EVSPIN Studio 2.0.1 and all is fine. Anyone can tell me where can i find the source ioc / project of demo firmware use to move the motor from evspin studio? I find only the binary file and not the source. Thanks a lot.
Hi all, I'm using Nucleo H755 I have configured UART with 115200 baud rate and the Rx in Interrupt mode issue: While the STM is configured with 115200 baud rates, when I transmit some data with the same baud rate either the data is corrupted or data is not read/ transmitted, if I reduce the baud rate of the other device by 3 times the baud rate set in ST the Data is read properly. if anyone have any solution regarding this issue, please let me know in this thread I have checked with different STM ide versions, different H755 boards I'm facing this same issue also, I have checked with H723 which is working fine for the same setup. there are different issues with the H755 boards. also, if anyone from STM team finds this message I'm also facing a issue while reconfiguring the ioc file from cube ide some pins get reset every time If any other details required, please feel free to ping me
Hello,I'm trying to figure out why setting the MTU stops the ACI_ATT_READ_BY_GROUP_TYPE_RESP_VSEVT_CODE event from ever firing. This essentially breaks everything.case HCI_LE_CONNECTION_COMPLETE_SUBEVT_CODE: /* USER CODE BEGIN EVT_LE_CONN_COMPLETE */ hci_le_set_data_length(tpms_handleNotification.ConnectionHandle, /*tx_octets*/251, /*tx_time*/2120); tBleStatus result = aci_gatt_exchange_config(tpms_handleNotification.ConnectionHandle); if(result != BLE_STATUS_SUCCESS) { APP_DBG_MSG("\r\n\r** MTU failed to set.\n\r"); } /* USER CODE END EVT_LE_CONN_COMPLETE */ /** * The connection is done, */ connection_complete_event = (hci_le_connection_complete_event_rp0 *) meta_evt->data; BleApplicationContext.BleApplicationContext_legacy.connectionHandle = connection_complete_event->Connection_Handle; BleApplicationContext.Device_Connection_Status = APP_BLE_CONNECTED_CLIENT; /* CONNECTION WITH CLIENT */ APP_DBG_MSG("\r\n\r** CONNECTION COMPLETE EVENT WIT
I have a custom stm32f746 project. Touchgfx main app is working. LCD is 800x480I developed a bootloader that is also working.Now just want minimum necessary peripherals to allow simple TEXT output to LCD to show bootloader status. Trying to keep bootloader to ~64k, so no TouchGFX.But, I have setup FMC, MPU, and LTDC similar to the main TouchGFX app.I am able to print 3 colored bars to the screen: uint16_t *fb = (uint16_t*)0xC0000000; // RGB565 view const int W = 800, H = 480; for (int y = 0; y < H; ++y) { uint16_t color = (y < H/3) ? 0xF800 : // Red (y < 2*H/3) ? 0x07E0 : // Green 0x001F; // Blue for (int x = 0; x < W; ++x) fb[y*W + x] = color; }Then when I try to print a smaller green box, it still fills across the width of the screen, distorted, and does not go from 40,320?: for (int y = 40; y < 120; ++y) for (int x = 40; x < 320; ++x) fb[y*800 + x] = 0x07E0;Then when I try to write text I get a thin fluctuating li
Hello everybody,in our application, we want to avoid using the ADC software calibration procedure (not even once).We hence think about writing a fixed value to the Calibration register CALFACT as we saw that most of the times the calib value is very close to 64 (half of the 7-bit range).We can accept a comparably high offset error of the ADC (+-12LSB at 12 bit) and from our measurements so far we think we can work without calibration, however we cannot find any worst-case offset values for the uncalibrated ADC anywhere. So our questions are:Can you confirm that 64 is the somewhat "neutral" value for CALFACT?Where can I find the worst case offset error of the ADC without calibration? Best regards and thank you very much in advanceSamuel
Using H743 ETH example from how-to-create-a-project-for-stm32h7-with-ethernet-and-lwip-stack .I want to use jumbo frames to avoid IP fragmentation while streaming audio via UDP. So, no jumbo frames have to be received. I only care about transmitting.Below is my StartDefaultTask function, which is called in main(). Normal transmissions under 1500bytes MTU work fine when MAX_UDP_PAYLOAD_SIZE is adjusted.I understand work needs to be done. I've tried changing buffer sizes and adjusting values in low_level_init(), but I'm unable to get it to work.Currently, with ^^ at 2000bytes the debugger ends up here: void StartDefaultTask(void *argument) { /* init code for LWIP */ MX_LWIP_Init(); /* USER CODE BEGIN 5 */ #define MAX_UDP_PAYLOAD_SIZE 2000 uint8_t large_data[MAX_UDP_PAYLOAD_SIZE]; const char* message1 = "Hello UDP message!\n\r"; osDelay(1000); ip_addr_t PC_IPADDR; IP_ADDR4(&PC_IPADDR, 192, 168, 1, 1); struct udp_pcb* my_udp = udp_new(); udp_connect(
In the RM for the H743 there is little information about using IO cell compensation aimed at reducing noise on VDD and EMI radiated.Posts show the following calls to active:-__HAL_RCC_CSI_ENABLE();__HAL_RCC_SYSCFG_CLK_ENABLE();HAL_EnableCompensationCell();The RM briefly mentions values for PMOS and NMOS transistors to presumably control slew rates, but I cannot find any data on how to determine the bit values.There is a function, HAL_SYSCFG_CompensationCodeSelect(), but again there are no examples of its use. Google also shows no example code!I have tested the sample code posted on this forum but it does nothing noticeable to reduce noise on the VDD line.Is more information available about how to reduce noise via slew rate adjustment?Hello STM staff, is there anybody out there?
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.