Developer support experience survey - We value your feedback
Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
I am developing an application on NUCLEO-N657X0-Q using Getting started image classification as base code. I need to add to the project the standby mode and right now when it enters standby mode, then it fails to resume correctly, i guess because part of the application is lost when system wakes up (retention is only 80 KB).The total size of the application is much bigger then 80KB and I am not sure how to extend the actual retention memory in use adding the TCM retention memories.Actually the application code is placed at 0x34000400.Is there an example on how to place the application also in TCM? I thought that another solution could be placing in retention at 0x34000000 the fsbl code and maybe in axisram2 the application, so that when the system wakes up after a standby it executes again fsbl and gets from external flash the application code.I tried this last part changing the linker files, setting 0x34000000 for fsbl and 0x34100400 for application, then in fsbl code i set address 0x
I wanna implement Master and Slave ethercat protocol on stm32h7 series. Is there any examples available on subject?. Where should i start. Any resources?
I need to use embedded STM32H573 bootloader to update customer application using UART1 or uart3.I try to use AN2606, but no success. May you provide correct code to jump from application to the embedded bootloader for specific processor model: STM32H573, please?
Hi! I use LL drivers to work with UART as follows: LL_USART_SetRxTimeout(USART1, 3 * 11); LL_USART_EnableRxTimeout(USART1); LL_USART_ClearFlag_RTO(USART1); LL_USART_EnableIT_RTO(USART1); LL_USART_EnableIT_RXNE(USART1);and it works fine until I switch the MK to STOP1 mode HAL_SuspendTick(); HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI); // STOP1 HAL_ResumeTick();What do I need to do to get this to work in STOP1 mode?
I have added a wolfSSH ICube repo to my project. It does not compile, showing: Cube/Middlewares/Third_Party/wolfSSL_wolfSSH_wolfSSH/wolfssh/src/internal.c: In function 'GenerateKey':Cube/Middlewares/Third_Party/wolfSSL_wolfSSH_wolfSSH/wolfssh/src/internal.c:2215:15: error: implicit declaration of function 'wc_SSH_KDF'; did you mean 'wc_HKDF'? [-Wimplicit-function-declaration] 2215 | ret = wc_SSH_KDF(hashId, keyId, key, keySz,I checked the configwolfSSL.I-CUBE-wolfSSL_conf.hand it seems to be missing the wolf repo has:/* Enable wolfSSL features needed for wolfSSH */#define WOLFSSL_WOLFSSH /* Enable wc_SSH_KDF function */ Do I have to manually add it? Am I missing some other config that enables it?wolfSSH example referencewolfip/src/port/stm32h563/user_settings.h at master · wolfSSL/wolfip
I am working on STM32H745BIT6 (dual-core: Cortex-M7 + Cortex-M4).Issue:DMA is functioning correctly when used from the CM7 core The same DMA configuration does NOT work when executed from the CM4 core
Hi everyone I have a bit trouble initializing the JPEG peripheral on the N6. See the stack trace: I feel like this has something to do with the RIF? I don’t know, this chip is very new to me. If anyone can help me, it’d be greatly appreciated. Best regards
I'm using an STM32H7S78-DK board and I have a part of the firmware that, from the boot, updates the FLASH from a .bin inside an SD cardThe code is pretty simple as I loop the FLASH comparing every sector with the one in the SD card and, if different I erase the internal flash sector and write the new one.Everything was working correctly until a update the code via CubeMXThe read seems to still workingif (EXTMEM_Read(0, fw_offset, flash_buf, br) != 0)but as soon as I do theif (EXTMEM_EraseSector(0, fw_offset, FLASH_SECTOR_SIZE) != 0)I got an errorThe crash happens in if (EXTMEM_DRIVER_NOR_SFDP_OK != EXTMEM_DRIVER_NOR_SFDP_SectorErase(&extmem_list_config[MemId].NorSfdpObject, local_address, sector_type)) { retr = EXTMEM_ERROR_DRIVER; }I've rolled back just the driver in the STM32_ExtMem_Manager, and everything started working againI've noticed that quite a few files have been changed, including the addition of #define EXTMEM_DRIVER_CUSTOM 0In the conf_temp
STM32N6570-DK: BOOT0/BOOT1 switches appear to have no effect. In DEV boot (BOOT1=H), external loader MX66UW1G45G_STM32N6570-DK fails with "Init function fail with timeout" via both STM32CubeProgrammer 2.22.0 CLI/GUI and STM32CubeIDE (ST-LINK FW V3J17M10, hot plug and under-reset modes, AP1). In serial boot (BOOT0=H), no USB DFU enumeration on USB1 and no UART acknowledgement on the STLink VCP (115200 8E1). SWD debug access works normally; the board previously booted user firmware from flash. Official STM32N6-OOB readme procedure reproducibly fails at the first sector erase.
Hello.I am building a Thread SED product using the STM32W5MMG. Recently, after upgrading the firmware version to v1.24.0, I encountered a problem with low-power startup.Upon investigation, I discovered that the location of the “Init_Debug();” call within the MX_APPE_Init() method in app_entry.c was different.Previously (in v1.23.0), I had written the following code within the /* USER CODE BEGIN APPE_Init_1 */ block, and this worked correctly. HW_TS_Init(hw_ts_InitMode_Full, &hrtc); /**< Initialize the TimerServer *//* USER CODE BEGIN APPE_Init_1 */#if (CFG_FULL_LOW_POWER != 1) Init_Debug();#endif UTIL_LPM_SetStopMode(1 << CFG_LPM_APP, UTIL_LPM_DISABLE); UTIL_LPM_SetOffMode(1 << CFG_LPM_APP, UTIL_LPM_DISABLE); Led_Init(); Button_Init();/* USER CODE END APPE_Init_1 */ However, with the transition to v1.24.0, the call location of Init_Debug(); was changed as follows. HW_TS_Init(hw_ts_InitMode_Full, &hrtc); /**< Initialize the TimerServer */ Init_Debug();
Hello everyone!I will try to be short here… even though I will probably fail on this task.Hardware: ST-Nucleo-STM32F446REI have a 96kHz loop, which happens inside a callback from TIM3. I also have 4 analog signals to be sampled. Originally, I have set these signals into ADC1 (CH6 and CH7) and ADC2 (CH15 and CH9). Due to the ~10.4us period of time I have inside my callback, considering 168MHz system clock and 21MHz ADC clock (System Clock /2 /4), I need to act quick. I have decided to use DMA for this application: DMA2 Stream 0 assigned to ADC1 and DMA Stream 2 assigned to ADC2. Then, inside the loop, I am simply assigning the buffer values to variables (or, if I need to squeeze a few more cycles, I can use them directly). However, I noticed the variables assigned to ADC2 would not be sampled correctly: the first channel would be sampled just once, at the startup, and the second never, while the two channels on ADC1 would behave well. In my code, var3 and var4, respectively. The most re
Hi,I made a post a few weeks ago but I can’t find it now because I think this forum may have been updated.I have an STM32F779I-EVAL and I’ve managed to get LwIP_HTTP_Server_Raw compiled and running from this repo (STM32CubeF7/Projects/STM32F769I_EVAL/Applications/LwIP/LwIP_HTTP_Server_Raw).The display turns on, and within the debugger, there is no issue. It shows a DHCP timeout and then states its IP is 192.168.0.10, this is fine by me.With a normal ethernet cable connected to a network switch, or even using a crossover ethernet cable, I get nothing when I ping 192.168.0.10. Ethernet is set up correctly within Windows.Does anyone have a clue what’s going on here?I’ve tried basically every tutorial on the internet at this point to ping the device. The most hopeful looks like this one, but still nothing. I’ve also got a Nucleo-H755ZI-Q which doesn’t work with any example.I’m starting to think maybe it is my set up but I’ve tried across multiple computers, all using the correct settings (
Hello everyone,I apologize for posting a similar message again, but for some reason I can no longer access my previous post.I am currently studying how my Nucleo N657X0-Q board works, and for this purpose I am trying to create a TCP server project using a static IP address.However, despite what seems to be a correct configuration, my board does not respond to ARP requests. I checked this using Wireshark and the arping command on Linux, but the result is always TIMEOUT.The MAC address seems to be correctly configured, the LAN8742 driver also appears to start correctly, and all IP, TCP, UDP, ARP, and ICMP services return SUCCESS.In the meantime, I also used the .ioc file from the following link, as suggested to me, in order to compare it with my own project : webserver Despite my new modifications, the symptoms remain the same. I also tested the steps performed in the nx_stm32_eth_driver code, and I was able to see that Initialize, Enable, and Attach are being called.I added a printf out
I am trying to interface the EEPROM AT24C04C with STM32G4 series controllers. I have confusion in the function parametersHAL_StatusTypeDef HAL_I2C_Mem_Read_IT(I2C_HandleTypeDef *hi2c, uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize, uint8_t *pData, uint16_t Size)Can you please clarify on the MemAddSize parameter what has to be sent to for the above EEPROM?2nd Question: 1 page is 16 bytes, is it possible for me to write data above 16 bytes as well?
I am using an STM32 Nucleo-F746ZG board and trying to establish a TCP/IP connection between the board and my laptop. The laptop is configured as the TCP server using Hercules tool, while the STM32 board acts as the TCP client. I have configured static IP addresses, and I am able to successfully ping the STM32 board from my laptop, which confirms basic network connectivity. However, when I start the TCP server on the laptop using Hercules, the STM32 client is unable to establish a connection to the server.I attach code and .ioc configuration for reference.
Several discussions on this topic have been lost in the forums transition, or not moved yet, I could not find them here. So I’ll post again to summarize.In recent changes of the Cube ETH drivers for several STM32 packages (H7, F7, maybe others as well) handling of ETH_MACFilterConfigTypeDef.BroadcastFilter seems to be corrected.The BroadcastFilter = ENABLE means that broadcast receive is blocked. This field should be left DISABLED.The hardware defaults are good for typical (UDP, TCP) apps. Especially, receive of broadcasts is enabled. In ethernetif.c of the ST LwIP examples, HAL_ETH_SetMACFilterConfig() is not called, because the default state is OK.The problem could occur with the old versions of HAL drivers, when the network software tampers with multicasts and other advanced filtering and calls HAL_ETH_GetMACFilterConfig - this one could return the BroadcastFilter bit inverted, so calling HAL_ETH_SetMACFilterConfig again with result of HAL_ETH_GetMACFilterConfig could block broadca
I would like to use the Stop3 low-power mode on an STM32U545RE (NUCLEO-U545RE-Q board) and to wake-up the device by the RTC. I have a working example for Stop2 mode for which I largely used the inspiration from the stm32u5 workshop. But when I replace the HAL_PWREx_EnterSTOP2Mode call(s) with HAL_PWREx_EnterSTOP3Mode, the device does not wake up from the stop mode anymore. At least the current consumption drops down to 3uA so I am confident that the Stop3 mode itself is working.The code parts of my main function which I believe are relevant look as follows:HAL_Init();SystemClock_Config();SystemPower_Config();MX_GPIO_Init();MX_ICACHE_Init();MX_RTC_Init();/* The SMPS regulator supplies the Vcore Power Domains */HAL_PWREx_ConfigSupply(PWR_SMPS_SUPPLY);/* Enable ultra low power mode */HAL_PWREx_EnableUltraLowPowerMode();/* Enable the Autonomous Mode for the RTC Stop0/1/2 */__HAL_RCC_RTCAPB_CLKAM_ENABLE();/* Set RTC wakeup timer for 2s */HAL_RTCEx_SetWakeUpTimer_IT(&hrtc,
Hi,I do have two STM32H563 devices connected together via UART. I would like to use one as a ‘programmer/flasher’ and the other as a ‘target’. On the ‘target’ MCU I would like to use an already in-built bootloader available over USART1. The only problem is the programming/flashing implementation on the ‘programming’ MCU. Is there any example code available somewhere that contains such an implementation? I can see that there is this code publicly available:https://github.com/STMicroelectronics/stm32-mw-openbl...but it only contains implementation of the bootloader protocol for the target device, not the programming/flashing one.I am trying to evaluate the effort needed to make such an implementation to happen. I would like to avoid writing my own bootloader with my own custom protocol (although at the moment this seems like an easier option to be honest).Kind regards
Iam triying to capture data using timer+hpdma cofiguration , but hpdma is not working, not copying data .. but the same configuration with gpdma is working fine.. how to configure hpdma any special configuration regarding RIF.. please give some brief explanation
I have a custom board with G491 and an LED driver (Kinetic KTD2037). MCU is the I2C master. Any attempt to read a register using HAL from the KTD2037 fails, ErrorCode = 0x2 (arb lost). Register writes are OK. I can read/write other devices on the same bus OK. The KTD2037 datasheet has this for an I2C register read:This doesn’t seem consistent with HAL_I2C_Mem_Read() or HAL_I2C_Master_Receive(). On a scope HAL_I2C_Mem_Read() results in S, 7-bit addr, write, ack, reg addr, ack, Sr, 7-bit addr, read, ack, 0xFF, nackI try setting the internal register pointer (it may not have one) using HAL_I2C_Master_Transmit(), which works OK. Then I follow it with HAL_I2C_Master_Receive() resulting in S, 7-bit addr, read, ack, 0xFF, nackIt looks like the master says arbitration lost because of unexpected nack from the KtTD037.The KTD2037 datasheet does not mention I2C repeat start.Any way to read this device without writing my own I2C driver?
This is a sister thread to this one.Essentially, I can’t get a ping out of either Nucleo-H755ZI-Q or STM32F779I-EVAL, the other thread focuses on the Eval board.I’ve tried many examples but I’m focusing on this one. There are other threads about this example but I think they may have got lost in the migration.I’ve attached the project as it sits on my computer.The STM32 device’s IP address is 192.168.2.180.If I ping it on my PC, I get Request timed out.This is my network configuration.The Nucleo board is connected to a TP-Link Ethernet switch, which my PC is also connected to.Do you have any idea why this is not working?Thank you.
In many NetX Duo Ethernet sample projects, HAL_ETH_Start_IT() is not called depending onthe timing of the PHY link‑up. When this happens, Ethernet communication never starts.The behavior appears to be related to how App_Link_Thread_Entry() handles link status:- nx_ip_interface_status_check() is used to check the NX_IP_LINK_ENABLED status.- nx_ip_driver_direct_command() issues NX_LINK_ENABLE or NX_LINK_DISABLE when the PHY link state changes.Normal behavior- If the PHY is link-up at startup, HAL_ETH_Start_IT() is called during initialization.- If the PHY is link-down at startup, App_Link_Thread_Entry() later detects the link-up, issues NX_LINK_ENABLE, and HAL_ETH_Start_IT() is called correctly.Problem caseIf the PHY is link-down at startup but becomes link-up before App_Link_Thread_Entry() starts running:- The thread does not issue NX_LINK_ENABLE or NX_LINK_DISABLE.- HAL_ETH_Start_IT() is not called.- Ethernet communication cannot be established.In PoE environments, the power‑on to lin
After an aborted attempt to get the PSSI interface on the STM32N6 to work with DMA, I have decided to try a different part, the STM32H7A. Running into a similar problem attempting to get the DMA to work.Here is a snap-shot of what I see:After receiving HAL_OK from HAL_PSSI_Receive_DMA(). I get the error interrupt with an error code of 0. As may be seen, there is a DMA Transfer error. This is running on the Nucleo-H7A3ZI-Q board. The clock tree has been changed to increase the clock speed:The PSSI clock is produced by a PWM Timer and set to a frequency of 10MHz. Data is from a 12 bit ADC with an active high Ready. DE is not used. I have a pull-up on Ready. With HAL_PSSI_Receive_DMA() in a loop from a frame timer, each call returns HAL_OK followed by the error interrupt.The PSSI setup:The DMA setup:I’ve been studying the examples given on this board for both the H5 and the H7. Whereas the N6 produced an immediate error response to multiple PSSI DMA attempts, the H7A does not. T
Hi all,I'm trying to read the DAC output value using the integrated ADC and the connection to it (channel 19). However, I only read random values between [0;2] units. The DAC works properly using the integrated buffer. I route the DAC output to the external pin and to on-chip analog peripherals, so I can confirm the output with a multimeter. The ADC seems to work properly too: I can read internal temperature, VrefInt, and 2 input pins with scan mode. However, when I enable the VDAC_OUT1 and add it to scan mode, I get random values between 0 and 2 (only for VDAC_OUT1, the other readings are fine). Sample times are abondant (few us); I have tried different sampling values, but, as expected, it doesn’t change anything.I configure this setup with the latest version of CubeMX. Readings and DAC configuration are performed using basic HAL (no interrupt and no DMA).Does anyone have an idea to fix this issue?
Hi everyone,I'm using an STM32H743 in USB device mode as a virtual USB drive (UF2 protocol) for firmware upgrade. Main program runs in Bank 1 Upgrade firmware is written to Bank 2 During the file copy process (from PC to the virtual UF2 disk), the USB connection drops unexpectedly (host resets the bus, captured by USB analyzer).However, if I connect the device through a USB Hub, the success rate improves dramatically.I understand that in dual-bank Flash architecture, erasing or programming Bank 2 should not interfere with: USB peripheral operation (running from Bank 1) AHB bus access Interrupt latency (if properly configured) But my test shows the opposite: Direct connection → frequent host reset Via Hub → mostly works fine Questions: What could cause the host to reset the bus when only the inactive Bank is being erased/programmed? Why does adding a Hub improve reliability — is it signal integrity, power filtering, or host timing tolerance? Could Flash write/erase temporari
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.