Join conversations with your peers and ST experts. Explore the full potential of STM32 microcontrollers for your embedded design.
Most recent activity
Hi,I just wanted to check if is it dangerous to move the isr_vector inside the text section like this:.text :{. = ALIGN(4);KEEP(*(.isr_vector)). = ALIGN(4);FILL(0x00000000);. = ALIGN(4);*(.text) /* .text sections (code) */*(.text*)*(.glue_7) /* glue arm to thumb code */*(.glue_7t) /* glue thumb to arm code */*(.eh_frame)KEEP (*(.init))KEEP (*(.fini)). = ALIGN(4);_etext = .; /* define a global symbols at end of code */} >FLASHI implemented a CRC32 integrity check and it doesn't work because the gap between the isr_vector and text section is always Fs when I debug with the CubeIDE, but if I download the .elf with CubeProgrammer, the gap is filled with 0s, and in that case it works.TY for your help.
Hardware ConfigurationMCU: STM32F469NIH6Custom Board: Pin-to-pin replica of STM32F469I-DISCODisplay: HF-35040-X365-A0 (3.5-inch, 800x480 RGB parallel interface)SDRAM: IS42S32400J/F (16MB, 0xC0000000)Interface: LTDC (NOT DSI - DSI explicitly disabled)Framework: TouchGFX 4.26.0Working ReferenceThe same display works perfectly on STM32F429 with the same LTDC configuration, so the display hardware is confirmed functional.Problem DescriptionThe display continuously shows RGBW color cycling (white → red → green → blue, repeating every ~1 second) instead of rendering the TouchGFX UI.Critical observation: Changing LTDC configuration parameters (e.g., framebuffer width from 800 to 400 pixels) has NO EFFECT on the display output - the same RGBW pattern continues unchanged.Current LTDC Configuration // Clock ConfigurationSystem Clock: 180 MHz (changed from overdrive to voltage scale 3)PLLSAI: N=192, R=5LTDC Clock: ~25 MHz // LTDC Timing (for 800x480 @
I am currently working with the STSAFE-A110 and I have noticed a significant lack of documentation for those who need to implement or understand the driver logic.For instance, when generating ECC asymmetric key pairs, the official datasheet mentions the Generate Key command (¶ 4) but does not document its I2C syntax or semantics.Although I am using the STSELib middleware, I have found that its APIs, such as stse_generate_ecc_key_pair() also lack exhaustive documentation. A specific example is the PLAT_UI16 usage_limit parameter; its purpose is never explained.By digging into the STSELib source code, it appears usage_limit parameter is passed directly to the STSAFE-A110 via I2C.Furthermore, in the Doxygen documentation there is an example where usage_limit is set to 100,while the STSAFE-A120 examples use 255. /* ## Generate key pair in slot 1 */ uint8_t slot_1_public_key[stse_ecc_info_table[STSE_ECC_KT_NIST_P_256].public_key_size]; stse_ret = stse_generate_ecc_key_
Hello, everyone.Can the STM32F407VE encrypt multi-byte messages to maintain the confidentiality of messages between the host and client (stm32)? If so, what type of encryption can be run on this processor?Thank you:)
Hi everyone,I am trying to get a USBX CDC ACM device running on an STM32F407ZGT6, using a project generated by STM32CubeMX. I'm basing my work on the example provided for the STM32F469 (DEVICE_CDC_ACM).Problem DescriptionThe device is partially working. When I plug it in, Windows Device Manager recognizes it and assigns a COM port. However, when I try to connect using any terminal software (Tera Term, PuTTY, etc.), the connection fails. The software cannot open the port.Debugging FindingsThrough debugging, I've identified a key issue in the initialization sequence:Instance Activator Not Called: The callback function I set for cdc_acm_parameter.ux_slave_class_cdc_acm_instance_activate(which is CDC_Init_FS) is never triggered. This prevents the proper initialization of my CDC ACM instance.Null Pointer in Thread: The usbx_cdc_acm_read_thread_entryfails because it encounters a null pointer. Specifically, the comparison ux_utility_memory_compare(data_interface->ux_slave_interface_class
Hallo everyone,Before I encountered a bug in an USB_OTG_FS library function (see previous post), I struggled to find out when the function 'CDC_Transmit_FS(uint8_t* Buf, uint16_t Len)' has finished, meaning the content of the 'Buf' argument is completely transmitted.After a thorough search through the various sources and the Reference manual RM068, I concluded the Register DOETMSK has a bit XFRCM that should fire an interrupt in case the the transmission has finished. I assume the common interrupt function ' HAL_PCD_IRQHandler(&hpcd_USB_OTG_FS)' will deduce that function 'CDC_TransmitCplt_FS(.......)' should be fired when the XFRCM creates an interrupt.Despite my efforts I could not find a way to: a) find out if my assumptions above are complete and/or correct b) how to handle the registers for the USB_OTG_FS device. In the SWF column of the debugger I saw 4 groups of OTG registers, but never found a way to access them in my code. And the complexity of
Hi,I'm using a Nucleo stm32WL55JC1 board, and i'm trying to run the SBSFU_2_Slots_DualCore example. Used the example selector to start the project. When I tried to compile any of the sub projects they all fail and i have a lot of warnings for include paths that dont exist in my computer. I'm using stm32cubeIDE v2.0.0, i tried using the v 1.11.0 because it said it the release notes that was the version used for STM32Cube_FW_WL_V1.4.0, but the IDE does not accept this package and does not detect it inside the repository folder, even after installing it itself because the examples it shows are from v1.4.0 of the FW package. I also get the error that i can't find the file kms.h that is included in a .c file. When the prebuild.sh runs it runs in the wrong directories, like doing "cd ../../../Middleware.....", in this case there are too many "../" in the path, and this happens a lot in the script.How can I run this example? What am I missing?Thanks in advance!
I'm working with the STM32U385/375 for a project, and have started my investigation into how to convert it to a secure root of trust application by working with the OEMiROT examples.In stock form it works well. The provisioning works, the update over the y-modem link works just fine, etc. However, I want to build a combined binary and not deal with separate non-secure and secure binaries to apply for an update.Accordingly, I changed MCUBOOT_APP_IMAGE_NUMBER in OEMiROT_Boot/Inc/flash_layout.h from 2 to 1, like so:#define MCUBOOT_APP_IMAGE_NUMBER 1 /* 1: S application only if FLASH_NS_PARTITION_SIZE = 0 , else S and NS application binaries assembled in one single image. 2: Two separated images for S and NS application binaries. */The build works fine, the first part of the provisioning script works fine, the appropriate value is updated in appli_flash_layout.h, and the programming begins. However, it fails with this error:========== Error while executing "Programming the option bytes and
Hi All,Please could somebody offer some words of wisdom to resolve the apparent ambiguity in the C0 datasheet, which on the one hand states that once IWDG is started it cannot be stopped, yet on the other hand offers a IWDG_STDBY bit in the OPTION registers to allow it to be stopped during Standby. The latter does not appear to work, since my system wakes itself after the prescribed watchdog period, so it seems like the first statement is the correct one.Since the watchdog definitely CAN be stopped during debug if DBG_IWDG_STOP is set, there is clearly a mechanism by which it can be stopped under certain circumstances, suggesting the first statement is not correct, or at best is not the whole story.If it can't be stopped in Standby....a) what's the point of the IWDG_STDBY bit?b) how can I keep my system in Standby? I must have the watchdog running while awake. Many thanks
Hello,I stumbled over a weird problem when trying to debug Memory Protection Unit (MPU) settings which I want to document here in case any other people have the same issue:SetupThe used MCU is a STM32H7S3L8H6 on a STM32H7Rx/7Sx Nucleo-144 board (MB1737)Core frequency is 400 MHz.Enabling or disabling the cache has no impact on the problem.The code is executed from the internal flash, the stack and variables are placed on the DTCM.The debugger which I use is a Lauterbach CombiProbe 2 attached to a Power Debug Pro Ethernet. TRACE32 PowerView software version is R.2025.09.000186004.The executed software is a custom operating system which uses the MPU to prevent user-space threads from accessing memory regions not allocated to the threads. For this, one MPU region each is used for ROM, RAM and stack. The MPU is activated before the thread is executed and disabled afterwards. The background region is active.I have not tried to reproduce the error by using similar MCUs or other debu
Hello , I'm desining a PCB for the H7S7 and the PSRAM on the discovery board is : APS256XXN-OBR-BGBut it seems to be NRND.Can you confirm that this chip can be used in remplacement ?APS256XXN-OBx9https://www.apmemory.com/en/downloadFiles/0325021716tb786912Thanks
Hai All!I use 2 pieces of APS25608N PSRAM on OSPI bus with memory mapped mode. The MCU run at 1.8V, 160MHz system clock. Previously, I used APS12808N at 80MHz and 3.3V VDD without any issues.Currently, the PSRAMs run at 50MHz, but need to speed up to 100 or 160MHz.I thought the aps256's default settings should be good up to 100MHz, but they weren't.My working settings at 50MHz was ( relevant source in attachment): MR0: Fix type latency, latency code 5, and full strength (25 ohms).MR8: 32Byte Warp burst and without crossing.OSPI settings are:Dummy cycles: Read = 8, Write = 4 hospi->Init.FifoThreshold = 4; hospi->Init.DualQuad = HAL_OSPI_DUALQUAD_DISABLE; hospi->Init.MemoryType = HAL_OSPI_MEMTYPE_APMEMORY; hospi->Init.DeviceSize = 25; hospi->Init.ChipSelectHighTime = 2; hospi->Init.FreeRunningClock = HAL_OSPI_FREERUNCLK_DISABLE; hospi->Init.ClockMode = HAL_OSPI_CLOCK_MODE_0; hospi->Init.WrapSize = HAL_OSPI_WRAP_NOT_SUPPORTED; hospi->Init
Hello,I have a issue with my STM32U5G9. It does not go into standby or shutdown mode. I want to achieve a wake-up by the power button of my device. The powerbutton is connected to PWR_WKUP6 (pin PB5). The button has a 100k pull-up. I verified the voltage levels with a scope (3.3V --> 0V).I checked with the examples in the STM32CubeU5 Github repo. This my code: void LowPower::EnterStandbyMode(void) { PrepareForLowPower(); __disable_irq(); for(int i = WWDG_IRQn; i <= JPEG_IRQn; i++) { NVIC_ClearPendingIRQ((IRQn_Type)i); } /* Enable WakeUp Pin PWR_WAKEUP_PIN6 connected to PB.5 */ HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN6_LOW_0); /* Clear all related wakeup flags*/ __HAL_PWR_CLEAR_FLAG(PWR_WAKEUP_FLAG6); HAL_DBGMCU_DisableDBGStandbyMode(); /* Enter the Standby mode */ HAL_PWR_EnterSTANDBYMode(); // If entry fails (e.g., if a debugger is attached), reset the system NVIC_SystemReset(); } I have a similar function for shutdown mode. I tried to clear all inte
Hello, I am having an SPI communication issue between an STM32H743BIT (SPI master) and a TI ADS7066IRTER ADC using SPI Mode 0 (CPOL=0, CPHA=0). I write a configuration register and immediately read it back, but the read value does not match what was written. The logic analyzer shows correct MOSI data, but MISO often returns 0xFF or 0x80, and the SPI decoder reports “Settings mismatch”. The write/read sequence is: SPI_ADS7066_writeSingleRegister(hADS7066, GENERAL_CFG_ADDRESS, OPMODE_CFG_CLK_DIV_6); if (SPI_ADS7066_readSingleRegister(hADS7066, GENERAL_CFG_ADDRESS) != OPMODE_CFG_CLK_DIV_6){Throw(EMBL_ERROR);} Write and read functions used: void SPI_ADS7066_writeSingleRegister(HANDLER hADS7066, uint8_t address, uint8_t data){PSPI_ADS7066DESC pADS7066Desc = (PSPI_ADS7066DESC)hADS7066;uint8_t dataTx[4] = {0};uint8_t numberOfBytes = SPI_CRC_ENABLED(pADS7066Desc) ? 4 : 3;EMBL_RETCODES ret; dataTx[0] = OPCODE_WREG;dataTx[1] = address;dataTx[2] = data;if (SPI_CRC_ENABLED(pADS7066Desc))dataTx[3]
Hello everyone. I am trying to write a bootloader with STM32H750IBT6 and mt25ql512. I am trying to adapt the ExtMem_Boot example of STM32H750-DK to STM32H750IBT6 by modifying it, but I can't succeed. It doesn't make sense why STM32H750IBT6 does not work. In the software; JumpToApplication = (pFunction) (*(__IO uint32_t*) (APPLICATION_ADDRESS + 4)); __set_MSP(*(__IO uint32_t*) APPLICATION_ADDRESS); JumpToApplication(); but JumpToApplication(); enters HardFault and I get SCB->CFSR = 1025. Whatever I did, I was not successful. Attached I share the bootloader and application projects. typedef void (*pFunction)(void); pFunction JumpToApplication; int main(void) { /* USER CODE BEGIN 1 */ CPU_CACHE_Enable(); /* USER CODE END 1 */ /* MPU Configuration--------------------------------------------------------*/ MPU_Config(); /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and
Hey guys, I'm looking for some suitable HexaSPI PSRAM and also the OctoSPI Flash for the STM32N645 board I am just building.. I cant find the parts used on the DK so do you have a list of supported memories? I need 256Mb PSRAM and will start with a 1Gb Flash as per the DK.. Richard
Hello,Normally we use HAL_GetTick() in HAL driver.I want to use GetTick() in STM32 LL driver. How to get and use GetTick() in STM32 LL driver?
..
Hello, I am planning to use the STM32G474RET6 and would like to confirm whether I can use the internal VREFBUF. This product's package is LQFP-64 and while reading the datasheet I noticed the note : ''The VREF+ pin is double-bonded with VDDA on some packages''. Could you verify whether the internal reference voltage can be used with this package? Thanks.
Hello,The datasheet and reference manual are missing information about the 4 KB Backup SRAM in the memory map.Where can I find details about it?We need to use this memory in both Secure and Non-Secure projects.Thank you.
Hello there, I'm trying to create an external loader for my stm32h7s7-dk board via MCE.I followed this https://www.youtube.com/watch?v=JxhKmVUB2Ws&list=PLnMKNibPkDnFQXYK0ztHV9iMVS6EAtKpD&index=10 tutorial series and i check the github repo of this project. But the repo and the video series can be different. The instructor might add some new things. But the methodlogy cant work. Its really stupidly. The loader writes only 0x00 to flash for app size.Im adding my ss of the mem_copy, mem_write and mpu init codes here. Please help me.
Hi,The external nor flash AT25XE321D is 32Mbits, support quad IO/XIP spi operation, max. 133MHz Freq. Std. JEDEC/SFDP. It is connected to STM32H7R7Z8J6 with with XSPI1 port-1 interface.I am using MX v6.116.1 to setup project for my board. By IDE v2.0.0, the project 'Boot' works from internal flash but it is failed to run 'Appli' from external AT25XE321D. And the project 'ExtMemLoader' is successfully built and deployed:File copied successfully under STM32CubeProgrammer.File copied successfully under STM32CubeIDEI tried STM32CubeProgrammer v2.21.0 to program the AT25XE321D with using the ExtMemLoader.stldr I just built, but failed too. "Error: Mass erase operation failed." See attached log for more logs.Back to my settings in MX:1) 100MHz XSPI1 clock source2) XSPI1 settings and GPIOsThere 4 memory types available and no 'custom' option. I pick the 'Macronix' as it is most close to AT25XE321D.3) ExtMemLoader settingsI also go through followings but did not help me to solve the probl
Cube setting is OK!First run OK!if(HAL_OK != HAL_UART_Transmit(CO_INFO.channel, co_dma_tx_data, send_len, 0xFFFF)) { DEBUG_PRINT("CO MODULE SEND DATA ERROR!!\r\n"); } Then setting OK!if(HAL_OK==HAL_UART_AbortReceive(CO_INFO.channel))if(HAL_OK==HAL_UARTEx_ReceiveToIdle_DMA(CO_INFO.channel,(uint8_t*)CO_INFO.RX.data,CO_UART_BUF_LENGTH)) But second run Fail !!if(HAL_OK != HAL_UART_Transmit(CO_INFO.channel, co_dma_tx_data, send_len, 0xFFFF)) trace HAL_UART_Transmit() functionif (huart->gState == HAL_UART_STATE_READY) the huart->gState value always 0x33so always return HAL_BUSY
Touchgfx 4.26.0 (and was same on 4.24.0) keyboard examples are the same resolution although there are (3) resolution of display resolution selectionsThey all display the keyboard size as approx. measured 43 mm (1.7 inches) X 33mm (1.3 inches) on a 5-inch display 800 X 480 resolution. To be usable we believe the keyboard needs to be about 1.5 to 2 times larger than present. (about 25% LARGER) See details in pdf attachment
While designing Electronic speed controllers for a 6s battery, an stm32 was decided to use as the MCU. After receiving our first PCBs, we were unable to successfully program them with the stlinkv3 minie. Attached is an image of the schematic of where the STM lies on the board as well as the attached components. When the boards first came in the stm32 was able to be flashed with a program, but after the first flash they could not be connected to any more. This is with using an external power supply as the stlink v3 didn't seem to provide power as the prg tool was unable to detect the chip. After continued testing (and changing out the mcu) the issue persisted although with a slight deviation, it would allow us to program it once or twice but when we clear the flash, it would lose connection and throw an error of dev_target_held_under_reset. In case it is relevant, the only connection type that can even read the flash of the chip is hot plug but that is unable to chan
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.