Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hello,On a custom-designed PCB, I am using an STM32H745IIT6 (LQFP176) MCU. I am actively using analog channels, various I/O pins, Ethernet, QSPI, and other peripherals. The code I am using was previously running on an F7 series MCU. It has been fully ported to the H7 version and tested. However, during testing, I noticed an issue with sampling on the PA0 pin, which is configured as ADC1 INP16 in single-ended mode. A total of 19 analog channels are active, and 18 of them show no problems, but on this particular channel I can clearly observe a shift in the raw ADC values.- ADC1-2-3 are running in independent mode, 16-bit, triggered by Timer1.- Data is read via DMA.When I monitor with Serial Wire Viewer (SWV), I observe sampling behavior as shown in the image. The channel where I am experiencing the issue is the red signal shown with the name adc_bc. The other three signals were added for comparison. A single source was used to provide the signal to these four channels. When mon
I am using the STM32H753VI chip, it's on a proprietary PCB but the layout is very similar to the nearest NUCLEO board so I am not ready to consider that the issue.I am working on a very low power application, using CubeIDE but minimal HAL, preferring bare metal. When I execute __WFI() to put the device to deep-sleep, D1 and D2 enter standby (D2 is always standby, actually), and D3 is supposed to stop and allow LPUART1 and RTC to run in autonomous mode (LSE clock). This works exactly as expected, drawing about 250 uA from my power supply (via LDO). The device is set to wake from deep-sleep on LPUART1 RX event. When it wakes, my program can discriminate between the original Power-on Reset and the Wake from Standby. The PWR_CPUCR register is set to 0x1A3, which corresponds to SBF_D2, SBF_D1, STOPF, PDDS_D2, and PDDS_D1 all set, exactly as anticipated.The issue occurs the next time __WFI() is called. As best as I can tell the settings have not changed, but D3 does not appear
Hello everyone,I am performing some tests over the NUCLEO-WBA65RI board, related to low power mode and BLE functionality.I managed to test the BLE_p2pserver example correctly and checked the current consume is about 500 μA on this case until it goes on low power mode and changes to 20 μA.The low power mode stays like that and we are not publishing unless B1 button is pushed.I was wondering if there is any document that explains how this is performed and to ask if it was possible to have the BLE stack publishing in low power mode(stop2mode) like it could be done in in the WB55 which is a dual core.Thanks in advance!
Hello STM32 Community,I'm working on a project using the STM32WB55RG microcontroller (specifically the P-NUCLEO-WB55 evaluation board) to implement a sleepy end device in a Zigbee network. The goal is to transmit data over Zigbee periodically and then enter shutdown mode, with the RTC serving as the wake-up source to minimize power consumption during sleep periods.Setup and Configuration:Hardware: P-NUCLEO-WB55 EVM based on STM32WB55RG.Functionality: The device wakes up from shutdown mode via RTC, enters active mode to perform Zigbee transmission, and then returns to shutdown.Clock Settings:Cortex-M4 core clock set to 32 MHz (default).Cortex-M0+ core clock also set to 32 MHz (matching the M4 frequency).Note on M0+ Clock: We attempted to reduce the M0+ clock frequency for potential power savings, but the IOC (STM32CubeMX configuration tool) does not allow this adjustment – it enforces the same frequency as the M4.Issue Observed:When the device wakes up from RTC-triggered shutdown and en
Split from TOUCHGFX and CPU.My screen resolution is 480 * 800. When I use a dynamic graph with a capacity setting of 300 and add 30 points each time, the number of executions of handleTickEvent per second drops from 30 to 2. What solutions are there?
Hello, meanwhile i tried for ethernet udp several examples. But either these could not be importedin STMCubeIDE 1.19.0 or were based on RTOS. Did any know or have an example for it? Thank you! Best regards, HiST
Dear ST,I'm trying to get USB CDC device working on custom STM32H7R3L8HxH based board. Host (Windows) detects it but unfortunately the USB device fails to enumerate with error:Windows has stopped this device because it has reported problems. (Code 43)A request for the USB device descriptor failed.USB FS based Boot ROM works in DFU mode so I know hardware should be okay.I found a bug in CubeMX code generator. USBPHY clock source is configured to be HSE (which is 24 MHz):However code generator creates usbd_conf.c function HAL_PCD_MspInit with these lines: /** Initializes the peripherals clock */ PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_USBOTGFS; PeriphClkInit.UsbOtgFsClockSelection = RCC_USBOTGFSCLKSOURCE_PLL3Q; if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit) != HAL_OK) { Error_Handler(); } I confirmed with debugger in SFR view that indeed OTGFSSEL bits in RCC_CCIPR1 are set to PLL3/Q.STM32CubeIDE version is 1.19.0 and MxCube version
Hello,I am trying to make an external loader for a STM32H5 to program a QSPI flash MX25L12835F with STM32 Cube Programmer.In my project I add files Dev_inf.c .h ans Loader_Src.c .h from :https://github.com/STMicroelectronics/stm32-externaloader/tree/main/STM32H5x_boards/MX25LM51245G_STM32H573I-DKAnd modify them to adapt to my board :- Dev_inf.c : update StorageInfo struct- Loader_src.c : reimplement Init() , MassErase() , Write(), SectorErase() with my flash driver.I test these functions in debug with the original linker STM32H562RGTX_FLASH.ld and these functions works ok.After I change the linker file with linker.ld of the branch contrib stm32-external-loader\Loader_Files\other devices and build and generate the file .stldr and put it into STM32CubeProgrammer\bin\ExternalLoaderThen when I open STM32CubeProgrammer I see my external loader in the list : But when I try to read or erase at QSPI address 0x90000000 I get an error immediatly
I have a project which uses both OPAMPs. For both OA I use dedicated VINM pin.OPAMP1 works correctly.OPAMP2 behaves like the dedicated pin (M2 ball) is not connected to the input multiplexer.I 've tried - mode FOLLOWER: OK - mode STANDALONE, reconnected the signal on the board and used PA7 for VINM: OK - mode STANDALONE, using the dedicated pin: the output is saturated at VDDA.Checked the PCB connection, OK. Checked on 3 boards, identical results.Is it possible it is really a bug in the silicon? What else should I check?(I would like to use OPAMP tag, but it is not available :( ) Initialization code:(GPIO to analog)LL_APB3_GRP1_EnableClock(LL_APB3_GRP1_PERIPH_OPAMP);LL_OPAMP_InitTypeDef OPAMP_Init;OPAMP_Init.PowerMode = LL_OPAMP_POWERMODE_NORMALPOWER_NORMALSPEED;OPAMP_Init.FunctionalMode = LL_OPAMP_MODE_STANDALONE;OPAMP_Init.InputNonInverting = LL_OPAMP_INPUT_NONINVERT_IO0;OPAMP_Init.InputInverting = LL_OPAMP_INPUT_INVERT_IO1;LL_OPAMP_Init(OPAMP2, &OPAMP_I
Hello,in my app I am using a listLayout that is inside a scrollable container. In that listLayout I dynamically add and remove elements based on user touch. Each element has multiple wildcards in textAreas.Functionality is ok, but when one of the elements(MOTOR) is open, left to right flicker starts happening. When I close the element the flicker completely stops. Video of flicker: https://www.youtube.com/shorts/Qo5VO2ftH8UUsing: TouchGFX 4.25.0 designerSTM32h757 board (Riverdi 70STM32H7 config) Any ideas would be appreciated.
Hi, I have the following code inside a function that writes data into flash memory. I noticed that on the first iteration of the for loop, when HAL_FLASH_Program is called, it fails to write at the flash starting address 0x0801F080. However, from the second iteration onward, it successfully writes data into flash. Because of this, the initial data is missing. While debugging, I found that the failure occurs due to this line: error = (FLASH->SR & FLASH_FLAG_SR_ERROR); The error value I get is 128 (decimal). is there anything I am doing wrong? 1.JYI, I have erased the memory before write to confirm this I am observing FF bytes 2.To confirm again I have changed the address from 0x0801F080 to 0x0801F088 still same scenario occours bool write_function(void) { HAL_StatusTypeDef status. uint64_t temp; uint32_t i, j. HAL_FLASH_Unlock(); __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | FLASH_FLAG_SIZERR | FLASH_FLAG_OPERR | FLASH_F
Hi all,I'm trying to create a custom bootloader with openbl on rak3172 sip buil with stm32wl, so Ive used this repos here. I've just ipdate the main like this#define APP_ADDRESS 0x08008000U HAL_PWR_EnableBkUpAccess(); __HAL_RCC_RTC_ENABLE(); init_led(); if(get_bootloader_flag() == BOOTLOADER_MAGIC){ set_led_bootloader(); OpenBootloader_Init(); while (1) { OpenBootloader_ProtocolDetection(); } }else{ set_led(); jump_to_app(APP_ADDRESS); } void jump_to_app(uint32_t address) { uint32_t i=0; void (*SysMemBootJump)(void); __disable_irq(); /* Disable Systick timer */ SysTick->CTRL = 0; /* Set the clock to the default state */ HAL_RCC_DeInit(); /* Clear Interrupt Enable Register & Interrupt Pending Register */ for (i=0;i<5;i++) { NVIC->ICER[i]=0xFFFFFFFF; NVIC->ICPR[i]=0xFFFFFFFF; } /* Re-enable all interrupts */ __enable_irq(); /* Set up the jump to boot loader address + 4 */ SysMemBootJump = (void (*)(void)) (*((uint
Hi everyone,I’m working on a product using the STM32WB55 with BLE and Zigbee static concurrency, and it’s now moving into the FCC certification stage.I’ve come across the Phy_802_15_4_Cli application along with the wireless coprocessor firmware (stm32wb5x_Phy_802_15_4_fw.bin), and I want to confirm whether it covers the requirements for test mode.My requirements are:1. Continuous transmission (both unmodulated and modulated) on a single channel2. Channel selection (e.g., 2402, 2440, 2480 MHz for low, mid, high)3. Maximum duty cycle (100%) transmission4. Fixed transmit power at the maximum rated level5. Option to enable hopping/modulation patterns (for BLE)From what I’ve seen, the Phy_802_15_4_Cli application seems to provide almost everything except hopping. Would this application be sufficient for FCC test cases?Also, has anyone here used other applications or tools for FCC or similar certification testing?Thank You.
Hi,I am working with the STM32F103RCT6. I am writing a bare metal code for delay function using SYSTICK timer. The problem I am facing is that I am not able to write to the ARM cortex registers. Below is my code for your reference - This is the stm32f103xx.h file#define SYSCLK 8000000UL // System clock frequency in Hz #define SYSTICK_BASE 0xE000E010UL // SysTick Structure definition typedef struct { volatile uint32_t CTRL; /* SysTick control and status register offset: 0x00 */ volatile uint32_t LOAD; /* SysTick reload value register offset: 0x04 */ volatile uint32_t VAL; /* SysTick current value register offset: 0x08 */ volatile uint32_t CALIB; /* SysTick calibration value register offset: 0x0C */ } SysTick_TypeDef; #define SYSTICK ((SysTick_TypeDef *) SYSTICK_BASE)This is the function in my main.c - void SystemClock_Config(void) { __disable_irq(); // Disable all interrupts // 1. Enable HSI RCC->CR |= (1 << 0); // HSION = 1 // 2. Wait until HSI is ready
I'm looking for an example to use as the starting point for a sensor data collector. In particular, an STM32F401 ADC_MultichannelSingleConversion with DMA and software start. I found an example for the F11 that is based on the LL SDK. I then created an F401 project using ADC with DMA and set the code generator to utilize the LL SDK for those components. I then compared the 'stm32f4xx_it' source and header files and found them substantially different. So much so, in fact, that I'm unsure how to proceed. The F11 example does not have an IOC file, so I cannot view its configuration settings. The code generated from my IOC file features very nice blocks that delineate where user code should be placed, and I want to utilize this feature to avoid conflicts with the code generator as I add other system components.The same applies to the 'main' source and header files. If there's a better example to use as a starting point, or some guidance for merging the example code into a STM32Cube p
Hello,I am working with the STM32N6570-DK and following the steps described in the following article to write the FSBL and application to flash and verify their operation:https://community.st.com/t5/stm32-mcus/how-to-create-an-stm32n6-fsbl-load-and-run/ta-p/768206Specifically, I am referring to section 2.2: "Second demo with FSBL and application".However, I was unable to observe the LED blinking as expected.While investigating the issue, I came across the following discussion:https://community.st.com/t5/stm32-mcus-boards-and-hardware/nucleo-n657x0-q-failed-to-start-gdb-server/td-p/756404/highlight/true/page/2After reviewing this and checking the OTP values, I noticed that the values for OTP11 and OTP124 were identical.When I switched the BOOT mode to DEV and executed the FSBL from SRAM, the application written to flash started successfully and the LED began blinking.Based on this behavior, I suspect that the FSBL is not being properly loaded into SRAM by the internal boot ROM.Could you
Hi everyone,I'm trying to interface an SD card over SPI with an STM32F411. However, I cannot even initialize it. My current sequence is:Wait 20 ms after power-on.Send 10 clock cycles with CS high.Pull CS low and send CMD0 and wait for a reponse.Instead, I only ever receive 0xFF instead of 0x01.My SPI configuration looks like this:Here is the relevant code: MY_DEBUG_PRINTLN("Hello World"); uint8_t txBuf[6]; uint8_t resp = 0x00; uint8_t dummy = 0xFF; HAL_Delay(20); MY_DEBUG_PRINT("Raw SD SPI test:\n"); // send 80 clocks with CS high HAL_GPIO_WritePin(GPIOB, GPIO_PIN_1, GPIO_PIN_SET); for (int i = 0; i < 10; i++) { HAL_SPI_Transmit(&hspi2, &dummy, 1, HAL_MAX_DELAY); } HAL_GPIO_WritePin(GPIOB, GPIO_PIN_1, GPIO_PIN_RESET); // CMD0 frame txBuf[0] = 0x40; txBuf[1] = 0x00; txBuf[2] = 0x00; txBuf[3] = 0x00; txBuf[4] = 0x00; txBuf[5] = 0x95; // send command HAL_SPI_Transmit(&hspi2, txBuf, 6, HAL_MAX_DELAY); // wait for response for (int i = 0; i < 3
We're using the ADC function built into the STM32F767.The problem is that when the analog signal input to the ADC is around 200mV, the digital value output from the ADC appears to be around 240-260. We're trying to obtain a stable value by collecting 60 of these digital values and calculating a moving average.However, quite often, out of the 60 data points, 20-30 values exceed 3000. Therefore, even when averaging the data, the readings are completely different from the actual analog value.When I measured the input analog signal with an oscilloscope, it was around 200mV +/- 40mV, so I don't think it's due to input signal noise.I suspect there's something wrong with the MCU's ADC settings or program. Please advise on what I suspect.
im looking in the main.h file for this example and wondering where __BUFFER__ is defined thats used in this line #define COUNTOF(__BUFFER__) (sizeof(__BUFFER__) / sizeof(*(__BUFFER__))) thanks for the help
TL;DR - adding USBX and the USB CDC device class to my STM32U5 TouchGFX project causes it to fail during initialization, because the default memory settings are woefully inadequate.I have a TouchGFX project running on an STM32U5G9J-DK2 using ThreadX. The TouchGFX component tosses up a splashscreen, and I have other tasks running, including a debug task putting out UART data. So that all works fine.What doesn't work is when I add USBX and a simple USB CDC device class to the project. I can add it using CubeMX, but when I build and run it, it dies during initialization because of memory allocation issues. I would at least expect it to run out-of-the-box when adding it to a new or existing project.Here are my steps to reproduce the failure:Make a workspace directory (I called mine C:\ST\workspace\touchgfx_usb_issue).Open TouchGFX, create a new project, select STM32U5G9J Discovery Kit 2 running ThreadX, select the workspace directory as the "Application Directo
Hi all,I'm currently working on a project using a STM32H753 in combination with the Azure RTOS UsbX to create a composite class USB device (CDC ACM + MSC). As a starting point for the MSC support, I'm using this STM github example:https://github.com/STMicroelectronics/x-cube-azrtos-h7/tree/main/Projects/STM32H735G-DK/Applications/USBX/Ux_Device_MSC Unfortunately, my board only supports a 1-bit SD bus which is running at 48MHz. The composite class is working along I'm using the HAL_SD_WriteBlocks_IT / HAL_SD_ReadBlocks_IT functions. By using the IT driven approach, Windows is able to mount the SD card and I can create, edit or delete files as expected.Changing to the DMA driven functions, then the mount seems to fail, has corrupt disk naming or asks to insert a disk. I'm aware of cache coherency issues in the H7 and I setup the linker file and MPU accordingly (creating an 32kB area for the UsbX memory pool in the AXI SRAM): Linker file:/* Specify the memory
Hi Team, I am planning to use STM32L476RE MCU for my project, Can I know how to switch between Stop1,2 and low power sleep and run modes? I am new to STM32 and I need a reference code or some guidance to start with, any help very much appreciated. Thanks in advance,CH. Pranathi
We are developing a product that needs the ability to run 3 separate CAN interfaces connected to 3 separate CAN buses. I have the NUCLEO-F413ZH and I can successfully initialize and start CAN1, CAN2, and CAN3 and transmit from each of them in a single application, but I only get RX interrupts on CAN3 when all 3 interfaces are initialized and started. Additionally, if I only initialize and start CAN1 or CAN3 in my application, I can transmit and receive from them, but not CAN2.Pages 1076-1077 of the part datasheet/reference manual (RM0430) lists dual and single CAN peripheral configurations:First question: is it possible to run all three CAN interfaces simultaneously and receive messages from each of them?CAN2 doesn't have direct access to SRAM, so I think if I want to use CAN2 for receiving, I also need to enable CAN1. Is that correct?I don't understand what is meant by the master/slave relationship between CAN1 and CAN2. It sounds like messages received on CAN2
Hi,Im just getting my new STM32N6570-DK and I try blinking simple led project first with default generate.But when I built and flash it, it got stuck when init UCPD (pic 1), am I missing something ?When I checking seem it still not define yet (pic 2).Thanks
Dear ST Community, I'm developing a Zigbee sensor node using an STM32WB55RG Nucleo board as an end device that should join my existing Zigbee network (Raspberry Pi 4 + CC2531 running Zigbee2MQTT). Despite successful build and flash operations, my STM32WB55 won't join the network, and I'm not seeing any LED feedback despite setting CFG_FULL_LOW_POWER=0. My SetupCoordinator: Raspberry Pi 4 + CC2531 (Zigbee2MQTT)PAN ID: 46212 (0xB484)Channel: 15Network Key: [117, 131, 80, 245, 206, 246, 76, 112, 61, 246, 117, 178, 116, 246, 135, 64]End Device: STM32WB55RG NucleoSTM32CubeIDE: 1.13.0STM32CubeWB: 1.23.0Wireless Coprocessor Firmware: STM32WB5x_BLE_Zigbee_RFD_dynamic_fw.bin (flashed to M0+ core)Application Example: BLE_Zigbee_Dyn_SED (chosen specifically as it's designed to join existing networks as an end device) Steps TakenFlashed STM32WB5x_BLE_Zigbee_RFD_dynamic_fw.bin to M0+ core using STM32CubeProgrammerImported BLE_Zigbee_Dyn_SED project into STM32CubeIDESet CFG_FULL_LOW_P
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.