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
There's a serious bug in G4's hal(version 1.6.1) library in spi dma function.The problem is:1, user calls HAL_SPI_TransmitReceive_DMA2, after spi transmission finished, HAL will call HAL_SPI_TxRxCpltCallback3, user calls HAL_SPI_Receive_DMA inside HAL_SPI_TxRxCpltCallback, and will fail in a chance.The reason is:1, HAL_SPI_TransmitReceive_DMA will start both Rx and Tx dma, and after transmission complete, HAL_DMA_IRQHandler will be triggered to set dma handler's state to ready and unlock dma handler;2, If Rx dma complete first and trigger HAL_SPI_TxRxCpltCallback, user calls HAL_SPI_Receive_DMA in the callback, don't know why HAL will still start Tx dma which is still locked, that cause function to fail.3, if Tx dma complete first, the scenario above will be fine. Unfortunately, these 2 simultaneously started dma(Rx & Tx) seem to complete in a random sequence (most of time Tx dma complete first) in my observation, in a rare case Rx dma will complete fi
Hello,I am planning to build a cellular application using EC200 as my modem. I prefer to use in modem stack using AT commands due to memory constraint of my MCU. I have come across X Cube Cellular where it is mentioned this setting can be changed using compilation flag as per the release notes. Kindly guide me to achieve this. Thank you. Regards.
Hi, It works, apparently a different microSd card works. however, it is strange that, DATALOG2 could write into the card. May i know how shall i perform sd card format function or what to fill up in the function? Follow-up of the the topic below: Solved: Re: Standalone FileX SDIO SD Card Initializing err... - STMicroelectronics Community
There is no test.txt file in my USB drive after the example is run.The board sends this log**** USB OTG HS Dual_Class Host **** USB Host library started. Starting Application Connect your HID or MSC Device USB Device Enumeration FailureTried to attach the USB drive to both USB connectors.The last message is sent about 1.5s after the previous ones.Where can be an issue?
Hello, I'm currently testing a bootloader-XIP application architecture on a NUCLEO-H7S3L8 board. The MRAM (XSPI2) test works perfectly in the bootloader, but when I move the same code to the XIP application, the system hangs during XSPI2 initialization. I would appreciate any advice on this issue. System Environment MCU: STM32H7S3L8 Board: NUCLEO-H7S3L8 IDE: STM32CubeIDE v1.19.0 Firmware: STM32Cube_FW_H7RS_V1.2.0 Project Goal and Progress I have successfully completed all communication mode tests for the MRAM (XSPI2) in the bootloader (exercise_Boot). The bootloader runs from internal flash, and through mram_spi_test.c, it has fully tested the MRAM connected to XSPI2 in all SDR/DDR and SPI/DSPI/QSPI modes, confirming perfect operation. I have migrated the verified test code to the XIP application (exercise_Appli). The bootloader loads the application to the external NOR flash (connected to XSPI1) and jumps to it in XIP mode. I have successfully confirmed that the
Hi,Can someone help me how to use MbedTLS to my TCP Client Example. I haven't worked before . please tell me step by step. How can I proceed.I'm attaching the source code for the reference. Thanks,Harshitha R
Hi everyone,I am trying to generate sinewave using PWM mode of microcontroller.I am using Discovery Board having STM32F407 microcontroller. System clock and Timer clock are of 8MhzI am using two timers Timer1 for High Frequency switching (500Hz) and Timer2 for Low Frequency switching (50Hz).waveforms I am getting are OK but there is one issue, after every 7 cycles I am getting an extra PWM sample in my output.I don't know why it is so. I am attaching image of the output and code. may be there is a minor mistake which I am doing but not sure. can you guys let me know if there is an issue uint16_t sineTable[SINE_TABLE_SIZE] = {400,635,780,780,635,400,165,20,20,165}; // Initializing Timer1 void MX_TIM1_Init(void) { TIM_ClockConfigTypeDef sClockSourceConfig = {0}; TIM_OC_InitTypeDef sConfigOC = {0}; TIM_BreakDeadTimeConfigTypeDef sBreakDeadTimeConfig = {0}; htim1.Instance = TIM1; htim1.Init.Prescaler = PRESCALER_REQUIRED; htim1.Init.CounterMode = TIM_COUNTERMODE_UP; htim
The Cube-AZRTOS bundles cmsis_os2.c implementation has potential NULL pointer dereferences. There are many lines of the form:if (( attr->cm_mem == NULL) || (attr == NULL))in code that attempts to recover and de-allocate memory from a "create" call that failed. The order of comparisons should be reversed:if ((attr == NULL) || (attr->cb_mem == NULL))This happens for different structure members, not just the cb_mem.I've checked the F4 version 1.1 ZIP file and github repo, as well as the github H7 repo and they both have this issue. I suspect all versions do.
Hi, I using STM32H745I-Disco board and trying to do intercomunication using OpenAMP. But my generated code is compile sucessfully but it not working in coreM4 it stucking in the below function /* create a endpoint for rmpsg communication */ int32_t status = OPENAMP_create_endpoint(&rp_endpoint, RPMSG_CORE_M4_NAME, RPMSG_ADDR_ANY, rpmsg_recv_callback, NULL); if (status < 0) { Error_Handler(); } I have tried the example code Openamp_ping_pong example for STM32745I-Disco board, which is Working fine. But my generated code is not working. I have go through the already mention same issues in ST forum which link given belowhttps://community.st.com/t5/stm32cubemx-mcus/openamp-issue-on-stm32h745/m-p/794133?search-action-id=67994286745&search-result-uid=794133 and I have go through the OpenAMP document also which link mention below https://www.st.com/resource/en/application_note/an5617-stm32h745755-and-stm32h747757-lines-interprocessor-communications-stmicroelect
Hi,We are currently using STM32H7S7 MCU with display and similar USB C circuit from the developer board.I wanted to connect a Web camera and to be able to display video from the screen.I wanted some help and guidance on where to find the driver?does ST have any driver I can use for getting the USB web camera data. Thanks
Hello @D.Botelho @mƎALLEm I had an issue of ThreadX and FDCAN transmit as below. I use the stm32g474 and config a threadx and fdcan with stm32cubemx, so far it works well. but when i add some fdcan transmit code, it comes strangely. the code as below void appThread2(ULONG thread_input) { while(1) { if(fdcan1_RXFlag == 1) { fdcan1_RXFlag = 0; // Clear the receive flag for(int i = 0; i < 8; i++) { fdcan1TxData[i] = fdcan1RxData[i]+1; // Copy received data to transmit buffer } my_FDCAN1_Transmit(fdcan1TxData); // Echo back the received data printf("FDCAN1 Received data: "); for (int i = 0; i < 8; i++) { printf("%02X ", fdcan1RxData[i]); } printf("\r\n"); } // // 发送 0x12 fdcan1TxHeader.Identifier=0x012; fdcan1TxData[0] = (dis_sensor_data1.dis1 >> 0) & 0xff; fdcan1TxData[1] = (dis_sensor_data1.dis1 >> 8) & 0xff; fdcan1TxData[2] = (dis_sensor_data1.dis2 >> 0) & 0xff; fdcan1TxData[3] = (dis_sensor_data1.dis2 >>
Hello everyone,I am working on a custom board with STM32H723VGT6 and LAN8742A but after much troubleshooting, pinging has remained unsuccessful. I am trying to use LwIP without RTOS. I have a NUCLEO-H723ZG that I have been able to successfully ping without RTOS, but when I use the same CubeMX configurations (except the RMII pinout) on my custom board, it does not work. I tried to very closely follow the Ethernet schematic for the NUCLEO-H723ZG, the only main changes I made were the pinout (since I am using VG instead of ZG) and using two ESD protection diodes instead of one for ease of routing. The RMII pinout follows what is presented in CubeMX. Here are the following code modifications I have made, based on the H723ZG example in this repo https://github.com/stm32-hotspot/STM32H7-LwIP-Examples.git:Added to STM32H723VGTX_FLASH.ld: .lwip_sec (NOLOAD) : { . = ABSOLUTE(0x30000000); *(.RxDecripSection) . = ABSOLUTE(0x30000100); *(.TxDecripSection) } >RAM_D2 /*
Hello,On the STM32N6, I am using DCMIPP_PIXEL_PACKER_FORMAT_YUV422_1.I am seeing the correct coloring when using CMW_MIRRORFLIP_NONE and the incorrect coloring when setting CMW_MIRRORFLIP_FLIP. Any help getting the correct DCMIPP_ColorConversionConfTypeDef color_conf for the CMW_MIRRORFLIP_FLIP ? ... if (HAL_DCMIPP_PIPE_EnableRedBlueSwap(&hcamera_dcmipp, DCMIPP_PIPE1) != HAL_OK) { Error_Handler(); } #define N10(val) (((val) ^ 0x7FF) + 1) DCMIPP_ColorConversionConfTypeDef color_conf = { .ClampOutputSamples = ENABLE, .OutputSamplesType = DCMIPP_CLAMP_YUV, .RR = N10(26), .RG = N10(87), .RB = 112, .RA = 128, .GR = 47, .GG = 157, .GB = 16, .GA = 16, .BR = 112, .BG = N10(102), .BB = N10(10), .BA = 128, }; if (HAL_DCMIPP_PIPE_SetYUVConversionConfig(&hcamera_dcmipp, DCMIPP_PIPE1, &color_conf) != HAL_OK) { Error_Handler(); } if (HAL_DCMIPP_PIPE_EnableYUVConversion(&hcamera_dcmipp, DCMIPP_PIPE1) != HAL_OK) { Error_H
I just had a quick question to clarify my understanding of how byte allocation works for thread stacks in the ThreadX RTOS. I've seen the official examples use a byte pool and then allocate bytes from that pool before creating a new thread. However, in other places I've seen something as follows where the bytes are allocated statically: /* Private variables ---------------------------------------------------------*/ uint8_t thread_stack[TX_THREAD_STACK_SIZE]; TX_THREAD thread; /* Private function prototypes -----------------------------------------------*/ VOID thread_entry(ULONG thread_input); /** * @brief Application ThreadX Initialization. * memory_ptr: memory pointer * @retval int */ UINT App_ThreadX_Init(VOID *memory_ptr) { UINT ret = TX_SUCCESS; TX_BYTE_POOL *byte_pool = (TX_BYTE_POOL*)memory_ptr; (void)byte_pool; tx_thread_create(&thread, "thread", thread_entry, 0, thread_stack, TX_THREAD_STACK_SIZE, 15, 15, TX_NO_TIME_SLICE, TX_AUTO_START); return ret
Hi, I have been working with a STM32U575 MCU and something strange has happened that I spent a lot of time trying to find the root cause for it and I am not able to understand what is wrong. I work with I2C slave interrupts and have FreeRTOS running. I realized FreeRTOS gets stuck in checking priorities when a FromISR function is called from the I2C handler. Long story short, checking all the configs many times, I checked what are the priority of the IRQs? HAL_NVIC_SetPriority(I2C1_EV_IRQn, NVIC_IRQ_PRIOR_I2C_SLAVE_EV, NVIC_IRQ_SUB_PRIOR_I2C_SLAVE_EV); HAL_NVIC_SetPriority(I2C1_ER_IRQn, NVIC_IRQ_PRIOR_I2C_SLAVE_ER, NVIC_IRQ_SUB_PRIOR_I2C_SLAVE_ER); HAL_NVIC_EnableIRQ(I2C1_EV_IRQn); HAL_NVIC_EnableIRQ(I2C1_ER_IRQn); PRINT("I2C1_EV raw priority: %lu\n", NVIC_GetPriority(I2C1_EV_IRQn)); PRINT("I2C1_ER raw priority: %lu\n", NVIC_GetPriority(I2C1_ER_IRQn)); PRINT("__NVIC_PRIO_BITS = %d\n", __NVIC_PRIO_BITS); PRINT("configPRIO_BITS = %d", configPRIO_BITS); having
Hi, I'm running a (custom) board that makes use of an STM32H723VET and a LAN8742. A project is set up in CubeMX that makes use of lwIP together with this LAN-chip (there is an issue in CubeMX which deselects the LAN8742 on loading the CubeMX file, but this is something I have already catched). lwIP is configured to make use of a static IP. Now when I run my code in CubeIDE, I can see the interface is set up properly and it detects a 100 MBit duplex connection. Unfortunately that's all what works. In call of netif_set_link_up(), an ARP-request is tried to be transmitted. Some layers deeper, within the HAL-functions, this ARP-request can not be sent. Function HAL_ETH_Transmit() ends up in an timeout while waiting for these ARP-data being transmitted. That lets me assume, something wents wrong with the hardware initialisation. However, functions HAL_ETH_Init() and LAN8742_Init() go through without any error and function LAN8742_GetLinkState() returns a proper link state&nbs
Hello, I am starting a timer interrupt to send data over can data at 50 ms below is the configuration for the same and callback function when pulse is complete volatile uint8_t send_ch0_flag = 0; volatile uint8_t send_chx_flag = 0; volatile uint8_t send_relay_flag = 0; void MX_TIM2_Init(void) { TIM_ClockConfigTypeDef sClockSourceConfig = {0}; TIM_MasterConfigTypeDef sMasterConfig = {0}; htim2.Instance = TIM2; htim2.Init.Prescaler = 3999; // 80 MHz / (3999+1) = 20 kHz htim2.Init.CounterMode = TIM_COUNTERMODE_UP; htim2.Init.Period = 999; // (999+1) / 20kHz = 0.05 s = 50 ms htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; __HAL_RCC_TIM2_CLK_ENABLE(); if (HAL_TIM_Base_Init(&htim2) != HAL_OK) { Error_Handler(); } sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL; if (HAL_TIM_ConfigClockSource(&htim2, &sClockSourceConfig) != HAL_OK) { Error_Handler(); } sMa
I'm trying to go about creating a USB Audio interface on a NUCLEO-H7S3L8, receiving USB audio and forwarding it to the SAI, in order to send to an external DAC.Among other tests, I went back to checking when the functions in usbd_audio_if.c get called, to set up transfers of the packets received.And while in a previous version of the same project, on audio playback on the host, AUDIO_AudioCmd_HS() was called, allowing me to continue handling data accordingly, after a Cube MX update (6.14->6.15) and some changes on DMA (to get circular -> non-circular) and SAI (Output Drive enabled) settings, it no longer gets called on playback (a breakpoint within it never gets reached).Following the IRQ handler function for USB on either playback or idle, it only ends up within the code block for handling an incomplete "ISO OUT Interrupt", reaching the "__HAL_PCD_CLEAR_FLAG(hpcd, USB_OTG_GINTSTS_PXFR_INCOMPISOOUT)" macro.Since the changes I've made ever since it was functional seem mostly
Hello everyone, I need to install the firmware support package for STM32H7 series offline. On the website (STM32CubeH7 | Product - STMicroelectronics), I found both the "STM32Cube MCU Package for STM32H7 series" and the "Patch for STM32CubeH7". What is the difference between them ?
Hi, I'm facing issues while trying to interface a 32GB SD card with the STM32H753ZIT6 development board using SDMMC1 and FatFS. Below are the key problems observed:SD Initialization Fails:HAL_SD_Init() consistently returns HAL_ERROR (Status: 1).Card Not Ready:The card state remains 0, indicating that it is not ready or not properly initialized.Incorrect Card Capacity Reported:Despite using a 32GB SD card, the detected capacity is only about 1.8GB (1806848 KB).This suggests the card isn't being properly initialized or detected, and capacity detection is failing. Looking for help identifying the root cause—whether it's clock config, pin setup, timing issues, or something else.I have attached the code and output file.Pin connection between SD card to STM32:-------------------------------------------------------------DAT0 -> PC8DAT1 -> PC9DAT2 -> PC10DAT2 -> PC11CLK &n
I'm developing a project using an STM32 Nucleo board. At the core of this project is a UART-based communication protocol running in interrupt (IT) mode — not polling or DMA. This protocol is responsible for controlling multiple subsystems such as a relay module and a fan speed controller.However, most of these subsystem modules were previously written in polling mode.My question is:Can I integrate these polling-based modules into my current UART IT-mode communication system without causing issues? Or should I consider converting them to interrupt or DMA mode to prevent CPU blocking or communication delays?Additionally:What should I watch out for to ensure the CPU doesn't get blocked and UART interrupts don't get delayed in this mixed-mode setup?Extra context:There are 20 NTC temperature sensors in the system, and temperature from all of them is read once every second using ADC. The highest temperature value is selected and stored in a variable. Based on this value, the fan speed is adj
Hello Everybody, I use STM32CubeIDE1.15.0 Build: 20695_20240315_1429 and a custom board with a STM32303RE inside.I use the IOC interface to set the virtual port com. Everything work fine, just a detail: when i connect, then disconnect and reconnect the USB port, the port com number on Windows change, It increase (search the next available number)! The VID and PID are always the same, so I focus on the serial number, and i found that (code generate by STM32CubeIde): usbd_desc.c: 3 undefined local variables, which are used to generate the serial number. Each time I connect the USB cable, the values change=>so the serial number change. Is it normal? Is it a (strange) way to generate a randomize serial number?Just a bug? (VCP number seems better with this fix: ;)) BR,Guillaume Le Gal
Hi, we are currently using different types of the STM32H743 and I want to verify the package to make sure the software is running on the expected device. For this I am using LL_GetPackageType() and check the returned value against one of the LL_UTILS_PACKAGETYPE defines in stm32h7xx_ll_utils.h (line 202 and following). The UFBGA169 package is not listed here. What is the correct value for it? The H743AII6 on my board reports 8. Please add this package in a next HAL release for H7 series. Kinds regards, Martin
Bonjour à tous, cela fait une semaine que je dois développer une API pour la mémoire sécurisée at88sc12816c De chez Atmel mais trés malheuresement j’arrive paz à établir la communication entre ma carte maitre qui est un stm32f412zgt6 et la mémoire eeprom.De mon côté, j’ai bien compris le fonctionnement de la mémoire mais sauf que dans ce dernier les adresses sont diverses, j’explique par exemple pour faire une écrituredans une UserZone c’est B0 et cet octet ce termine par 0 ce qui est correctement compris par la HAL pour faire de l’écriture en i2cmais dans le cas d’une lecture aussi par exemple on l’adresse qui se termine encore 0, alros que dans un protocole i2c standard pour lire le dernier bit de l’octet d’adresse doit être à 1. Et je pense que c’est exactement ce que la HAL ne comprend pas à son niveau. J’ai vraiment besoin d’aide pour avancer
Hello,i have configured timer1 to trigger via CC1 an adc + dma.For the DMA i have placed the TC irq routine and placed a gpio toggle to follow with a logic analyzer like shown below void DMA2_Stream0_IRQHandler(void){ if (DMA_GetITStatus(DMA2_Stream0, DMA_IT_TCIF0) != RESET) { GPIO_ResetBits(gpio_led_port,gpio_led2); GPIO_SetBits(gpio_led_port,gpio_led2); GPIO_ResetBits(gpio_led_port,gpio_led2); DMA_ClearITPendingBit(DMA2_Stream0, DMA_IT_TCIF0); } }And this is my nvic setup SysTick_Config(SystemCoreClock / 1000); NVIC_InitTypeDef NVIC_InitStructure; NVIC_PriorityGroupConfig(NVIC_PriorityGroup_0); NVIC_InitStructure.NVIC_IRQChannel = SysTick_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); NVIC_InitStructure.NVIC_IRQChannel = DMA2_Stream0_IRQn; NVIC_InitStructure.NVIC_IRQChan
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.