Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
I'm working on entering and exiting low power run mode at runtime on Zephyr rtos. I can't find a way to change clock frequency to 2MHz (required by LPR) and back to 80MHz using zephyr features at runtime. Is there any api to achieve this, or some similar example? I'm working on STM32L4S5 series.
Hello everybody,For a proof of concept, I attempted to validate the LoRa modulation by having two B-WL5M-SUBG1 boards exchange ping-pong messages. However, I couldn't manage to exchange data with these boards at a distance greater than 230m in an open field. I expected at least 1km of communication distance.My radio configuration is the following:Tx output power: 14dBRF frequency: 868.0 MHzBandwidth: 125kHzSpread factor: SF7Coding rate: 4/5I used the antennas coming with the development boardsFew questions:- I have connected the B-WL5M-SUBG1 to a vector analyzer and measured a VSWR of 2.339 for the 868.00 MHz frequency. Is it expected to change the C19, C20, and L1 components to better adapt the board for my frequency to reach the expected communication range?- Are the provided antennas with the development board able to reach a communication range greater than 250m?- I have found the AN5528 evoquing range greater than 1km for S2-LP in 868MHz. Should I expect similar results
We would like to power the VDD33 domain of an STM32WB0 device (STM32WB05KZ) from an external 3.3V source and the other domains from an external 1.8V source. In theory, it should be possible - by supplying 1.8V to VDDSD in SMPS BYPASS mode, or directly to VFBSD in SMPS OFF mode. However, it is not clear if the SMPS' input (VDDSD) is isolated from VDDIO (the power diagram in the datasheet shows there is a connection). Please clarify if it is possible to use the described configuration.
I have a small project which should generate an interrupt whenever a DMA transfer has completed. If I build the code for an STM32F411 then it works exactly as expected. If I build that same code for an STM32F401, which is within the same family as the 32F411, then the project is not built correctly. The DMA transfer still happens, but there is no interrupt upon transfer completion.The problem is in the vector table. .word SysTick_Handler .word 0 /* Reserved */ .word EXTI16_PVD_IRQHandler /* EXTI Line 16 interrupt /PVD through EXTI line detection interrupt */ .word TAMP_STAMP_IRQHandler /* Tamper and TimeStamp interrupts through the EXTI line */ .word EXTI22_RTC_WKUP_IRQHandler /* EXTI Line 22 interrupt /RTC Wakeup interrupt through the EXTI line */ .word FLASH_IRQHandler /* FLASH global interrupt */ .word RCC_IRQHandler /* RCC global interrupt */ .word EXTI0_IRQHandler /* EXTI Line0 interrupt */ .word EXTI1_IRQHandler /* EXTI Line1 interrupt */ .word EX
Hello,I want to use the Timer1 CH1 and CH1N of the STM32H563ZI with dead time generator and break input functionality. It should behave in that way that when the break input (BKIN) is triggered it should goes to a predigined idle state (for CH1 low and for CH1N goes high). After setting the configuration to PWM mode 1 in that way and run the program on oscilloscope I can observe that eg. when the CH1 is low, CH1N is high and the BKIN triggers, the CH1 keep being low, but the CH1N change it state to low for dead time period and again goes high as a predefined idle state. Is it normal behaviour of the timer that even when the output should be high when BKIN occure it is pulling down for dead time and after dead time it is enabling the idle states?
Hi Team, I made a custom board using STM32F769BIT microcontroller using with the DP83867 PHY in MII mode, but I am not able to ping it. What could be the possible reasons? I did Memory configurations for TxDecrip, RxDecrip, LwipHeap like this. .lwip_sec (NOLOAD) : . = ABSOLUTE(0x2007C000); *(.RxDecripSection) . = ABSOLUTE(0x2007C0A0); *(.TxDecripSection) . = ABSOLUTE(0x2007C140); *(.LwIPHeap) also my SRAM configuration is like this_ MEMORY RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 496K SRAM2 (xrw) : ORIGIN = 0x2007C000, LENGTH = 16K FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 2048K I am using the 10pin STM32 debugger, but I am not able to see the stack usage there, when I press the debug button. Is it due to code or due to the debugger? For this should I need the 20pin debugger? Thanks, Sayan Das
In STM32G474.svd version 2.1 that can be download from STM32G474RE product page , WWDG peripheral has no interrupt defined but it is actually the first (0th) interrupt. Is this a mistake or there is a reason behind not defining it in the SVD ?
Interrupts not in proper peripherals:- WWDG is placed in I2C2,- TIM8_CC is in peripheral TIM1,- LPTIM1 is in LPUART1,- USB_HP, USB_HPLP & USBWakeUP are in EXTI,- CRS is in the EXTI as well.
I'm looking for a solution for regarding this simple problem: This concerns the NemaGFX library for the GPU2D.Using the latest NeoChromSDK_NEMAP_1.4.17, some functions have been replaced by new ones, in short: Deprecated New-----------------------------------------------------------nema_vg_paint_set_stroke_width nema_vg_stroke_set_widthnema_vg_draw_ring_generic nema_vg_draw_circular_ring (not defined?)We will find this part in the nema_vg.h header file:nema_vg_draw_ring_generic: This function is deprecated use nema_vg_draw_circular_ring instead. However, the problem is that nema_vg_draw_circular_ring seems undefined in any of the header files. I reported the problem as follows: Good morning Pavan,This concerns NeoChromSDK_NEMAP_1.4.17I have updated the libraries to the latest version of NeoChromSDK.A few functions are deprecated: Deprec
In stm32u5xx_hal_flash_ex.c, version 1.6.2, FLASH_OB_GetUser() is defined as:/** * @brief Return the FLASH User Option Byte value. * @retval The FLASH User Option Bytes values. * The return value can be a combination of @ref FLASH_OB_USER_BOR_LEVEL, * @ref FLASH_OB_USER_nRST_STOP, @ref FLASH_OB_USER_nRST_STANDBY, * @ref FLASH_OB_USER_nRST_SHUTDOWN, @ref FLASH_OB_USER_SRAM_RST, * @ref FLASH_OB_USER_IWDG_SW, @ref FLASH_OB_USER_IWDG_STOP, * @ref FLASH_OB_USER_IWDG_STANDBY, @ref FLASH_OB_USER_WWDG_SW, * @ref OB_USER_SWAP_BANK, @ref FLASH_OB_USER_DUALBANK, * @ref FLASH_OB_USER_BKPRAM_RST, @ref FLASH_OB_USER_SRAM3_ECC, * @ref FLASH_OB_USER_SRAM2_ECC, @ref FLASH_OB_USER_SRAM2_RST, * @ref FLASH_OB_USER_nSWBOOT0, @ref FLASH_OB_USER_nBOOT0, * @ref FLASH_OB_USER_PA15_PUPEN, @ref FLASH_OB_USER_IO_VDD_HSLV, * @ref FLASH_OB_USER_IO_VDDIO2_HSLV and @ref OB_USER_TZEN */ static uint32_t FLASH_OB_GetUser(void) { uint32_t user_config = READ_REG(FLASH->OPTR); CLEAR_BIT(user_config, FLASH_OPTR_RDP); re
Dear all,I’m seeing unexpected behavior on an STM32N657. A timer is configured to generate an interrupt every 1 ms, and this works as expected.I would like to use WFI to stop execution and wait for that timer interrupt. I surround the WFI with the usual barriers (DSB before, ISB after). However, when I use WFI, the timer no longer synchronizes and the interrupt is never taken. With WFE, the system resumes correctly, but that is not the functionality I need.The same code works on my other ST targets (M3, M4, M7, M33), and it also works on a non-ST Cortex-M55. I haven’t found anything relevant in the errata.Could you please advise or point me to any known issues or configuration requirements related to WFI on the STM32N657?Many thanks in advance.Kind regards,Edo
Hello,I'm working on a BLE Key Fob with 4 buttons operating on a CR2032 coin-cell battery. The goal is that the device sends a "key pressed" data with the status of all the buttons and the battery voltage a short time of period (a couple of seconds), then the device enters in to STOP2 mode, and only wakes up when a key is pressed. The data pack is formatted in BT Home format.I used the BLE Beacon example. Currently I've managed to read the button states and the supply voltage level, make a BT Home packet, and advertise the data. However, I can't get the MCU to switch to STOP2 mode. With the CFG_LPM_SUPPORTED enabled the current consumption is approx. 100µA with a beacon interval of 1s. There are questions about stopping the advertisement, but there is not a clear answer that I could use in my project. What is the correct approach in order to achieve my requirements?Thanks in advance.Best Regards,Fatih
HiI have to connect an STM34 Nucleo board to a TMC2209. I have to setup a single wire UART. Only TX is connected with the TMC board.I transmitted a datagram and when I try to receive the response I get back the initial data I have e sent.Does anybody know what could be happening?does anyone has experience controlling a stepper motor with TRINAMIC TMC2209?Please, I need help. I am in a bit of a hurry.Best regards, Raúl
Product: SMT32C013Issue: firmware download in bootmodeDetails: I’ve recently started firmware development and, with community help, I’ve managed to create firmware for STM8 and several STM32 devices. Until now, I’ve always programmed the MCU using ST-Link—either by debugging or by drag-and-dropping the binary file. Due to new system design requirements, I’d like to create a GUI tool to download firmware using the built-in bootloader. According to AN2606 and the MCU datasheet (STM32C013 series), the bootloader supports two interfaces: USART1 on PA9/PA10 I²C on PB6/PB7 Here are my questions: If PA9/PA10 and PB6/PB7 are already allocated to GPIOs for LEDs, buttons, or other connectivity, can they still be used for bootloading? Or does their existing allocation block firmware download? If those pins are unavailable, are there any alternative methods to download firmware via bootloader (besides ST-Link)? What is In-Application Programming (IAP) bootloading approach? B
Hi, is there a recommended minimum clock frequency to reliably run an RC5 transmitter with IRTIM?Thanks, Lance.
Hi ST community,I am using the B-L4S5I-IOT01A board to record 3 sec of 16 kHz audio using DFSDM + DMA, and then transmit it offline via UART (after recording is complete). Since two MP34DT01-M microphones are connected to DFSDM Channel 2, I configured Filter 0 to use only one microphone. I am using a Python script to receive the DFSDM data and save it in .WAV format. I am able to record 3 sec of audio; however, when I play the audio on my laptop, it seems to play at 10× speed.Here is my code : #define SAMPLE_RATE 16000 #define RECORD_SECONDS 3 #define TOTAL_SAMPLES (SAMPLE_RATE * RECORD_SECONDS) #define DFSDM_BUFFER_SIZE TOTAL_SAMPLES #define UART_TX_TIMEOUT 1000 static int32_t dfsdm_rec_buf[DFSDM_BUFFER_SIZE]; // Raw 32-bit DFSDM samples static int16_t audio_output[DFSDM_BUFFER_SIZE]; // 16-bit PCM samples static volatile bool record_done = false; extern DFSDM_Filter_HandleTypeDef hdfsdm1_filter0; extern UART_HandleTypeDef huart1; int16_t clamp(int32_t val, int32_t min,
I’ve just started learning STM32 and I’m currently using the STM32F411E-Discovery board. I loaded the default code provided by the Board Selector in STM32CubeIDE and was trying to get a simple LED blink working. It works fine when using the internal HSI clock, but it doesn’t seem to work when I switch to the external HSE clock. The only different is:HSI:RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; RCC_OscInitStruct.HSIState = RCC_HSI_ON; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; RCC_OscInitStruct.PLL.PLLM = 16; RCC_OscInitStruct.PLL.PLLN = 336; RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV4; RCC_OscInitStruct.PLL.PLLQ = 7;HSE:RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE; RCC_OscInitStruct.HSEState = RCC_HSE_ON; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; RCC_OscInitStruct.PLL.PLLM = 8; RCC_OscInitStruct.PLL.PLLN = 336; RCC_OscInitStruct.PLL.PLLP = RCC_PLL
Hi,I have a STM32F103C8T6 configured to operate as an I2C slave device on I2C1. It operates as intended for 30-45 minutes before the I2C hangs indefinitely with a HAL I2C state code of 0x2A = HAL_I2C_STATE_BUSY_RX_LISTEN. In this state, further I2C transmissions won't occur but the main code loop will continue to execute without issue.I've tried restarting and resetting the I2C with the inbuilt HAL commands when in this state without success. However, whilst probing with a STLINK debugger to observe the code, merely adding a break point once the I2C is hanging (even if the break point is in a section of code that won't be triggered) will fix the issue immediately.Any pointers or ideas for fixing it would be greatly appreciated, the non-HAL I2C slave functions I used are below: extern I2C_HandleTypeDef hi2c1; uint8_t rxData[8] = {0, 0, 0, 0, 0, 0, 0, 0};uint8_t txData[8] = {0, 0, 0, 0, 0, 0, 0, 0};uint8_t newData = 0;uint8_t rxCount = 0;uint8_t txCount = 0; void HAL_I2C_L
I’ve been experimenting with STM32 microcontrollers for a battery-powered IoT project. While I’ve tried different sleep modes, I’m still struggling to balance performance and battery life.Has anyone here implemented effective strategies for ultra-low power applications? Any tips or code examples would be appreciated.
Hi, Im new to STM32 and writing a bare metal interrupt based i2c library. For some reason addr bit clears itself automatically even though im not reading sr1 and sr2. I also have problems with debug mode, if i decide to step over the function that sets up the interrupt for I2C1_EV_IRQ it sometimes causes debugger to skip the interrupt, it happens randomly. I had some problems with the built in debugger. void I2C_ReceiveData(I2C_Com* i2c, uint8_t address, uint8_t deviceRegister, uint8_t* data, uint8_t length) { if(!i2c->isBusy) { i2c->i2cReg->I2C_CR1 |= (1 << 10); i2c->deviceAddress = address; i2c->deviceAddress <<= 1; i2c->deviceRegister = deviceRegister; i2c->registerNotSent = 1; i2c->txLength = 0; i2c->rxBuffer = data; i2c->rxLength = length; i2c->isBusy = 1; i2c->repeatedStart = 1; i2c->i2cReg->I2C_CR2 |= (1 << 9); i2c->i2cReg->I2C_CR2 |= (1 << 10); SetNVIC(I2C1_EV_IRQ_NUM
I am trying to make a guitar loop pedal with my nucleo-l476rg board. It has 1MB of flash and I am trying to write and read from bank 2 only as it is the bank of memory I want to use for storing recorded audio. I currently have an active buffer set up between my ADC and DAC and it works well. My goal is to continue to have this active passthrough while recording and playing. It currently stays active when recording however, my DAC shuts off or I read on open circuit from my multimeter when I press the play button. I believe my issue is with either how I am writing to FLASH memory or reading from it. I am using two buffers to achieve this active passthrough while recording as one buffer stores samples while the other is being written to memory and then the buffers reverse. This buffering I believe is working properly as I've been testing which code is running with the on-board LED however i dont think memory part of my code is working. I am coding this at the register level. I've attache
I'm attempting to configure SPI1 on an STM32G031. However I must be missing something because there is no data being output. I am trying setup SPI to transmit 16 bits at a time. Any suggestions would be appreciated. I'm running the uC at 64Mhz.// Configure PA4 as the SPI select pin //----------------------------------------------------------------------------- void spi::nss( ) { GPIOA->MODER &= ~(GPIO_MODER_MODE4); // clear the mode bits for PA4 GPIOA->MODER |= GPIO_MODER_MODE4_0; // Set PA4 as output mode GPIOA->OTYPER &= ~(GPIO_OTYPER_OT4); // Push-pull output on PA4 GPIOA->OSPEEDR |= GPIO_OSPEEDR_OSPEED4; // Set PA4 for High Speed GPIOA->PUPDR &= ~(GPIO_PUPDR_PUPD4); // No pull-up/pull-down on PA4 }; // end css // Configure pin PA5 as the SPI clock pin //----------------------------------------------------------------------------- void spi::sck( ) { GPIOA->MODER &= ~(GPIO_MODER_MODE5); // clear th
I am working on my custom PCB and trying to get serial output from a BNO055 (via I2C) and a SEN0257 (analog sensor).I can successfully upload and run SPI code for the SD card, and it works.My servo motors also work fine with uploaded code.However, when I try to use the BNO055, I shared the schematic and my code, I get no data on the serial monitor.I checked my PCB: there is no short circuit on the MCU or sensor circuits.On the I2C bus, I can measure 3.3V from the SCL and SDA pull-up resistors.For reference, here is the code I’m using for the BNO055:https://github.com/yzeybek/BNO055_TEST/blob/main/Core/Src/main.c On the SEN0257, I can measure an analog voltage when the sensor is plugged in, but still no data appears on the serial monitor.Here is the code for SEN0257:https://github.com/yzeybek/SEN0257_TEST
Hi, I am having issues with threadX tx_byte_allocate throwing a hard fault exception. This only happens after some time of byte allocate and release. There are still plenty of available bytes according to the pool. But somehow in _tx_byte_pool_search it encounters some problem. I am not posting the entire source code here as that will be huge. Anyway, I am using STM32H753. I created a byte pool using DTCRAM (128K). Linker snippet: RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K .ram_dtcmram : { *(.ram_dtcmram) } >RAM Code Snippet #define RAM_DTCMRAM \ __attribute__((section(".ram_dtcmram"))) #define GENERIC_MEM_ALLOCATION (0x20000-0x1000) static u8 m_genericMemBytePoolBuffer[GENERIC_MEM_ALLOCATION] RAM_DTCMRAM; static TX_BYTE_POOL m_genericMemBytePool RAM_D3; bool Hal_MemPool_Init(void) { if (tx_byte_pool_create(&m_genericMemBytePool, "Generic memory pool", m_genericMemBytePoolBuffer , GENERIC_MEM_ALLOCATION) !=
here is the code I am trying uint8_t whoami_reg[1];whoami_reg[0] = 0x4F | 0x80; // read commanduint8_t whoami_val[1];whoami_val[0] = 0; HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4, GPIO_PIN_RESET); // CS lowHAL_SPI_Transmit(&hspi1, whoami_reg, 1, HAL_MAX_DELAY);HAL_SPI_Receive(&hspi1, whoami_val, 1, HAL_MAX_DELAY);HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4, GPIO_PIN_SET); // CS high whoami_val[0] should be = 0x40I tried all the possible settings CPOL (HIGH and LOW) , CPHA ( 1 edge and 2 edge) , slower baud and nothing, I read some posts other people had problem too with SPI but apparently made it working only with I2CI even tried to solder another LIS2MDLTR and another, nothing!
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.