Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hey all,For reference I am enabling the https server using NetxDuo Stack for firmware update in my device.Initially we were using Internal Flash but now we are interested in External Flash particularly SDRAM. I was able to boot the application code from SDRAM, however i am facing a problem, whenever i call a rest API like GET request a hardfault occurs where the stack traces shows it is originated over _nx_crypto_sha256_update() function in the nx_crypto_sha2.c file over the use the memcpy(). The strange thing is everything works with no hardfault when application work in Internal Flash.Furthermore, I am able to run RTOS on SDRAM and i can ping my IP on ethernet as well.Kindly someone help me out for this, i will be grateful.Also if i should report this behavior somewhere else?Thanks
Hi!I'm having an issue with the CDC class for USB on my STM32L476 board. I am using the Receive function in usbd_cdc_if.c file to track incoming Modbus traffic from USB. I am noticing that when I write multiple registers (function code 0x10) to the slave using Modbus Poll Software, the incoming buffer always has the last byte as 00. Here are some images to help explain:The following image is a Communication Log from Modbus Poll Software that shows the Modbus Frame being sent:Notice the highlighted portions, which are the CRC Lo and CRC Hi bytes. I also confirm with a USB sniffer program that these exact frames are being sent to the slave. Also note that the first frame is function code 0x06 (Write Single Register), and the remaining frames are function code 0x10 (Write Multiple Registers). Now, here is the incoming Buf in usbd_cdc_if.c, printed to the terminal right away:Notice that for the first frame (Write Single Register), the CRC bytes at the end are intact and matches what w
Hello,I drived lcd by using partial frame buffer. Now, I am trying to update it with double buffer strategy. The LCD has TE pin that helps checking Vsync.I could not find a clear example for double buffering method. I don't need FMC since internal ram is enough for driving.Do you have any example or steps that I need to follow for those specs:Touchgfx with double buffer + FreeRTOS (CMSIS V2) + SPI LCD (With TE pin) Touchgfx Version : 4.25.0CubeIde Version : 1.17.0MCU : H7 seriesBest regards,Faruk
Hi all,I would like to create a custom slider with 2 indicators of the lock when they lock vs. unlock and 2 background image text with Lock and Unlock texts.I similar like a toggle button, but it actions like a slider; once it goes to the left is locked and right is unlocked.Is there anyway I can achieve this? Thank you.
Hello, I work on a STM32F042G6Ux mounted on a custom board, and I want to automatize the flash by using command line and STLink (I'm using V2-1 one). STM_CLI works well to unlock the reading, unfortunately I read that ST won't deploy it on ARM architecture, and I want to work on Raspberry Pi. That's why I decided to use OpenOCD (v0.12.0) to flash my STM32. However, there's a problem using it : I have to switch power supply to apply the changes on the option bytes. I want my command line fully automated, and this is problematic. config.cfg : adapter driver hla hla layout stlink hla stlink_backend usb hla_vid_pid 0x0483 0x3744 0x0483 0x3748 0x0483 0x374b 0x0483 0x374d 0x0483 0x374e 0x0483 0x374f 0x0483 0x3752 0x0483 0x3753 0x0483 0x3754 0x0483 0x3755 0x0483 0x3757 transport select hla_swd source [find target/stm32f0x.cfg] reset_config srst_only srst_nogate openocd command : openocd -f config.cfg -c 'adapter serial stlinkid' -c init -c 'reset halt' -c 'stm32f1x unlock 0' -c 'reset halt' -
Hello,I am currently using the STM32H7S78-DK development board. I would like to run TouchGFX together with ThreadX (Azure RTOS).Specifically, I would like to know:How to configure the project in STM32CubeMX to enable both TouchGFX and ThreadX.How to properly set up the system tick / timebase so that ThreadX and TouchGFX can work together without conflicts.Whether there is a simple example or reference project available for STM32H7S78-DK showing TouchGFX running under ThreadX.A step-by-step tutorial or minimal example project would be very helpful.Thank you in advance!
Hello everyone,I am using Nucleo H745ZI dual core and I want to communicate intercore by OpenAMP.The ST only giving example send message from core M7 to M4. But I want to send message from core M4 to M7, I tried follow the OpenAMP flowchart but not working.Do anyone has the example of OpenAMP send message from M4 to M7?
Hi,My battery (++ LTO/Bucks) that runs everything on my PCBA is connected to VBAT (pin 1). Before the connection I have a voltage divider factor of roughly 1.374, but what I read on the pin via ADC1 channel 18 (what VBAT is routed to internally) seems to be non-sensical. With a battery voltage of 3.6V I measure roughly ~1160 mV (after multiplying by 4 and 1.374). When I tried replacing the resistors in my voltage divider by smaller ones I got higher measurement values.VBATEN is enabled in ADC12_COMMON_CCR. Also tried to enable MONEN in PWR_BDCR1, but that didn't make any difference.What's could be the issue here?
I'm trying to drive the PWM of an STM32G0 but the waveform generated had an inconsistent period between bit 0 and bit 1, and I can't understand why I'm using TIMER 4 on Channel 2. On the main.c I'm initializing MX_DMA_Init void MX_DMA_Init(void) { /* DMA controller clock enable */ __HAL_RCC_DMA1_CLK_ENABLE(); /* DMA1_Channel2_3_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA1_Channel2_3_IRQn, 0, 0); HAL_NVIC_EnableIRQ(DMA1_Channel2_3_IRQn); } and TIM4 configured as void MX_TIM4_Init(void) { /* USER CODE BEGIN TIM4_Init 0 */ HAL_TIM_Base_DeInit(&htim4); /* USER CODE END TIM4_Init 0 */ TIM_ClockConfigTypeDef sClockSourceConfig = {0}; TIM_MasterConfigTypeDef sMasterConfig = {0}; TIM_OC_InitTypeDef sConfigOC = {0}; htim4.Instance = TIM4; htim4.Init.Prescaler = 0; htim4.Init.CounterMode = TIM_COUNTERMODE_UP; htim4.Init.Period = 60 - 1; htim4.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim4.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE
Hi,I'm getting build error after configuring the ethernet with LWIP. not sure what is the issue.Attaching the screenshot for the reference.attaching the code for reference. please help me to debug. as I'm facing this for ethernet configuration. what additional changes needs to be done in the flash or somehwhere as its memory related issue.Thanks,Harshitha
The errata for the STM32U575 series includes the following: We would like to use the first option of the 2 listed workarounds (the one that does NOT require disabling and reenabling the ICACHE). Does ST have any implementation examples of this workaround? I am confused about why it is necessary to put the low-power entry code in a non-cacheable region. We use a WFI instruction to put the MCU into STOP mode. If we could ensure that the WFI was in the last 2 bytes of a 16-byte block of memory, would that fix the errata? This way, the next instruction after WFI (and thus the 1st instruction executed outside of STOP mode) would be guaranteed to be in the next cache line. In that case, would the WFI and preceding code need to be in a non-cacheable region? Thanks!
I have the STM32N6570-DK board, and I was able to execute the example from:- https://github.com/STMicroelectronics/STM32N6-GettingStarted-ObjectDetectionFollowing the steps provided in the workshop:- https://www.youtube.com/watch?v=29EUWNwfywI&list=PLTJzs51NlEICI7ARAHOyUqMhTgJE0UFv0&index=6- https://www.youtube.com/watch?v=VV9f5e3nqM4&list=PLTJzs51NlEICI7ARAHOyUqMhTgJE0UFv0&index=7---However, after I was able to execute it at first, I tried to convert my own model and modify the example just to execute my own Yolo model, just to execute the inference and perhaps get the inference time via UART.The conversion worked fine using the stedgeai (version 2.2) command; however, it didn't work on the board on the first try, which was expected.After a few failed tries, I removed all of my local changes and loaded the initial example binary, the "Model/STM32N6570-DK/network_data.hex" and the application binary again, using the board in development mode. To my surpri
I'm currently tinkering with the BLE_Ota example for the P-NUCLEO-WB55.Nucleo and created a debug build spec for it. The default linker script is /* Specify the memory areas */ MEMORY { FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 28K RAM1 (xrw) : ORIGIN = 0x20000008, LENGTH = 0x2FFF8 RAM_SHARED (xrw) : ORIGIN = 0x20030000, LENGTH = 10K }but the image built with the debug build spec is larger, so the length of the flash area to use must be adjusted: /* Specify the memory areas */ MEMORY { FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 32K RAM1 (xrw) : ORIGIN = 0x20000008, LENGTH = 0x2FFF8 RAM_SHARED (xrw) : ORIGIN = 0x20030000, LENGTH = 10K } that made me wonder, is it possible to define constants in the build specs such that conditional statements (e.g using the DEFINED statement) inside the .ld file can be used? something like FLASH (rx) : ORIGIN = 0x08000000, LENGTH = DEFINED(DEBUG) ? 32K : 28K
In 'F427 (and all RTCv2-containing STM32), some RTC registers are write protected: prior writing to them, it is necessary:1.enable backup domain access by setting PWR_CR.DBP2. unlock a RTC write protection by writing two key values into RTC_WPR Breakpoint 4, main () at rrr.c:37873 37873 int main(void) { (gdb) p /x *RTC $91 = {TR = 0x150002, DR = 0x258717, CR = 0x20, ISR = 0x17, PRER = 0x7f00ff, WUTR = 0xffff, CALIBR = 0x0, (gdb) p /x *RTC $92 = {TR = 0x150007, DR = 0x258717, CR = 0x20, ISR = 0x17, PRER = 0x7f00ff, WUTR = 0xffff, CALIBR = 0x0, --- we see clock is running (RTC_CR.BYPSHAD = 1 so we don't need to worry about the readout locks) (gdb) set RTC->ISR=RTC_ISR_INIT (gdb) p /x *RTC $93 = {TR = 0x150024, DR = 0x258717, CR = 0x20, ISR = 0x17, PRER = 0x7f00ff, WUTR = 0xffff, CALIBR = 0x0, --- we see writing RTC_ISR_INIT had no effect, we haven't removed either of the protections (gdb) set RCC->APB1ENR|=RCC_APB1ENR_PWREN (gdb) set PWR->CR|=PWR_CR_DBP (gdb) set RTC->
Hello. I am currently developing a board using the stm32f411ret6 chipset. I confirmed that the first firmware download worked properly on one of the boards I am developing. However, after attempting to download the second firmware, I encountered an issue where the option byte was displayed as 0xFF. I tried changing the option byte in various ways, but all attempts failed. Furthermore, I attempted to boot using the system bootloader, but it failed. Could the flash memory itself be damaged? Below is the link to my initial community inquiry. https://community.st.com/t5/stm32-mcus-products/what-is-the-way-to-fix-stm32f411re-option-bytes-0xff-error/m-p/832817#M284580 Thank you *This post has been translated from Korean to comply with the ST Community guidelines.
Hi guys, I have a STM32 NUCLEO-H753ZI board and the overall goal is to run open62541. In order to do that, I need a working LwIP stack and Ethernet connection. I have done a lot of research and tried multiple settings, but can´t get it working. Below, I´ll describe what I have done so far / settings in the .ioc I have made.It would be awesome if you could tell me, where my mistake is. Using STM32CubeIDE Version: 1.19.0 Build: 25607_20250703_0907 (UTC). Clock Configuration:Input frequency = 8MHz -> PLL Source Mux = HSE -> System Clock Mux = PLLCLK (Enable CSS) -> SYSCLOCK = 400 MHz -> D1 CPRE Prescaler = /1 -> 400 MHz -> HPRE Prescaler = /2 -> 200 MHz-> D1 PPRE, D2 PPRE1, D2 PPRE2, D3 PPRE = /2 System Core:RCC: HSE = BYPASS Clock SourceLSE = CrystalPower Regulator Voltage Scale = Power Regulator Voltage Scale 1SYS:Timebase Source = TIM6NVIC:Ethernet global interrupt = Enabled, Preemption Priority = 5Ethernet wake
I'm creating an I3C target device. It uses an STM32U385RG as the microcontroller. According to the reference manual most bits of the Provisional ID are fixed and cannot be configured. This doesn't seem to allow for creating an I3C target device using my own MIPI manufacturer ID. Is that correct? Or is there some other way to provide a fully customizable Provisional ID?If not configurable this seems like it makes the Provisional ID useless as it will be identical for all I3C target devices from all designers at all companies...
In the STSPIN32G0601 device, the stm32g031 controller core has internal connections to complementary gate drivers. The outputs from the stm32g031 that can be configured with alternate function complementary signals (PA7, 8, 9, 10, PB0 and 1) are not used though. Internal connections in the STSPIN32G0601 are PA8, 9, 10, PB13, 14, and 15. I need to program a 3-wire, 2-phase signal that has a pulse frequency of 3,840Hz. I can do this with 3 separate output compare interrupts with each interrupt service routine writing to 2 pins. This is cumbersome compared to using the timer peripheral's PWM capabilities which are not available due to internal signal wiring. I have found nothing in the MCSDK development software that addresses this; so, I am coding in STM32CubeIDE. MY QUESTION IS: am I overlooking a simpler way to approach this?
I want to use N657B0 to drive VD55G0, and the camera side can already enter the Stream state. After I use the function HAL_DCMIPP_CSI_PIPE_Start, I track the variable csi_instance through single-step debugging and find that several bits in its SR1 register are inconsistent with the normal state. And I find the defination about these.The normal state is 1 but I get 0.Could you please tell me what the reason for this might be? Is the issue caused by a voltage supply problem in the hardware connection, or by inadequate rate matching in the port?That is my configuration.
Hi I am using Timer2 with Prescaler 83 and up counter of period 49 to be triggered after every 50us. But I am using an ADC and I want to turn it on every 330us. So after 6 interrupt triggers, I turn on the ADC but I need to generate a 30us delay before each ADC turn ON. I want this to occur infinitely in a loop. I have tried using a counter function as below void ADC_Delay(uint16_t us) { __HAL_TIM_SET_COUNTER(&htim2, 0); while (__HAL_TIM_GET_COUNTER(&htim2) < us); } But I am seeing this delay only on the first loop and not getting the delay in subsequent loops before ADC is turned ON. I have tried various methods even using DWT count and I am still facing the same issue. Please help me solve this bug. Thanks & Regards Srinivas Edited by ST moderator to be inline with the community rules especially with the code sharing. In next time please use </> button to paste your code. Please read this post: How to insert source code
Hello all, This is my first post on here, if I am in error at any point please direct me to any relevant posting guidelines. I am developing a sender-receiver solution involving two STM32H753 microcontrollers, both on ST's NUCLEO-STM32H753 boards. I am using USART3 to transmit and receive one byte using DMA. The sender receives one byte (for example 'S') and the receiver receives one byte, checks whether it matches 'S', and if it does, it toggles the yellow on-board LED. If it does not match, it toggles the green on-board LED. This check is being done in the HAL_UART_RxCpltCallback() function. I am facing an issue where the first time the HAL_UART_RxCpltCallback triggers after the receiver is reset, it toggles the green LED once (meaning that the received byte did not match with the expected data), and then continuously toggles the yellow LED (meaning that the received byte does match the expected data, this is the desired behaviour). When I went to debug the receiver, I
I want to use TouchGFX Designer in a Project for which no .ioc file exists, but generating code in the Designer fails because of the missing .ioc file.Is it possible to work around this? If I need to use a dummy .ioc file, which settings are relevant for the Designer?
I'm using a coloured box as a background for some dynamic text. I would like the background to match the width of the text when it changes.I can change the width of the box to match the text width, but the box's fill colour will not fill to match the new box width.This is the code I'm using.memset(&textValueBuffer, 0, sizeof(textValueBuffer)); Unicode::fromUTF8((const uint8_t*)it->second.data(), textValueBuffer, it->second.length()); textValue.resizeToCurrentText(); textValue.invalidate(); box1.setWidth(textValue.getWidth()); box1.invalidate(); Is this possible in TouchGFX?
Hi, I am successfully builded and flashed TFM_Azure_IoT application at X-CUBE-AZURE(v2.3.0) package. You can see teraterm port output at attachment.I looked in to MCU software packages for B-U585I-IOT02A i found "STM32Cube_FW_U5_V1.8.0\Projects\B-U585I-IOT02A\Applications\SBSFU" application that runs test for protection. In X-CUBE-AZURE(v2.3.0) test_protections header and source file name and locations changed."B-U585I-IOT02A\Applications\SBSFU\SBSFU_Appli\NonSecure\Inc\test_protections.h" to "B-U585I-IOT02A\Applications\TFM_Azure_IoT\TFM_Appli\Secure\Inc\test_protections.h" test_protections header file moved to secure app folder. "B-U585I-IOT02A\Applications\SBSFU\SBSFU_Appli\NonSecure\Src\test_protections.c" "B-U585I-IOT02A\Applications\TFM_Azure_IoT\TFM_Appli\Secure\Src\app_rot_test.c" test_protections source file moved to secure app folder and changed name. When try to run the test at non secure side its giving me error undefined reference to `TEST_PROTECTIONS_Run'. Why im getting
Hello Team, We are planning to use STM32H7S7L8H6 in our new design.We want to interface IS21EF04GP-JQLI-TR eMMC with STM32H7S7L8H6.So, for this STM32H7S7L8H6 required only 3.3V supply right?It will be to communicate with eMMC IS21EF04GP-JQLI-TR. So, please provide your guidance for this. Thanks & Regards,Jignesh Karena
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.