Ask questions and find answers on STM32Cube packages, including HAL, LL and middleware, and expansion software.
Most recent activity
Hi to everybody.I can't get spi to work with linked lists. I followed the procedures in the documentation but it still doesn't work. Maybe someone can tell me why.This is my configuration: STM32U575, cubeMX 6.12.0, cubeIDE 1.9.0The linked list has two nodes. The first one writes 4 bytes on SPI2 and the second one reads 4 bytes on SPI2.I don't see the clock strokes on the SPI2 bus.Thanks a lot in advance.main.cint main(void) { /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); /* Configure the System Power */ SystemPower_Config(); /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_GPDMA1_Init(); MX_ADC1_Init(); MX_DAC1_I
Hey everyone,I’m working on a USB audio project using TinyUSB on my STM32H7S78-DK Discovery board, and I’ve hit a wall with UAC2.0 on the High-Speed port. I’m hoping someone here has experience with this setup and can point me in the right direction!What I’ve Achieved So FarBoard: STM32H7S78-DK (three USB-C ports)ProgrammerFull-Speed (USB FS)High-Speed (USB HS)TinyUSB ported successfully to the boardCDC example works perfectly on the Full-Speed portAttempted UAC2.0 on Full-Speed port, but Windows rejects itWindows insists on at least a High-Speed device for USB Audio Class 2.0What I’m Trying to DoI want to stream multi-channel audio (UAC2.0) over the High-Speed USB-C port. Unfortunately, I can’t get TinyUSB’s UAC2.0 example to enumerate or work on HS. The descriptors seem correct, but Windows doesn’t recognize the device as a valid UAC2.0 HS audio interface.What I’ve CheckedClock configuration – HS PHY clock is enabled, and I’ve verified 480 MHz operation.Pin mapping – USB1 HS D+/D– pi
hi i am working with HTTPS client code on stm32u585 microcontroller, using netx tcp/ip stack for the implementation. my requirement is to create a HTTPS post request with a json payload( nearly 8000 bytes). is there any reference or example available on HTTPS post request using netx. all i can see is the get request in the official GitHub.if any example or reference regarding this issue will be much helpful for implementation. with regards sabarinath
Hello all, I am developing ptp master and slave with offload. Now I have a master sending the sync and a slave sending delay_req: with the master sending back delay_resp: Given this message exchange, the slave should be able to correct its time, but, to do this, it needs some timestamp. Referring to figure 788: How can I (the slave) get t1,..,t4? Thank you P.S. Every delay_req has :originTimestamp (seconds): 0so it seems that hw does not correct the timestamp
Hello @Amel NASRI ,I am using nucleo-f767ZI board. I have custom LCD board which use NV3041A QSPI interface.I am trying to read manufacture ID from NV3041A on QSPI interface.My code is as belowstatic void MX_QUADSPI_Init(void) { /* USER CODE BEGIN QUADSPI_Init 0 */ /* USER CODE END QUADSPI_Init 0 */ /* USER CODE BEGIN QUADSPI_Init 1 */ /* USER CODE END QUADSPI_Init 1 */ /* QUADSPI parameter configuration*/ hqspi.Instance = QUADSPI; hqspi.Init.ClockPrescaler = 4; hqspi.Init.FifoThreshold = 1; hqspi.Init.SampleShifting = QSPI_SAMPLE_SHIFTING_NONE; hqspi.Init.FlashSize = 1; hqspi.Init.ChipSelectHighTime = QSPI_CS_HIGH_TIME_1_CYCLE; hqspi.Init.ClockMode = QSPI_CLOCK_MODE_0; hqspi.Init.FlashID = QSPI_FLASH_ID_1; hqspi.Init.DualFlash = QSPI_DUALFLASH_DISABLE; if (HAL_QSPI_Init(&hqspi) != HAL_OK) { Error_Handler(); } /* USER CODE BEGIN QUADSPI_Init 2 */ /* USER CODE END QUADSPI_Init 2 */ } void NV3041A_ReadData(uint8_t command, uint32_t addre
Hello ST Team,I am currently working with the STM32U5 Discovery board (B-U585I-IOT02A) to connect to Azure IoT Central, and I’ve tried two different approaches. I'm facing two distinct issues in each method, as described below:1. YouTube Method – TrustZone IssueReference: https://www.youtube.com/watch?v=BZn2PCvgL9sThe video references a specific GitHub repository for the Azure connection demo, but the repo is currently unavailable .I proceeded using the latest available X-CUBE-AZURE package from the official ST GitHub.When I run the project on my B-U585I-IOT02A board, I get the following runtime error: STM32U5_TrustZone_DisableThis seems to be a TrustZone configuration mismatch between the project and the board2. ST Community Tutorial – DNS and SPI ErrorsReference: https://community.st.com/t5/stm32-mcus/how-to-quick-connect-stm32u5-to-azure-iot-central/ta-p/49685I followed the ST community Quick Connect guide.Wi-Fi connects successfully to my access point.However, the board fails to re
Dear STMicroelectronics Support Team, I am encountering an issue with ADC calibration on the STM32N657 microcontroller. Despite multiple attempts, the calibration process consistently fails. Below are the details of my setup and observations for your reference: Hardware Configuration: ADC: ADC1, Channel 1 Reference Voltage: VREF+: External 1.8V (measured 1.76V) VREF-: Ground Other: Enabled ICache/DCache, GPIO, USART1, and system isolation. Software Configuration: Initialization Code: SCB_EnableICache(); SCB_EnableDCache(); HAL_Init(); MX_GPIO_Init(); MX_ADC1_Init(); MX_USART1_UART_Init(); SystemIsolation_Config(); // Debug: Check registers post-init printf("Post-Init ADC_CR: 0x%08lX\r\n", hadc1.Instance->CR); // Output: 0x00000000 printf("Post-Init ADC_ISR: 0x%08lX\r\n", hadc1.Instance->ISR); // Output: 0x00000000 // Explicit MSP init (debug) HAL_ADC_MspInit(&hadc1); printf("Post-MSP ADC_CR: 0x%08lX\r\n", hadc1.Instance->CR)
Hello everyone,I am currently working with the STM32N6570-DK board and the MB1854B ST camera module.For testing purposes, I have compiled and run the following example from ST's GitHub repository:https://github.com/STMicroelectronics/STM32CubeN6/tree/main/Projects/STM32N6570-DK/Applications/DCMIPP/DCMIPP_ContinuousMode .In this example, the camera operates at a resolution of 2592x1944.Now, I would like to change the camera configuration to capture video at a lower resolution, such as 640x480 or 384x288.Could someone please guide me on:How to configure the camera for 640x480 or 384x288 resolution?Are there specific register changes needed for the IMX335 sensor?I have checked the IMX335 datasheet, but I couldn’t find register-level details—where can I find the correct registers or configuration sequence?Any help or code snippet showing how to set a different resolution would be greatly appreciated.Thank you.
STM32H743ZIT6 LwIP - Ping Working in Example but Fails in My Own Project - Need Step-by-Step Help]Hi everyone,I am working with STM32H743ZIT6 and trying to implement basic Ethernet communication using LwIP. I downloaded the STM32CubeH7 package, and using the default LwIP example, I can successfully ping my STM32 board from my PC — no issues there.However, when I try to replicate the same configuration in my own project, I cannot get ping to work. I suspect I am missing some configuration step or detail, even though I tried to match everything. Details:1. MCU: STM32H743ZIT62. Development Environment: STM32CubeIDE3.LwIP Version: Provided with latest STM32CubeH7 package4. PHY: LAN87425.Clock Configuration: HSE 25 MHz, proper PLL setup6.LwIP Example: LwIP_Ethernet example — works fine, I can ping7.My Own Project: Same clock setup, same LwIP stack, but ping doesn't work
Hi, We are using STM32G0B1 MCU for our project. We need to use USB DFU for application reprogramming. I tried to to set option bits and then connect through USB DFU, everytime I set option bits through software and flashing through debugger , USB DFU is connected only once. Once I disconnect debugger and restart the board, USB DFU is not getting connected even though I am Jumping to system bootloader from application. Its again coming back to application and running. In my test software, I am jumping to bootloader after application is run for defined time for ex., 10seconds. Please let me know is there anything to be done so that USB DFU is connected everytime after jumping to bootloader from application.
Hello everyone,I am implementing a DDS-based pulse generator using DMA double buffer technique on my STM32H7. When I run this pulse generator as a standalone project, it works perfectly — the output pulse frequency is accurate and stable.However, when I integrate LwIP into the same project, I notice that the generated pulse frequency occasionally changes unexpectedly and produces wrong output values. It looks like there is interference or resource conflict when both the DDS pulse generator and LwIP run together.Has anyone faced similar issues? Is there a recommended way to isolate or manage DMA, timers, and LwIP to avoid such conflicts on STM32H7?Any suggestions would be greatly appreciated.Thank you!
Originally a comment on this tutorial - moved to main forum for better visibility & discussion ...I followed the first part of the tutorial (enabled USART2) and included the following code snippets for my STM32 NUCLEO-H7A3ZI-Q board. /* USER CODE BEGIN PV */ uint8_t buffer[1]; /* USER CODE END PV */ /* USER CODE BEGIN 2 */ HAL_UART_Receive(&huart2, buffer, 1, 0xFFFF); HAL_UART_Transmit(&huart2, buffer, 1, 0xFFFF); /* USER CODE END 2 */ /* USER CODE BEGIN WHILE */ while (1) { HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_0); HAL_Delay(100); /* USER CODE END WHILE */ But I wasn't able to write any characters or anything on my serial console. Kindly give some suggestions.
I'm using STM32CubeMX 6.12.0, with the firmware package U0_V1.1.0.When generating code for a STM32U073, the file system_stm32u0xx.c is generated, which contains the implementation of the SystemCoreClockUpdate() function.This file seems to be a mere copy of the firmware package's file "<...>\STM32Cube\Repository\STM32Cube_FW_U0_V1.1.0\Drivers\CMSIS\Device\ST\STM32U0xx\Source\Templates\system_stm32u0xx.c"I'm attaching it for reference.On line 330 we have: tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4U) & 0xFU]; It seems that this should actually betmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos) & 0xFU]; since RCC_CFGR_HPRE_Pos is 8, not 4 (as defined in stm32u073xx.h:5524).The RM agrees with the value 8: §5.4.3 shows HPRE[3:0] in position [11:8] in RCC_CFGR. Also note that stm32u0xx_hal_rcc.c:396 has the correct value (it uses the macro RCC_CFGR_HPRE_Pos, in HAL_RCC_OscConfig()). Note also that the same bug pot
Hi.. I am using STM32L476 Nucleo board. When i tried to erase a flash page using HAL_FLASHEx_Erase(), the FLASH_WaitForLastOperation() returns a HAL_ERRORI've seen similar issues in the community, but unfortunately, similar solutions just don't work.And the error code is 0xA0 , how can I fix thisStatusDef FlashWr(uint32_t flash_addr, uint8_t *pData, uint16_t length) { uint8_t *pBuf = (unsigned char *)flash_write_buf; uint16_t cnt; // valid length in current sector uint32_t flash_addr_base; uint32_t addr_offset; bool cmp_result; uint16_t i; uint64_t val; uint16_t addr; StatusDef sta = STA_OK; while (length > 0) { flash_addr_base = (uint32_t)(flash_addr & ~FLASH_SECTOR_MASK); addr_offset = (uint32_t)(flash_addr & FLASH_SECTOR_MASK); cnt = FLASH_SECTOR_SIZE - addr_offset; if (length < cnt) { cnt = length; } FlashRd(flash_addr_base, pBuf, FLASH_SECTOR_SIZE); cmp_result = FlashCmp(pBuf + addr_offset, pData, cnt); if (false == cmp_re
Please enlighten me. I added FreeRTOS to my STM32CubeIDE project using IOC. I discovered that I had to choose either CMSIS_V1 or CMSIS_V2 as the FreeRTOS Mode, else FreeRTOS would not be included. I chose CMSIS_V2. I then noticed the FreeRTOS Configuration pane and added a task, timer, and Queue. Upon finding the generated code, I noticed they are created with osThreadNew, osTimerNew, , and osMessageQueueNew. I was expecting xTaskCreateStatic, xTimerCreateStatic, and xQueueCreateStatic instead. Are the three set of functions somehow the same, or is one a wrapper for the other, or what? Can I still use the FreeRTOS Reference Manual, or do need to find and consult the CMSIS_V2 OS manual instead? Or, maybe I did something wrong.
Hello, I am currently attempting to get the ethernet set up on my eval board. The project goal is to use a timer on the eval board to trigger the board to call out to a PLC on my network to receive 8 values every 1 second. Those values will then be stored in specific corresponding variables in the main.c file to be used in another function later on. I have attempted to follow several examples and use some AI to help me debug but I have hit a wall. I have zero errors when building out the project and running the debugger. It appears to flash onto the device but then nothing happens. List of the places that I have tried to debug with a simple toggle GPIO command on one of the user LEDs -user code section 2 : did toggle successfully on -main while loop : does not work -user code section 4 with in my modbus request : does not work I have had several cases where it appears when the debugger asks me to resume the process it sends me to the hard fault handler in stm32H7xx_it.c, but this leave
Yes, I use Cube.In the documentation I read that eMMC is connected to SDMMC1.SDMMC1 can be configured either as SD or MMC. I get the SD option in FATFS only when SDMMC1 is configured as SD.OK, I found the example to use MMC driver, I configured it.Anyway - it doesn't work. I get SDMMC_ERROR_CMD_RSP_TIMEOUT.Here's my SDMMC1 initialization:static void MX_SDMMC1_MMC_Init(void) { /* USER CODE BEGIN SDMMC1_Init 0 */ /* USER CODE END SDMMC1_Init 0 */ /* USER CODE BEGIN SDMMC1_Init 1 */ /* USER CODE END SDMMC1_Init 1 */ hmmc1.Instance = SDMMC1; hmmc1.Init.ClockEdge = SDMMC_CLOCK_EDGE_RISING; hmmc1.Init.ClockPowerSave = SDMMC_CLOCK_POWER_SAVE_DISABLE; hmmc1.Init.BusWide = SDMMC_BUS_WIDE_8B; hmmc1.Init.HardwareFlowControl = SDMMC_HARDWARE_FLOW_CONTROL_DISABLE; hmmc1.Init.ClockDiv = 2; if (HAL_MMC_Init(&hmmc1) != HAL_OK) { Error_Handler(); } /* USER CODE BEGIN SDMMC1_Init 2 */ /* USER CODE END SDMMC1_Init 2 */ } UPDATE:Now I'm co
I added I-CUBE-wolfMQTT and I-CUBE-wolfSSL software packs to my STM32CubeIDE project in CubeMX built into CubeIDE. In CubeMX I set parameters:for wolfSSL:RTOS - Single THreaded (no RTOS / Baremetal)IO interface - LWIP (native API)for wolfMQTT:FREERTOS Support - FalseIO - LWIPDespite that, trying to compile project ends up with errors like "'SOL_SOCKET' undeclared (first use in this function)" or "'AF_INET' undeclared (first use in this function)". It is because example code uses sockets from LwIP library which can't be used if FreeRTOS is disabled. Even in lwipopts.h LWIP_SOCKET is defined to 0 and you can't enable it in CubeMX if NO_SYS (OS Awarness) is set to OS Not Used. Am I missing something? Did I misconfigure settings in CubeMX or are provided examples just wrong?
I am using STM32CubeIDE version 1.17.0 and trying to develop a custom board using X-CUBE-DISPLAY with a graphics display using the ST7789V controller. This is a design update for a previous board that was using a 7-segment LCD display. I have a preliminary version of my software running on a NUCLEO-G071RB (with external flash disabled) as a proof of concept.When I open my .ioc file and select Manage Software Packs, it shows X-CUBE-DISPLAY as installed, versions 1.0.0 up to 3.0.0, but they are all marked with a red cross. Hovering the mouse on 3.0.0 shows "This version of the pack is not compatible with the current version of STM32CubeIDE. It is compatible with STM32CubeIDE from 1.11.0 to 1.12.1". Earlier versions show correspondingly early versions of the IDE. Version 1.12.1 or earlier is no longer available on the STM32CubeIDE download page.Does this mean support for X-CUBE-DISPLAY is discontinued, or is the message just wrong? Is there any alternat
Hello Guys,I’m working on a project using the STM32F767 evaluation board with STM32CubeIDE and FreeRTOS. In this project, I want to create a .csv file inside the MCU’s storage, write data to it, and then share that file over Ethernet.So far, I have successfully configured the Ethernet communication and can transfer strings between the MCU and PC. However, when I try to create or open the .csv file, my fopen() call returns NULL, and the file is not created.Code is attached with the post. Please help me.Thanks.FILE *f; //Golobal declare for file void create(void ) //Function to create file,write { { HAL_GPIO_WritePin(GPIOB, LD2_Pin, GPIO_PIN_SET); f = fopen("trial.txt","w"); if(f == NULL) { printf("\nCann't open file"); HAL_GPIO_WritePin(GPIOB, LD2_Pin, GPIO_PIN_RESET); } else{ fprintf (f, "Hello World "); fclose (f); } } }
NUCLEO-N6 : I was using UART to transfer a more than 100KB image to the in_buffer in the AXIRAM, so, the HAL_receive itself can not receive so much once, and I wrote a loop function it, to receive it seperately, with every timne 64KB max. And the aligment of the data some how get wrong, do you have idea how I can use DMA of the N6 to directly transfer a more than 64KB data to the AXIRAM5 directly with only one time HALDMA beginning? the size is uint16, so max 64KB, I heard I might can use LLI of the HPDMA to do this, but I haven't learnd any thing about that, in university 64KB is far from enough, so have no experience on how to do that with LLI, do you have any documentations regarding that ? or do you have example for receiving a 224*224*3 data through UART and DMA directly to AXIRAM with address 0x342E0000? thanks a lot
I'm encountering a networking issue where my STM32 device that is NUCLEO-H755ZI-Q, configured with the LwIP stack over Ethernet without FreeRTOS and assigned a static IP address (192.168.100.123), is unable to be discovered or pinged from a PC connected via Wi-Fi to the same router. The Ethernet link is physically active and UP, and the router indicates that data is being transmitted to the STM32, yet it shows almost No receiving packets from STM32 (onto the router). The router don't show the the static IP i assigned to the STM32 as well. I opened my router page to look inside these data. Debug logs from the STM32 reveal that ARP requests are being sent repeatedly and that the IP configuration is correctly set on the interface. Occasionally, the STM32 receives and parses ARP frames, but they are not directed to it, indicating that the receive path is at least partially functional. When using DHCP, the STM32 successfully constructs and broadcasts DHCP discovery packets, yet no DHCP offe
Hello ,I'm working on a STM32F407VET6 board with integrated ethernet port.I'm using Stm32CubeIde 1.18.1 with firmware FW_F4 V1.28.2.I'm just starting out and trying to display a webserver page without rtos for the moment.I've been going round in circles for quite a long time, even with chatgpt and company...At the moment I've managed to activate lwip (2.1.2) and it's working because when I start up I ping the address 192.168.0.123 and it responds.However, as soon as I open my web browser and try to access it, the page doesn't display.These are the obscure areas for me.The tutorials I've followed show each time: First of all goto LWIP->Target->lwipopts.h and change the #define HTTPD_USE_CUSTOM_FSDATA 0or I don't have this define generated automatically by stm32CubeIde so I don't set it.I've used a tutorial "controllerstech".I like it (I've even taken fsdata.c directly from it)Every time I get build errors, so I exclude it.I don't know where it's going wrong, but I've been failing
void STM32F4_SystemClock_Config(void) { RCC_OscInitTypeDef RCC_OscInitStruct = {0}; RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; // 1. Habilitar el reloj del controlador de potencia y configurar la escala de voltaje __HAL_RCC_PWR_CLK_ENABLE(); __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2); // 2. Configurar oscilador externo HSE (8 MHz), activar PLL 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; // PLL Config: // - PLLM = 8 (divide HSE 8MHz a 1 MHz) // - PLLN = 336 (multiplica a 336 MHz) // - PLLP = 4 (divide VCO para SYSCLK: 336/4 = 84 MHz) // - PLLQ = 7 (para USB, SDIO: 336/7 = 48 MHz) RCC_OscInitStruct.PLL.PLLM = 8; RCC_OscInitStruct.PLL.PLLN = 336; RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV4; RCC_OscInitStruct.PLL.PLLQ = 7; if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) { STM32F4_Error_Handler(1); } // 3.
Hello ST Community, I am currently working with the Nucleo H723ZG board and facing issues establishing a ping response using the LWIP stack. Despite following various examples and configurations, I have been unable to get it to respond to pings. Here are the details of my setup: Development Environment: STM32CubeIDE V1.17 and STM32CubeMX V6.13.0 Configuration: I have not used RTOS. I configured the Ethernet settings according to package examples. :C:\....\STM32Cube\Repository\STM32Cube_FW_H7_V1.12.1\Projects\NUCLEO-H723ZG\Applications\LwIP\LwIP_UDP_Echo_Server I ensured that the Ethernet cable was connected properly and used a direct connection to my pc. I have tried multiple versions of the H7 package ( 1.12.1 - 1.12.0 - 1.11.1 - 1.11.0 - 1.10.0 ) and tested various configurations without success. The ping command consistently results in "destination host unreachable."Could anyone provide insights or suggestions on what might be missing or misconfigured? //***********
ST Community highlights – April to June 2026
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.