Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
hello,I encountered a problem while developing for stm32u585.I change the iwdg reload value by HAL_IWDG_Init(), and then HAL_PWR_EnterSTANDBYMode(), but the new reload value does not take effect: hiwdg.Instance = IWDG; hiwdg.Init.Prescaler = IWDG_PRESCALER_64; hiwdg.Init.Window = 4095; hiwdg.Init.Reload = 3600; hiwdg.Init.EWI = 0; HAL_IWDG_Init(&hiwdg); HAL_IWDG_Refresh(&hiwdg); HAL_Delay(300); //more than one downcount HAL_PWR_EnterSTANDBYMode();if delay before refresh, it seems work hiwdg.Instance = IWDG; hiwdg.Init.Prescaler = IWDG_PRESCALER_64; hiwdg.Init.Window = 4095; hiwdg.Init.Reload = 3600; hiwdg.Init.EWI = 0; HAL_IWDG_Init(&hiwdg); HAL_Delay(300); //more than one downcount HAL_IWDG_Refresh(&hiwdg); HAL_PWR_EnterSTANDBYMode();Is this the correct process ? If I want to ensure the modification is successful, what should I pay attention to
Hello,I am currently developing a LoRaWAN Class A device using the NUCLEO-WL55JC1 development board and the "LoRaWAN_End_Node_LBM" example from STM32CubeWL (version 1.5.0).I am facing an issue with context restoration after a reset. I am using the provided StoreContext() and RestoreContext() functions exactly as implemented in the example. However, after each reboot, the device always restarts the join procedure instead of resuming the previous session. As a result, the DevNonce is incremented on every reset.This behavior is problematic because repeated resets will continuously increment the nonce value. According to the LoRaWAN specification, this value is limited (16-bit), and once the limit is reached, the device will no longer be able to join the network.My understanding is that, when the context is correctly restored, the device should resume its previous session without triggering a new join procedure.Could you please clarify:* What is the correct sequence to restore the LoRaWAN
Label: MC Workbench[PN]: STM32G474RBT6 (Custom Board)[VERSION]: MCSDK 6.3.2[TOOL]: MC Workbench[DETAILS]: I am trying to create a new FOC project for a custom board driving a BLDC motor with Three Isolated Current Sensors (3-ICS). I am constantly getting the following UI error preventing me from creating the project: "It is not possible to create a motor control project with the FOC algorithm using the selected hardware. No proper path for motor control signals was found for the following mandatory features: - Current Sensing"However, when I check the .st_workbench/connectAlgo.log, the solver successfully finds a valid TripleADC route for my pins without any conflicts: DEBUG - CSConnect: ThreeICSCurrents TripleADCs processing start DEBUG - CSConnect: ThreeICSCurrents TripleADCs route: CURRENT_ICS_U PA0 ADC1_IN1 DEBUG - CSConnect: ThreeICSCurrents TripleADCs route: CURRENT_ICS_W PB12 ADC4_IN3 DEBUG - CSConnect: ThreeICSCurrents TripleADCs route: CURRENT_ICS_V PC4 ADC2_IN5 DEBUG - CSConn
Title edited to clarify that this is about accessing a file located on a Host PC hello ST Community, I'm trying to open a binary file with the fopen function for a STM32L5 microcontroller, but it always gives me a null value. The code is like this: char filepath[256]; sprintf(filepath,"%s","C:\\fileBIN.bin"); FILE *file; file = fopen(filepath,"rb"); if(file == NULL) { printf("Error occurred opening file. \r\n"); } else { printf("File opened successfully. \r\n"); } It always gives me a null value but the path exists and is correct. What's wrong? Thanks for supports
Greetings! There's an errata for the STM32F6/STM32F5 chips that goes like this: 2.4.1 Extra data written in the FIFO at the end of a read transferDescriptionWhen all the conditions listed below are gathered:• QUADSPI is used in indirect mode.• QUADSPI clock is AHB/2 (PRESCALER = 0x01 in the QUADSPI_CR).• QUADSPI is in quad mode (DMODE = 0b11 in the QUADSPI_CCR).• QUADSPI is in DDR mode (DDRM = 0b1 in the QUADSPI_CCR).• A data is read in the instant when the FIFO buffer gets full at the end of a read transfer, an extra data is unduly written in the FIFO buffer.WorkaroundsApply one of the following measures:• Read out the extra data until the BUSY flag goes low, then discard the extra data.• After reading out all the expected received data, set the ABORT bit of the QUADSPI_CR register to flush FIFO and keep the BUSY flag low. The last register configuration is kept. I believe this is also present on the STM32F769NI chip. I have done extensive research on this.
I am using the STM32H753VGT6 microcontroller and need to generate two PWM signals with the same frequency and duty cycle, with a 90-degree phase shift between them, using a single timer. Is this possible? If yes, how can it be achieved?
Dear Team ST,We are using the STM32 MCU (Part No. STM32F407VET6) on our custom board, and we are currently facing an issue related to the reset function.During board power-on or after program loading, the MCU appears to enter a hold or non-responsive state. This issue occurs every time the board is powered OFF and then powered ON. However, when the hardware reset button is pressed, the MCU starts functioning as expected.We kindly request your support in identifying the root cause of this issue. Please advise if any modifications are required on the firmware or hardware side to resolve this behaviour.We look forward to your guidance.Regards,Kaushik@Shubham Prakashpant BOHARAPI
I am looking for a software solution for this race condition:* The power button is connected to both the On/Off pin PD3 and the wakeup pin PB5. See the partial schematic.* The issue is that the STM32G0 enters shutdown mode, but immediately wakes up. Please see my function below.What is missing? Thank you! void Enter_Shutdown_Mode(void) { sprintf(msgString, "Enter_Shutdown_Mode...\r\n"); Debug_Print( msgString ); HAL_Delay(50); /* Enable the Power Controller (PWR) APB clock */ __HAL_RCC_PWR_CLK_ENABLE(); /* Wait for the pin to be HIGH after the button release. If the power button is currently pressed (LOW), entering shutdown with "LOW" polarity will cause an instant restart. */ while (HAL_GPIO_ReadPin(WAKEUP_GPIO_Port, WAKEUP_Pin) == GPIO_PIN_RESET) { // Wait for user to release the button HAL_Delay(10); } // Debounce the button press HAL_Delay(50); /* Clear the Wakeup Flag. If a flag is set from a previous wakeup, the MCU will fail to enter Shutdown and
Hello everyone! I'm new to the NUCLEO-H743ZI2 board. I need help with two questions: 1) I can't find a description of the STLK backup port -CN2 anywhere. Can you tell me if I can use it to program other STM32 devices on other boards, and how? 2) Can anyone share the schematic for the H743ZI2 board?
I would like to enable spread spectrum on the STM32H573RIT6.We are currently running on 250Mhz and at that frequency we have big peak which is 15dB above the limit, that's why I would be able to enable the spread spectrum. I looked into the STM32H7 example, so I am already aware and able to modify the PLL realtime. Now my question is how do I connect the DMA of the STM32H5 properly to a timer and a buffer to load the PLL. And also a question I have, what are good values for the PLL.
Hello,I must implement a SSI (Synchronous Serial Interface) to output a measured value. As SSI in principle is just a bitstream which is clocked out with the serial clock, I wanted to use a SPI in slave mode, as the clock comes from the SSI master.This works in principle, but from time to time I get a bit shift and the received data is delayed by one bit, which results in a division by two.Checking the SSI data clock, I didn't find an expected unstable clock with additional edges but from time to time the SSI master makes a pause after the first falling edge before it starts clocking. Could it be that this pause disturbes the SPI interface? I would have expected, that the SPI in slave mode only checks the clock edges and that the time between the clock edges isn't that critical?
Hello. I'm using a combo of a wba board and a LSM6dsv IMU sensor. I collect sampoles from the imu and then send them to my pc to do some fft there and als odo fft on board using the cmsis dsp libraries. The thing is that my pyrhon spectrum appears to be correct. I'm using a vibrator to make sure about that it [produces the requested frequency and monitor the results with the integrated vibrator's sensor. The python sprectrum appears to match the vibrator's sensor sprectrum whereas the cmsis results appear a lot more noisy and have an almost mirrored in the middle huge harmonic. Lets say than my sensor'f sampling rate is 4 KHz, so im able to do fft on up to 2 KHz event freq. If my vibrator is at 300 Hz i will see a huge harmonic in lets say 1600-1700 hz which gets closer the more i go to 1000 Hz. At 900- 1200 Hz the spectrum appears to be a complete mess and at 1300 HZ and afterwards it is simply beautiful. Here is the mcu code. I do a hanning window and median removal
Hello, I use STM32WB05KZ. Could you give me an example about how to store configuration data to NVM by aci_hal_write_config_data() function? - When I tried to store to 0x00 (I used static randow MAC address), it returns 0 but the data is lost when the chip is rebooted; - When I save to any other address (such as, 0x40), it always returns to 0x12. Thanks a lot.
Hello, I have started evaluation of X-NUCLEO-ESE02A1 shield with NUCLEO-F401RE board, and used STM32CubeMX for project generation according to PDF inside X-CUBE-SAFEA1 package. However, I can't get any demo running, and both these generated demos, as well as my attempt, fail with error code 0x01 which maps to STSAFEA_COMMUNICATION_ERROR. I have tried putting jumpers for I2C lines pullup on the shield, jumpers P4 and P5, but it did not help. Then I read in the product User manual UM3579 about additional RST PIN so I tried also putting a jumper on P3 connector but still nothing. However then I traced it to PB5/D4 PIN which is actually not used and not advised to be initialized in the Getting started document. So my question is: Do I need to use this pin, and if so, how exactly should it be used, to enable communication with STSAFEA110? Everything other, related to I2C, USART, expansion package itself is enabled, project compiles and app shows logs after flashing to Nucleo,
Hello everyone,I'm working with an STM32L562E-DK board and testing the "TrustZoneEnabled" template included in the "STM32Cube_FW_L5_V1.6.0" package. The goal is to run the basic example that transitions from the secure to the unsecured zone, but I'm finding that, after following all the instructions in "README.txt" and compiling the project, the code gets stuck in the next function:static void NonSecure_Init(void) { funcptr_NS NonSecure_ResetHandler; SCB_NS->VTOR = VTOR_TABLE_NS_START_ADDR; /* Set non-secure main stack (MSP_NS) */ __TZ_set_MSP_NS((*(uint32_t *)VTOR_TABLE_NS_START_ADDR)); /* Get non-secure reset handler */ NonSecure_ResetHandler = (funcptr_NS)(*((uint32_t *)((VTOR_TABLE_NS_START_ADDR) + 4U))); /* Start non-secure state software application */ NonSecure_ResetHandler(); } Specifically on the "NonSecure_ResetHandler()"; or it doesn't even execute the no-secure part.Current option bytes configuration (verified with STM32CubeProgrammer):DBANK => Checke
Hello,just updated to STM32Cube FW_H7 V 1.13.0 but it seems it still contains CMSIS RTOS2 V2.1.3.I'm develop with Keil and STM32 IDE but Keil is using V2.3.1 while Cube comes with V2.1.3.In STM32 IDE I got a compile error when I imported source code developed on Keil.E.g. the thread attribute osThreadUnprivileged, introduced in V2.2.0, is missing in V2.1.3.https://arm-software.github.io/CMSIS_6/main/RTOS2/rtos_revisionHistory.html Any progress here? If no, why?Thanks,Jochen
I want to add a EXTI0 line to act as a wakeup. I took the BLE_Heartrate example as a base. Out tyhe box, it compiles & runs ok. When I use CubeMX 6.16 to edit the BLE_Heartrate ioc to add PE0 as the EXTI0, next time I compile, I get an error that I'm missing stm32wbaxx_ll_utils.c. If I "cure" this by copying the file from elsewhere, I get other file-not-found errors on stm32wbaxx_ResetHandler_GCC.s and app_bsp.c. What gives? Surely the example provided by ST should be able to handle a minor change in the ioc file? The BLE_Heartrate and other BLE_ examples are inpenetrable and difficult to understand at the best of times. ST is not helping anybody by not explaining how the BLE_Heartrate example may be modified to get e.g. true low power stop2, how to set an RTC alarm to wake up from this.
Hi,During the design with the STM32H743IIK6 MCU few questions arise:(1) While designing a PCB with the STM32H743IIK6 (UFBGA176+25 package) with VDD=3.3V or 2.8V, I am unable to locate the VCCLDO pin, which is expected to be connected to external capacitor. Am i missing something in the pinout, or does the internal LDO in this specific package rely solely on the capacitors on the VCAP pins?(2) There are two sets of QUADSPI I/O sets: BK1 and BK2 (i intend to use the BK2). However, I do not see any separate clock pins for each. Do both channels share the same QUADSPI_CLK signal for both banks?(3) Regarding the USB interface: I see a VDD33USB pin, but there is no VDD5USB pin. Does this require an external 3.3V DC input, or is it an internal signal output that only requires a decoupling capacitor?Additionally, I am unable to locate the USB_DP and USB_DM pins on the UFBGA176 package. Is there specific hardware documentation / example schema that clarifies the physical lo
I have this Riverdi 7-inch display which has a STM32H757XIH6 micro controller. And I am trying to use freertos to run a uart task when a button is tapped on the display. I am running into an issue though with the button response. So I created a virtual function and that works when I tap the button. I created another freertos kernal and have a callback function names UART_Task. I am trying to send a message via a queue to start a process when a button is tapped. When the program runs the GUI displays, but when I tap the button it is unresponsive and does not seem to send the message. I messed around with setting different times on the osDelay within the callback to give the GUI and other tasks time to initialize. I also messed around with the priority of the task as well. No luck though. Here is the Freertos code that is initialized from the main.c. The MX_FREERTOS_Init() is called in the main.c/* USER CODE BEGIN Heade
Hi,I am using STM32G0 with STM32 Motor Control SDK. ADC1 is used for motor current sensing (triggered by TIM1 for FOC control).Since STM32G0 has only one ADC and does not support injected channels, I needed to read an additional NTC sensor (ADC channel 8) for motor stator temperature.I implemented this using Regular Conversion Manager (RCM):Registered ADC channel using RCM_RegisterRegConv()Requested conversion periodically (~300 ms)Read the value after conversion completionThe motor is running stable, and I am able to get temperature readings without visible disturbance.My question:Is this a correct and recommended approach for reading an additional analog signal in STM32G0 + MCSDK?Are there any potential risks (timing issues, FOC accuracy impact) when using RCM alongside motor control?Or is there a better recommended method for this use case (e.g., external ADC, different MCU, or MCSDK-specific approach)?Thank you.
I am using two Nucleo-STM32WL33 board, one as a transmitter and one as a receiver. The transmitter sends two messages in ASK modulation and the receiver records the messages in IQ sampling mode.Below is a visualization of the IQ samples time series.The logical 1s are quite clear and all have a similar amplitude, however for some reason there seems to be a sinus-like subsignal whenver the transmitter sends a logical 0. I would have expected an amplitude close to zero, like seen during the time frame between the two messages or after the end of the second message. There is a distinct 1/4 period phase shift between I and Q component, so its clear to me this has something to do with the IQ modulation itself. But what is causing this sinus subsignal? Is it caused by the receiver or transmitter? How can I remove it?
Hello, I am currently working on a ble project on the stm32wb09ke nucleo board that uses the stm32 sequencer. My application is working as intended but I want to make it low power for optimal battery life. If i understand correctly the sequencer itself handles when to enter the Idle state if there is no current running task. From the HeartRate example I've copied the logic for the "UTIL_SEQ_Idle" function. The problem I'm having is that the "UTIL_SEQ_Idle" function is not included in "UTIL_SEQ_Run" as it is in the HeartRate example and is therefore never called. Why is this part not included/generated? Should I just copy whats in the example? My UTIL_SEQ_Run: if ((local_evtset & EvtWaited)== 0U) { UTIL_SEQ_PreIdle( ); UTIL_SEQ_ENTER_CRITICAL_SECTION_IDLE( ); local_taskset = TaskSet; local_evtset = EvtSet; local_taskmask = TaskMask; UTIL_SEQ_EXIT_CRITICAL_SECTION_IDLE( ); UTIL_SEQ_PostIdle( ); } HeartRate example: if ((local_evtset & EvtWaited)== 0U) { UTIL_SEQ_PreId
The problem is that the transceiver will set the RX pin high at boot , this will put the G431 in boot mode and never start . The question is how to set and reset the nSWBOOT0 bit in the program . I mean , if I am right ::2) at setup (yes , Arduino) , the nSWBOOT0 bit is set in order to disable BOOT0 pin , thus allow normal (CAN bus) operation after boot on PB8 .1) but this will reset the STM32 , so before doing 2) , one need to read the level of nSWBOOT0 , and only set it if it is 0 . (one time action)3) but this will brick the DFU uploading . To reset this , for exemple by a customer In order to update the firmware , one have to reset the nSWBOOT0 by the program . This could be done by a button , or by a code received trough USB .Hope this is clear enough (and correct of course) . But doing this is not that simple for me , so I wonder if there is a working code available for this (sure , some people have done the trick successfully ) ?Thank you !Edit : c
Hello,I am currently experiencing some difficulties using the NUCLEO-N657X0-Q board.I am using STLinkUpgrade v3.17.10, and the device ID is correctly recognized as 003500244142501120353451, as shown in the attached image.However, when I click "Open in update mode," the PWR_STATUS LED on the Nucleo board turns off and the connection is dropped.I am not sure if this specific update is critical for operation, but I would greatly appreciate any guidance or help to resolve this issue.
NUCLEO F767ZI, CubeIDE 2.1.1, CubeMX 6.17.0I'm trying to set up UART with printf()#include <stdio.h> UART_HandleTypeDef huart3; static void MX_USART3_UART_Init(void); int __io_putchar(int ch) { HAL_UART_Transmit(&huart3, (uint8_t *)ch, 1, 10); return ch; } .... // in main // in while prinf("UART test\r\n"); // MX generated USART3 init static void MX_USART3_UART_Init(void) { /* USER CODE BEGIN USART3_Init 0 */ /* USER CODE END USART3_Init 0 */ /* USER CODE BEGIN USART3_Init 1 */ /* USER CODE END USART3_Init 1 */ huart3.Instance = USART3; huart3.Init.BaudRate = 115200; huart3.Init.WordLength = UART_WORDLENGTH_8B; huart3.Init.StopBits = UART_STOPBITS_1; huart3.Init.Parity = UART_PARITY_NONE; huart3.Init.Mode = UART_MODE_TX_RX; huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE; huart3.Init.OverSampling = UART_OVERSAMPLING_16; huart3.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; huart3.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; if (HAL_UART
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.