Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi Guys, for an internship I am making a dual channel datalogger. So for that datalogger, I am using DS1338 RTC. Now instead of doing I2C normally, I am doing Bit-banging. I am using Nucleo-F030R8 board for my prototyping and I am using PA0(SDA) and PA1(SDA). After using DSO I was able to verify start condition, stop condition and slave address transfer. Also I tried to test ack by manually pulling the sda down and the output was as expected. Now the issue is I am not able to write or read the RTC and I am getting FFFF while reading it. And there are no hardware issues as I have tested the RTC. This makes me think there is problem with my I2C read function. Following is the snippet of code I am using for this purpose -#define I2C1_SDA_HIGH() (GPIOA->BSRR = (1U << SDA1_PIN)) #define I2C1_SDA_LOW() (GPIOA->BSRR = (1U << (SDA1_PIN + 16))) #define I2C1_SCL_HIGH() (GPIOA->BSRR = (1U << SCL1_PIN)) #define I2C1_SCL_LOW() (GPIOA->B
Hello,I am working with an STM32U585I-IOT02A development board and using STM32CubeProgrammer.I changed the RDP level to DC and set a password. After that, I am unable to get back to RDP level AA.I tried entering the correct password, but the unlock option does not disable the protection.I also attempted the "unlock RDP1 level" process, but it does not seem to work.Currently, I am unable to flash any code onto the device.Is there any way to recover the board back to RDP AA level and make it programmable again?What is the correct procedure to unlock the RDP DC level after a password has been set?Thanks in advance.
I want to use mcsdk v6 to run ac induction motor in open loop mode (V/F). how should I do it?
Hi everyone,I’m currently working with the STM32H533RET6 and I’m wondering whether an external crystal oscillator is required (or at least recommended) for reliable communication over RS485 and CAN.From my understanding, even at the highest baud rates, the internal clock (HSI) should be accurate enough for both interfaces, since the STM32’s internal oscillator is fairly precise and stable.So my questions are:Is the internal clock sufficient for high-speed RS485 and CAN communication?Under what conditions would it be better or necessary to use an external crystal (HSE)?Thanks in advance for any insights or practical experience!
Hello,Just before I tried to debug STM32L052 via ST-Link but following error occurred.The error message is as following.It's strange that I could debug and run with same project yesterday and nothing is changed as for project.What is the problem and how to solve it?Thanks,STMicroelectronics ST-LINK GDB server. Version 7.9.0Copyright (c) 2024, STMicroelectronics. All rights reserved.Starting server with the following options:Persistent Mode : DisabledLogging Level : 1Listen Port Number : 61234Status Refresh Delay : 15sVerbose Mode : DisabledSWD Debug : EnabledInitWhile : EnabledTarget unknown error 19Error in initializing ST-LINK device.Reason: Unknown. Please check power and cabling to target.
To the ST Technical Support Team: I have a question regarding the use of the STM32WB55 USB Dongle. This board features both an onboard antenna and an IPEX antenna connector. However, the schematic indicates that the components for the IPEX interface are not populated. I have three questions: (1) Is this connector functional as it is?(2) Do I need to solder capacitors to it, and does ST provide soldering services? The board is already quite challenging to solder on.(3) Does ST offer a version of this development board that comes with the IPEX antenna pre-installed?
I am new to the STM32N6 and wanted to to knwo where could I get the documentation that explains the APIs of every peripheral in the STM32N6 MCU.
I’m using the STM32F401RET6 board, collecting data from a USB accelerometer at 16 kHz.I wanted to verify that the data is actually being collected at 16 kHz, and then run an FFT to compare it with previously collected PC data. To do this, I need to transfer the data to the PC.At first, I tried collecting data and transmitting it with HAL_UART_Transmit, but due to the transmission overhead, the actual sampling rate wasn’t 16 kHz—it dropped to about 9 kHz.So I tried using the DMA + double buffer method, where data collection and transmission happen simultaneously. I structured my task like this: void vUSBReadTask(void *pvParameters) { AUDIO_HandleTypeDef *audio_handle; uint8_t *buf; static uint8_t isoc_submitted = 0; for (;;) { MX_USB_HOST_Process(); audio_handle = (AUDIO_HandleTypeDef *)hUsbHostFS.pActiveClass->pData; if (!(audio_handle && audio_handle->microphone.supported)) { // taskYIELD(); continue; } buf = audio_handle->microphone.buf; // Submit
How can the debug interface on the STM32H573 be permanently locked via nonvolatile configuration or fuse?The SBS chapter of the manual saysThe debug configuration can be locked thanks to DBGCFG_LOCK in SBS_DBGLOCKR.SBS_DBGCR is then no longer writable.When DBGCFG_LOCK is set to 1, it can be reset only by system or power-on reset.So SBS_DBGLOCKR is not what I want, as it is not permanent.The manual refers to PRODUCT_STATE in several places. The "SBS Signals" table in the manual says that the sbs_product_state signal comes from Flash memory:Signal based on PRODUCT_STATE option byte to activate the different securitymechanisms depending on the product use. Expected values are described inSection 7: Embedded flash memory (FLASH).However, there is no mention of this signal in Section 7. What is the Flash programming procedure to change sbs_product_state?
HiI am using the function below to erase the flash, but am not able to do the same.I have to erase from address 0x0803E000UL i.e. page 124The function does basically 1. HAL_FLASH_Unlock2. HAL_FLASHEx_Erase(&erase_init, &page_error) - where page is 124 3. reads the erased flash area 4. HAL_FLASH_LockAm I missing something? I would not prefer to run the function in ramI have MCUboot running and my application running on slot 0 is based on FreeRTOS. I am trying to erase slot1. #define SLOT1_BASE_ADDR 0x0803E000UL void erase_slot1_flash(void) { HAL_StatusTypeDef status; uint32_t page_error = 0; FLASH_EraseInitTypeDef erase_init; uint32_t page_index; /* Determine actual flash size (in KB) from system memory register */ uint32_t flash_size_kb = *(uint16_t *)FLASHSIZE_BASE; uint32_t flash_start = FLASH_BASE; uint32_t flash_end_addr = FLASH_BASE + (flash_size_kb * 1024UL) - 1UL; printf("SLOT1_BASE_ADDR = 0x%08lX\r\n", (unsigned long)
Hi All, I am a newbie to STM32L432 boards. I am seeing that when i power the STM32L432 board with USB then everything is fine and my code runs and LED stays solid RED.But if i try to start the STM32 board with only VIN i.e. +7V then the RED led i.e. LD1 keeps blinking. I have checked that i followed this - This procedure also works fine - 1) Power up the board using VIN of +7V and LD1 keeps blinking.2) Connecting USB then the LED LD1 turns to solid RED and then disconnect that cable after 5 seconds.3) Then continue to use this. I am guessing here that it is something to do with the bootloader not being able to run from Flash ? But how come just connecting the USB makes it run fine. Is this a known bug ?
Hi, I'm having the following issue with the F103C8 USART DMA.After reset, sometimes the USART DMA Receive doesn't work. It doesn't happen every time, but it happens about once every 10 resets. HAL_UARTEx_ReceiveToIdle_DMA(&huart1, (uint8_t *)RxDataUsart1, 128); __HAL_DMA_DISABLE_IT(&hdma_usart1_rx, DMA_IT_HT); HAL_UARTEx_ReceiveToIdle_DMA(&huart2, (uint8_t *)RxDataUsart2, 128); __HAL_DMA_DISABLE_IT(&hdma_usart2_rx, DMA_IT_HT);void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size) { if(huart == &huart1) { timer_UART1_Datalost = millis(); uart_1_Ready = SET; __HAL_UART_CLEAR_FEFLAG(&huart1); memcpy(copyRxDataUsart1, RxDataUsart1, 128); copyRxDataUsart1[127] = '\0'; usart1Datareceived = 1; for (int i=Size; i < 128; i++)RxDataUsart1[i]=0; } __HAL_UART_ENABLE_IT(&huart1, UART_IT_IDLE); HAL_UARTEx_ReceiveToIdle_DMA(&huart1, (uint8_t *)RxDataUsart1, 128); __HAL_DMA_DISABLE_IT(&hdma_usart1_rx, DMA_IT_HT); if(huar
Hi, I am new to developing on ST32WB0x and would like to put the MCU into deep sleep and wake it up after 2 minutes for a fairly standard application.According to the documentation, it is possible to use the RTC timer.I have tried and tested several configurations of the RTC and NVIC registers, etc., but have never managed to wake up the MCU.I am obviously missing something, and cannot see what configuration is missing.Could you give me a clue or the keys to how the stm32WB05 wake-up works with the RTC timer?THANK YOUHere is an extract from the log to illustrate my attempts:=== TESTING RTC OUTPUT BEFORE DEEPSTOP ===Configuring 3-second test timer to verify PA9 output...RTC time BEFORE test: 00:00:00Re-forcing RTC_OUTPUT_WAKEUP after timer config...RTC_CR after re-force: 0x00E044043-second test timer started - PA9 should pulse in 3 secondsScanning all GPIO pins for RTC signal...GPIOA: 0x000F, GPIOB: 0xC027RTC_IRQHandler called!RTC WAKEUP CALLBACK! #2 - DEEPSTOP should exit now!RTC_
Hi,I’d like to terminate the build process, but pressing F7 causes GfxDesigner(4.24.1) to crash.2025-10-17 13:46:51,280 [1] WARN TouchGFXDomainModel.Texts.FontGetter: font already added. (path: HPSimplified_LtIt.ttf, name: HPSimplified_LtIt 2025-10-17 13:46:51,280 [1] WARN TouchGFXDomainModel.Texts.FontGetter: font already added. (path: HPSimplified_Rg.ttf, name: HPSimplified_Rg 2025-10-17 13:48:35,702 [26] ERROR TouchGFXDesigner.App: Invalid class System.Management.ManagementException: Invalid class at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode) at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext() at TouchGFXApplication.Executors.Executor.Cancel() at TouchGFXApplication.MonitorCommands.RunSimulatorCommand.Cancel() at TouchGFXApplication.TouchGFXApplication.<CancelCompile>b__38_0() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object
I'm losing my mind a little, because this seems like it should be a simple task. I have configured my I2C module to enable DMA and interrupts: I can confirm that my call to HAL_I2C_Master_Transmit_DMA returns OK. I can also confirm that the generated DMA1_Channel2_IRQHandler is called. That's where things start breaking down. Other modules in the HAL library give you a hook (e.g.HAL_GPIO_EXTI_Callback) signature that you can implement and have it be called by the HAL top-level ISR, but it seems like DMA has not implemented that. Instead, the HAL DMA module implements HAL_DMA_RegisterCallback, and you can successfully call it - but then those callback pointers are overwritten by ones in the HAL itself. OK... so then I tried copying some of the code from HAL_DMA_IRQHandler to (re-)determine which DMA flag applies: static void dma_states( const DMA_HandleTypeDef *restrict hdma, bool *restrict is_complete, bool *restrict is_error ) { const uint32_t flag_it = h
We are using IAR embedded workbench for our compiler and debugger (I-jet). I am testing with a STM32H750B-DK board. Running the sample code of QSPI memory mapped. I realized that if I select board as STM32H750-DK, then everything works fine, but if I select STM32H750IB, then the flash reading was always 0x99. What is the difference between the two selections? Does the debugger load extra initialization code for DK board? The source code is exactly the same. Thanks for any help in advance.
Hello ST community.Based on the content of this page, there should be ACIM example files for V/F and FOC motor drives, but after downloading both MCSDK 5.4.7 and 5.4.8, i found no ACIM example file for this topic in MC Workbecnch. Where shoud i get these files?Thank you for your time and support.
Hello,the MRSUBG by STM32CubeMx have a mode of operation named 'Transmit Data control' (not wel descripted by the documentation or examples), when this mode is actived the PIN PA10 change in MRSUBG_TX_DATA and and the bit stream inserted in PA10 pin go straight on the radio module whidout using the buffer. I want the radio works in OOK modulation, when PA10 si set the radio generate the portant frequency, when the PA10 is clear the radio do not generete the portant.This is my code:static void MX_MRSUBG_Init(void) { /* USER CODE BEGIN MRSUBG_Init 0 */ /* USER CODE END MRSUBG_Init 0 */ /* USER CODE BEGIN MRSUBG_Init 1 */ /* USER CODE END MRSUBG_Init 1 */ /** Configures the radio parameters */ MRSUBG_RadioInitStruct.lFrequencyBase = 434150000; MRSUBG_RadioInitStruct.xModulationSelect = MOD_ASK; MRSUBG_RadioInitStruct.lDatarate = 1000; MRSUBG_RadioInitStruct.lFreqDev = 0; MRSUBG_RadioInitStruct.lBandwidth = 100000; MRSUBG_RadioInitStruct.dsssExp = 0; MRSUBG_RadioInitStruc
Hi, Is there a LL Library project example or at least a code snippet of how to transmit uart data using the GPDMA?
I use STM32Cube FW_N6 V1.2.0 to create an FW to run a web server on the DK board. I figured out that I can not talk to the PHY chip to read the PHY ID. I compared the code with another example that ST released and figured out that these codes are missing on HAL_ETH_MspInit __HAL_RCC_ETH1MAC_CLK_ENABLE(); __HAL_RCC_ETH1RX_CLK_ENABLE(); __HAL_RCC_ETH1TX_CLK_ENABLE(); after adding this to my MSPInit function problem was solved! I wonder if this is a bug in this package or if I need to set it in the CubeMX settings?
Hello, I am working with an stm32f429_disc board, which has an onboard i3g4250d gyroscope that communicates via SPI. The Zephyr SDK includes a sensor driver for this specific sensor. However, even though I have defined this sensor under the SPI node in my overlay file, I am getting an undefined reference to __device_dts_ord_... linker error. The strange part is that when I define a sensor with a different compatible string under this same node (for example, bosch-bme280), I don't get any errors. But when I specifically define it as st-i3g4250d, I receive the linker error.My code is as follows; #define I3G_NODE DT_NODELABEL(i3g4250) const struct device* dev_sensor = DEVICE_DT_GET(I3G_NODE);; int main() { if (!device_is_ready(dev_sensor)){ printk("error device is not ready\n"); return 0; } }&spi5 { compatible = "st,stm32-spi"; pinctrl-0 = <&spi5_sck_pf7 &spi5_miso_pf8 &spi5_mosi_pf9>; pinctrl-names = "default"; status = "okay"; cs-gpios = <&gpio
Hi Champs, one of my customers develop on STM32WBA54KGU6. This SoC does not come with SMPS. Although he selects the righ reference (STM32WBA54KGU6) for code generation, SMPS seems to be used by default - he has to comment the line out form generated code to build properly. he uses the latest dev tool versions : IDE : STM32CubeIDE V1.19.0 Firmware STM32CubeWBA : V1.7.0 is it a known issue? please note that it is not a blocking point but it still requires a post code generation control from his side to comment out the generated SMPS statement in the generated code. Warm regards, Agnès
Documentation: RM0390Revision: Rev 7, June 2025Section 26.3.2 Page number 830:Under Simplex communications, it says the RXONLY bit is in the SPI_CR2 register but the register map confirms RXONLY bit is in the SPI_CR1 register.
Hi everyone,I'm currently working on project witch use SPi with DMA and S2LP ModuleI have a function that initializes the DMA portion :In my code I try to read information in DMA through the SpiritDeviceVersion and SpiritReadnbinfifo functions: However, I get my data, but only when I call a DMA read 2 times :nbOctetRecuB = the value I should read from nbOctetRecuA (0xC1)nbOctetRecuB2 = the value I should read from nbOctetRecuB (0x0A, my FIFO element count)nbOctetRecuC = the value I should read from nbOctetRecuB2 (0x0A, my FIFO element count) => whereas I expect 0xC1. Below are one of those function:I don't understand witch element is missing, why i need to perform another DMA operation to get my data ?Just a heads-up, a double DMA operation is needed : so if I read S2LP register with DMA, and after Reread DMA without using SPI (ex no CS command) i get my data, this is what it tell me the problem isen't from the SPI ?Is anyone get tis issue ?Tanks for your time, Regar
-->According to the datasheet and reference manual, I learned that the microcontroller has 64KB of memory, and I tested it and was able to read/write on pages 29, 30, 31. But why does the website say it has 32KB? #define FLASH_SAYFA_SAYISI 3 //#define FLASH_SAYFA_1 0x08006800 //#define FLASH_SAYFA 2 0x08007000 //#define FLASH_SAYFA_3 0x08007800 #define FLASH_SAYFA_1 0x0800E800 //29 #define FLASH_SAYFA_2 0x0800F000 //30 #define FLASH_SAYFA_3 0x0800F800 //31 void Flash_Kayit() { SensorKalibre_t *pFlashData; uint32_t yeni_sira = 0; uint32_t sayfa_adresi = 0; uint8_t sayfa_bul = 0; uint32_t sayfa_adresleri[FLASH_SAYFA_SAYISI] = { FLASH_SAYFA_1, FLASH_SAYFA_2, FLASH_SAYFA_3 }; for (int i = 0; i < FLASH_SAYFA_SAYISI; i++) { uint32_t* sayfa_baslat = (uint32_t*)sayfa_adresleri[i]; if (sayfa_baslat[0] == 0xFFFFFFFF) { sayfa_adresi = sayfa_adresleri[i]; sayfa_bul = 1; break; } } if (!sayfa_bul) { uint32_t eski_sira = 0xFFFFFFFF; for (int i = 0; i < FLASH_SAY
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.