Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
if in the stm32cubeide clock configuration the extrenal oscialtors aren't highlighted it means that i dont need extrenal oscialtor on my custom board?
Starting from a working application based on the STM32U585A microcontroller, we changed the CPU to have the ETHERNET peripheral available. The flash is connected via quadSPI to the microcontroller, while the RAM is connected via octospi .Microcontroller Model: STM32H723ZGT6 FLASH MODEL: S25FL064L DRAM MODEL: APS6408LRegarding the configuration operations of both the flash and the RAM, everything seems to work, but when it comes to reading or writing, we receive incorrect data once out of 10 attempts. Note that we have a working application with the STM32U5 microcontroller using the same flash and RAM.Any idea on what I’m I missing?Flash initializzationvoid MX_OCTOSPI2_Init(void) { /* USER CODE BEGIN OCTOSPI2_Init 0 */ /* USER CODE END OCTOSPI2_Init 0 */ OSPIM_CfgTypeDef sOspiManagerCfg = {0}; /* USER CODE BEGIN OCTOSPI2_Init 1 */ /* USER CODE END OCTOSPI2_Init 1 */ hospi2.Instance = OCTOSPI2; hospi2.Init.FifoThreshold = 1; hospi2.Init.DualQuad = HAL_OSPI_DUAL
Hello.I'm currently researching can communication with stm32f407vgcurrently, i want to use can1 and can2 at the same time, but only one of them works.canfilter is used, and the test is currently in progress through timer interupt.maybe the can filter part is wrong, but i couldn't find the answer, so I want to ask for help.thanks you for your help
I am trying to make baremetal ADC driver for following development board STM32H723ZG Nucleo (144 pins).Reference manual: STM32H723 Reference ManualDatasheet STM32H7xx Nucleo DatasheetTo simplify, lets assume (for example) to use PA3. According to Datasheet, PA3 corresponds to Channel 15. In order to use ADC module and proper pins, I perform following actions:Enable Clk access to GPIOASet PA3 as Analog ModeEnable Clk access to ADC1 moduleSet conversion mode of ADC1 to continuousSet sequence length to 1 (since only channel 15 is converted)Set ADC channel to be converted in SQR1 (channel 15)Disable deep powered mode by clearing DEEPPWD in Control RegisterEnable regulator voltage VREGEN in Control RegisterWait for LDO to be supplied (LDORDY in ADC_ISR)Enable the ADC by setting ADEN in Control RegisterStart conversion with ADSTART in Control RegisterNow the crazy thing is. All steps succeed. I can see the results in SFRs. But conversion is still not happening. Observing ADC_ISR bi
I have customized hardware based on STM32F407 controller.I want to communicate on both CAN 1 and CAN 2. Both on 250 kbps baud rate but on different CAN bus due to some design requirement.tx = Transmit, rx = ReceiveI am able to tx and rx on CAN1 but on CAN2 I am only able to tx. Rx does not work on CAN2.I have tried to connect CAN1 on separate CAN bus and CAN2 on separate CAN bus. I have also tried to connect both on same CAN bus. But I am still not able to get CAN2 rx working.Below is my code for CAN1 and CAN2 configuration.int main() { ... CAN_Config(); CAN_Config_2(); ... } static uint32_t HAL_RCC_CAN1_CLK_ENABLED = 0; void HAL_CAN_MspInit(CAN_HandleTypeDef *canHandle) { GPIO_InitTypeDef GPIO_InitStruct = { 0 }; if (canHandle->Instance == CAN1) { /* USER CODE BEGIN CAN1_MspInit 0 */ /* USER CODE END CAN1_MspInit 0 */ /* CAN1 clock enable */ HAL_RCC_CAN1_CLK_ENABLED++; if (HAL_RCC_CAN1_CLK_ENABLED == 1) { __HAL_RCC_CAN1_CLK_ENABLE(); } __HAL_RCC_GPI
when i make the macro LUDWIG_SAI_DMA_MODE 0 i can hear audio in continous loop without noise because it runs in blocking mode.when give 1 to LUDWIG_SAI_DMA_MODE, I can able to hear the audio for sometimes after that i hear noise. When i hear noise i suspend the task it will point to while(updatePointer==-1). /* * audio.c * * Created on: Jun 30, 2025 * Author: KannikaMMallu */ #include "audio.h" #include "sai.h" #include "tx_api.h" /* Private typedef -----------------------------------------------------------*/ /* USER CODE BEGIN PTD */ __IO int16_t UpdatePointer = -1; extern int16_t PlayBuff[PLAY_BUFF_SIZE]; /* USER CODE END PTD */ TX_THREAD audio_thread; UCHAR audio_thread_stack[4096]; /* USER CODE END PTD */ /* Private define ------------------------------------------------------------*/ /* USER CODE BEGIN PD */ /* USER CODE END PD */ /* Private macro -------------------------------------------------------------*/ /* USER CODE BEGIN PM */ /* USER CODE END PM
I have an issue where a HAL_I2C_Mem_Read_IT transaction just seems to hang. It is plausible that this peripheral is temporarily unavailable and I already have working retry logic for the case where this call returns the "AF" error. The hang may or may not be related, but I'd like to abort it and try again. It isn't easy to get an I2C trace of this, but not impossible. In any case, I'd like to add some code to address this issue if possible.
During ENTDAA, HAL_I3C_TgtReqDynamicAddrCallback callsback and wait for me to SetDynAddr after the seventh Byte, still one byte short (DCR Byte), and this causes my target to shift out the DCR while the controller shifts in the assigned Address at the same time. How do i fix this?
Hello Everyone, I am using STM32H747I-DISCO.I am using Fanout board MB1280C The USART2 is not working Can you please help me I am just trying to print some message at startup but nothing is happening, Thanks in Advance. MX_GPIO_Init(); MX_MDMA_Init(); MX_FMC_Init(); MX_QUADSPI_Init(); MX_DMA2D_Init(); MX_DSIHOST_DSI_Init(); MX_LTDC_Init(); MX_CRC_Init(); MX_JPEG_Init(); MX_USART2_UART_Init(); MX_TouchGFX_Init(); /* Call PreOsInit function */ MX_TouchGFX_PreOSInit(); /* USER CODE BEGIN 2 */ debug_print("\r\nsystem is up\r\n"); /* USER CODE END 2 */ /* Init scheduler */ osKernelInitialize(); /* USER CODE BEGIN RTOS_MUTEX */ /* add mutexes, ... */ /* USER CODE END RTOS_MUTEX */ /* USER CODE BEGIN RTOS_SEMAPHORES */ /* add semaphores, ... */ /* USER CODE END RTOS_SEMAPHORES */ /* USER CODE BEGIN RTOS_TIMERS */ /* start timers, add new ones, ... */ /* USER CODE END RTOS_TIMERS */ /* USER CODE BEGIN RTOS_QUEUES */ /* add queues, ...
Moved from this post. Hi @mƎALLEm, I am facing the same issue with STM32F407. Whichever CAN is master in filter configuration is working, the other one is not. void can_init() { CAN_FilterTypeDef sFilterConfig1; sFilterConfig1.FilterBank = 0; sFilterConfig1.FilterMode = CAN_FILTERMODE_IDMASK; sFilterConfig1.FilterScale = CAN_FILTERSCALE_32BIT; sFilterConfig1.FilterIdHigh = 0x0000; sFilterConfig1.FilterIdLow = 0x0000; sFilterConfig1.FilterMaskIdHigh = 0x0000; sFilterConfig1.FilterMaskIdLow = 0x0000; sFilterConfig1.FilterFIFOAssignment = CAN_FILTER_FIFO1; sFilterConfig1.FilterActivation = ENABLE; sFilterConfig1.SlaveStartFilterBank = 14; if (HAL_CAN_ConfigFilter(&hcan1, &sFilterConfig1) != HAL_OK) { Error_Handler(); } CAN_FilterTypeDef sFilterConfig2; sFilterConfig2.FilterBank = 14; sFilterConfig2.FilterMode = CAN_FILTERMODE_IDMASK; sFilterConfig2.FilterScale = CAN_FILTERSCALE_32BIT; sFilterConfig2.FilterIdHigh = 0x0000; sFilterConfig2.FilterIdLow = 0x0
I would like to highlight a compatibility issue we have encountered. The TL-SG116E is a smart managed switch, whereas our machine, which uses an STM32 F7 Nucleo board, is designed to operate with an unmanaged switch. As a result, we are experiencing communication errors when connecting through the TL-SG116E.The board is getting connected or in communication when we give it a hard reset ,while the reset button is pressed.
Please somebody can help me to correct my errors in stm32cubeide for stm32f401cdu6 project../Core/Src/main.c: In function 'HAL_UART_RxCpltCallback':../Core/Src/main.c:77:38: warning: assignment to 'char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]77 | rxbuffer[bufferIndex]="\0";| ^../Core/Src/main.c:84:37: warning: passing argument 2 of 'HAL_UART_Receive_IT' makes pointer from integer without a cast [-Wint-conversion]84 | HAL_UART_Receive_IT(&huart6,uart_char,1);| ^~~~~~~~~| || charIn file included from ../Core/Inc/stm32f4xx_hal_conf.h:411,from ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h:29,from ../Core/Inc/main.h:30,from ../Core/Src/main.c:20:../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_uart.h:748:75: note: expected 'uint8_t *' {aka 'unsigned char *'} but argument is of type 'char'748 | HAL_StatusTypeDef HAL_UART_Receive_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size);| ~~~~~~~~~^~~~~../Core/Src/main.c: In function 'processs
Hello everyone. I am writing to you because I am trying to capture a thermal image (frame of temperature values) using a Lepton 2.5 thermal camera with Break Out board 2.0 connected to a Nucleo U5A5ZJ-Q board. First I connected the following pins of the Break Out board 2.0 to the Nucleo board, as shown in the table below.I have not inserted pull-up resistors or software pull-ups on SDA and SCL.Then I created the project and wrote the first lines of code in order to:-) Reset the Lepton thermal camera-) Read the register =0x000E-) Check that the thermal camera boot is finished (bit2 == 1 of 0x0002 register)-) Check that the interface is not busy (bit0==0 of 0x0002 register)-) Check that the system is ready (SYS FFC Status = 0x0000)Below is the code I used to implement this first part. // Lepton Reset (PC13 low -> high)HAL_Delay(100); // 100 ms to give time for the activationHAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_RESET); // Put Low for ResetHAL_Delay(500); // 500ms di rese
I am designing my own PCB which uses the STM32L433RCT6I want to ensure I have the necessary GPIO pins going to a connector so that I can flash/debug using the following interfaces:Below are the GPIO pins I have brought out to connectors, have I missed anything or got anything wrong ? 1. ST link: For flashing and debugging during developmentI have currently routed the following pins to a 6 pin connector:SWDIO (PA13)SWCLK (PA14)NRSTBOOT0 (PH3)GND+3.3V2. Segger J-Link: For flashing and debugging during developmentI have currently routed the following pins to a 6 pin connector:SWDIO (PA13)SWCLK (PA14)NRSTBOOT0 (PH3)GND+3.3V3. UART: For firmware updatesI have currently routed the following pins to a 4 pin connector:LPUART TxLPUART RxGND+3.3VIs LPUART suitable or does it need to be USART ?4. USB: For firmware updatesI have currently routed the following pins to a USB connector:USB D+USB D-In STM32CubeIDE, the SYS configuration has serial wire, JTAG (4 pins) and JTAG (5 pins).
Hello, I am using the STM32H747I-DISCO board for my project. I need to set and reset a GPIO pin with a delay of around 10 nanoseconds between the transitions. My question is:Is it practically possible to achieve such precise timing (10 ns pulse width) using GPIO on an STM32 board, specifically the STM32H747? I also tried using direct register-level GPIO access by completely eliminating the HAL drivers. I was able to achieve a minimum pulse width of around 50 to 60 nanoseconds. However, I was still not able to achieve the desired 10 ns set/reset timing I have tried using TIM3 PWM but the minimum pulse I’m able to observe is around 102 ns.I would like to know if there is any reliable method. Any guidance or clarification would be appreciated. Thank you!
Hi everyone,which type of stm32 microcontroller is best fit for following operationsfor building rc remote of 8 channel and morelow costlow power consumptionhigh-speed rf communication and easy integrate with RF chip using SPI porteasy to design and develop10-bit ADClow voltagedisplay interferenceRTC
Hello Gurus :)), I am currently trying to acquire 2 mic stereo data with SAI interface and have some questions regarding to de-interleave the input PDM stream. My nucleo board is nucleo-f446re. I am currently acquiring 8 bit pdm data with the relevant pdm buffer, but I am not certain if these PDM input stereo data are bit-interleaved or byte-interleaved.I have already read AN446, STM32 microphone acquisition youtube 8 video series, UM2372, rm for my board, and most of they say they are bit interleaved but in XCUBE-MEMS1 package example, I saw no deinterleaving or anything. If they are bit-interleaved, do I need to conduct bit-masking and bit-shifting before processing them in PDM2PCM middleware? Would love to know some sample codes too.
Dear community,I have a NUCLEO-H7A3ZI-Q board with CAN, USART, USB Device and 4 analog inputs. My application is structured using the Azure RTOS, but for ADC testing purposes I am not calling MX_ThreadX_Init() anymore. With the AZRTOS initiated is the same ADC behavior.The example at https://github.com/STMicroelectronics/STM32CubeH7/tree/master/Projects/NUCLEO-H7A3ZI-Q/Examples/ADC/ADC_DMA_Transfer works, but they only use 1 channel. The board and at least ADC_Channel11 works.I attached my IOC file, but basically I am using ADC2 (also tried with ADC1) in continuous conversion, DMA circular mode.I also attached the main.c file. The gist of it:ALIGN_32BYTES (static uint16_t ADC_VAL[4]);void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef *hadc){if (hadc == &hadc2) { ADCfinished = 1; // Set the flag to indicate conversion is complete}}// in main()...if (HAL_ADC_Start_DMA(&hadc2, (uint32_t *) ADC_VAL, 4) != HAL_OK){Error_Handler();}while (1){if (ADCfinished) { // pri
In AN2606, it goes into pin specific detail about the pins when look at your specific chip line. Does this mean that I am limited to those specific pins in order to use the bootloader and that I cannot used an alternate assigned pin?
Hi, I am using STM32H743 nucleo board on one of my design. On my board I have installed nucleo board on board to board connector. For FDCAN interface we are using TCAN3414 transceiver IC. Our bit rate is 1MHz and data rate 2MHz for FDCAN communication on board. We are interfacing the FDCAN with DigiSoM board having transceiver TMC2517. After some packet transmission i observed that communication link is down. CAN bus is not working. On resetting the controller communication starts again for sometime and again stops. I tried replacing the STM32H753 board with STM32H743 and i have not observed any communication issue on that particular system. On other system I am already having STM32H753 but still I am facing the same issue. I am using normal wires for GND CANH and CANL connections of length 15cm max. I tried reducing the baud rate till 250kbps but same issue. I have checked the signal quality on oscilloscope which looks fine with ringing effects. We are using MATLAB modelling for all t
What I want to achive:I2S Audio Output on the included Arduino Header of the STM32F746G-Disco Board to drive a MAX98357A class-D amplifier.PB4 I2S2_WS on Ardunio D3 PI1 I2S2_CK on Ardunio D7PI3 I2S2_SD on Arduino D13To ensure that no configurable solder bridge is missing, I toggled the Pins in GPIO output mode and tested the output with my Logic Analyzer. All 3 pins are toggling as expected.Then I created the attached CubeMX 6.14.1 *.ioc file to configure the hardware.I want to use IRQs and DMA fo I2S Audio (48kHz sample rate, 16bit stereo) output in a loop.I implemented some data buffer and the callback functions (see ateached .c file) and start the initial I2S data transfer with HAL_I2S_Transmit_DMA(...);what I expect to happen next:a CK signala WS signalsome data on the SD signal.a HAL_I2S_TxHalfCpltCallbacka HAL_I2S_TxCpltCallbackWhat I get:I2S_TX_Status is OK from initial HAL_I2S_Transmit_DMA(...);absolute no activity on the I2S lines, just flat
Hello,I’m working with Simulink and an STM32G4 series microcontroller. I’ve successfully set up PWM generation and configured the ADC in injected mode, synchronized with the PWM timer (TIM1).However, when I enable External Mode in Simulink (for real-time parameter tuning and signal monitoring), the connection fails. Interestingly, everything works fine when I trigger the ADC using a different timer—the issue only occurs when TIM1 is used to trigger the injected ADC.My setup:Target: STM32G4 (e.g., STM32G4)PWM generated using TIM1ADC in injected mode, triggered by TIM1External Mode communication over STLink (USB)Question:Is there a known limitation or conflict between External Mode and using injected ADC mode synchronized with PWM (via TIM1) on STM32 targets in Simulink?Could this be related to timing/resource conflicts?Do you have any suggestions or workarounds to maintain synchronized ADC injection while using External Mode?Thanks in advance for your support!
Hello everyone, I seem to be having issues flashing some the sample binaries found in these two repositories. I am using the NUCLEO-N657X0-Q board with the B-CAMS-IMX camera module. With either set of binaries I tried the following steps:1. Open STM32CubeProgrammer and connect to the board using ST-LINK over USB (Boot jumpers in the depicted position)2. Enable the MX25UM51245G_STM32N6570-NUCLEO external loader for the STM32N6570-NUCLEO board3. Browse to the first hex file to flash under the "Erasing & Programming" tab4. Flash each hex file in the order specified in the project's README5. Move the BOOT1 jumper from position 2 to position 16. Power Off/Power on by unplugging the board from USB From what I understand, the board should now behave like a USB webcam when connecting it to a computer though the non-STLINK USB port. Unfortunately, when trying this, my computer doesn't even recognize that device has been connected. (The corresponding light
Dear ST Community, I am working on an Ethernet TCP/IP project using the Nucleo-F746ZG development board with the LWIP stack, without any RTOS. I have based my implementation on the tcp_echoclient example driver file. The project builds successfully, and the application runs in debug mode, but it does not work in release mode. I have compared the map files for both release and debug modes but found no significant differences. Additionally, I am facing issues with MPU configuration while using the LWIP stack. Specifically, I need clarification on: The correct SRAM1 and SRAM2 addresses for the LWIP RAM heap pointer The appropriate addresses for Rx and Tx DMA descriptors in the linker script Whether all these addresses need to be explicitly configured in both the MPU settings and the linker script file Project Details: Development Board: Nucleo-F746ZG Ethernet Stack: LWIP RTOS Middleware: No TCP Client: tcp_echoclient Issues: Application runs in debug mode but not in release mode, MPU a
Hello,I am working on the NUCLEO-WB55RG. I have updated the FUS to v2.1.0.0 and then loaded the stm32wb5x_BLE_Stack_full_fw v1.23.0. This worked fine.After that, I wanted to load the stm32wb5x_BLE_Stack_full_extended_fw.bin, but now I always get the : Warning: FUS_STATE_IMG_NOT_FOUND message. I have this message when trying to update the FUS and the stack. I also have an error when trying to use the "Firmware delete" option:I already tried to mass erase the chip, already tried to flash previous FUS version, nothing worked... I always have the FUS_STATE_IMG_NOT_FOUND warning.This is my current state: I have no read protection (option byte set to AA). I am using CubeProgrammer v2.14.0 and STM32Cube_FW_WB_V1.23.0. Support would be appreciate to unlock my device ... Already saw some similar posts, but none of them were helpful for me.Thanks :)
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.