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 using X-CUBE-AWS-H7S (v1.0.0) on a STM32H7S78-DK.The bootloader and app were built directly from the package with no source code changes at all, yet the UART-based CLI shows that the board is reset every now and then (sometimes every ~5 minutes, sometimes after more than an hour).Ruled out power supply issues and ST-Link issues.Resets happening both with an Ethernet cable connected and without it, both with a valid AWS IoT configuration and without it, both when using a serial console (with an ST-Link based virtual COM port) and without it.Stack/heap utilization seems normal (and stable) up to the moment where the board is reset.Built with no errors using STM32CubeIDE with no configuration changes (OEMiROT, overwrite mode) Is this a known issue with X-CUBE-AWS-H7S ?
Hi Everyone,I have written a firmware which write some meta data in STM32L4 internal flash memory. But sometimes it happens that code gets stuck in a loop while erasing the flash memory. uint32_t UserFunctionForErasingFlash(void) { FLASH_EraseInitTypeDef EraseInitStruct; uint32_t SectorError = 0; uint32_t Success=1; EraseInitStruct.TypeErase = FLASH_TYPEERASE_PAGES; EraseInitStruct.Banks = GetBank(MDM_FLASH_ADD); EraseInitStruct.Page = GetPage(MDM_FLASH_ADD); EraseInitStruct.NbPages = 2; /* Unlock the Flash to enable the flash control register access *************/ g_unlock_erase_flash = HAL_FLASH_Unlock(); // clear_flash_flags(); if(HAL_FLASHEx_Erase(&EraseInitStruct, &SectorError) != HAL_OK){ g_erase_error_code = HAL_FLASH_GetError(); Success=0; Error_Handler(); } /* Lock the Flash to disable the flash control register access (recommended to protect the FLASH memory against possible unwanted operation) *********/ HAL_FLASH_Lock(); return Succes
Hi.I was working on my small pet-project, trying to develop USB mic on my stm32f4 discovery board. I was successfully completed this project but still not fully understand how it`s working. Function DCD_EP_Flush really confuse me.My device work as follows. I am start sending sample from mic to usb, when host select appropriate alt setting (when host send SET_INTERFACE with wIndex == 1)After that my usbd_audio_DataIn func looks like this (a bit simplified version):static uint8_t usbd_audio_DataIn (void *pdev, uint8_t epnum) { DCD_EP_Flush(pdev, AUDIO_IN_EP); /* function, that get`s pointer to buffer with lattest mic`s samples */ uint8_t *next = um_handle_in_dequeue(in_handle); DCD_EP_Tx(pdev, AUDIO_IN_EP, next, in_handle->um_usb_packet_size); return USBD_OK; }Why do I need DCD_EP_Flush here???????If I correctly understand, usbd_audio_DataIn is calling, when data was transmitted over USB from FIFO buffer. So in that case flushing FIFO buffer is kinda redundan
Hello everyone,I'm working on a project using the STM32F334R8 MCU to capture two rising edge signals with the intent of obtaining the CNT value at each signal's rising edge. My calculations and data are meant to be processed through an external interrupt and transmitted to a computer. I am using a 72 MHz clock with Timer 2, specifically channel 1 and 4.In my debug testing, everything initializes correctly—both input capture and external interrupts start properly, and both CCR1 and CCR4 registers display values. However, when I attempt to retrieve these values using readcapture, the function consistently returns zero. I have also tried accessing the register values directly without using the API, but the results remain the same.Here are some key points:MCU: STM32F334R8Timer Clock: 72 MHzTimer used: Timer 2 (Channel 1 and 4)Issue: CCR displays values, but HAL_TIM_ReadCaptureValue() returns zero.Has anyone encountered a similar issue or can provide insights on why this discrepancy o
Hi folks,I've got an F429ZI board which works fine, I've run a few samples and I've had zephyr applications running on it no problem. What I now want to do is set up my own small project using the bare minimum of third-party code to begin. I used CubeMX to configure the board with a minimal set of peripherals, set up the clock tree, and then generated the initial code.Unfortunately, I immediately ran into problems. The generated code went straight into the error handler trying to set up the clocks. After some debugging and hunting around, I found the HAL RCC code was actually buggy and it simply won't work as is! There's even a bug in the suggested fix! I spent some more time looking over the HAL RCC code, and I've found a few more issues with it on top of that.The bug above was worked around by partially fixing the comparisons, adding a few locals to debug why the checks were failing and returning HAL_OK to get past this point. PLLP still needs
Hello everyone,My company bought a card ... We want to use the 4 bit SD card.I generated a System Workbench for STM32 project (FatFs) , without modifying anything in the GPIO, SDMMC or other properties.Compilation and programming is done without problem.However when I debug, the initialization part of the SD card shows an error.The source of this error is as follows:Stm32h7xx_ll_sdmmc.c fileLine: 1240 - 1254/** * @brief Checks for error conditions for R1 response. * @param hsd: SD handle * @param SD_CMD: The sent command index * @retval SD Card error state */ static uint32_t SDMMC_GetCmdResp1(SDMMC_TypeDef *SDMMCx, uint8_t SD_CMD, uint32_t Timeout) { uint32_t response_r1; uint32_t sta_reg; /* 8 is the number of required instructions cycles for the below loop statement. The Timeout is expressed in ms */ uint32_t count = Timeout * (SystemCoreClock / 8U /1000U); do { if (count-- == 0U) { return SDMMC_ERROR_TIMEOUT; } sta_reg = SDMMCx->STA; }while(((sta_r
I was struggling to get LwIP TFTP server working on MCU boards (NUCELO-H743ZI). After debugging I have found:Why is TFTP_MAX_MODE_LEN defined as 7 (instead of >= 8)?Why is TFTP_MAX_FILENAME_LEN just defined as 20?So, it results in:sending (PUT) or receiving a file (GET) via TFTP client on Windows 10 (install Windows Features for 'tftp' available on CMD line) - without option -i - does not work! ('mode' is set as "netascci" which has 8 characters!)If you want to transfer a file with name longer as 20 characters (including the dot) - it will not work!OK, working now (if you need details or code ... don't hesitate ...).Just to bear in mind as well: you had to set macro LWIP_UDP to 1 as well! (even TCP HTTPD server runs already fine).So, LwIP TFTP server works, but not from scratch, some settings are needed to be modified.
using stm32h753bitx controller and their latest HAL drivers. On the every reset RTC loses one second. It also loses time while the device in idle condition.My devices uses main battery power and coin cell battery for backup.Here's my RTC initialization,
I am trying to get the PCM1808 ADC working on my STM32H7 using Cube IDE, but get stuck regarding endianness.I understood STM32 is little endian and i2s is big endian. I am trying to receive 24 bit data via DMA but when reading my DMA buffer I am not sure of the endianness. The buffer is 16 bit so the 24 bit data is split into two and some zero's get added if I am understanding it correctly. My first byte is some number, the second is all zero's e.g.1011110000000000Then the third is always all 1's or all 0's and the last byte is some number again e.g.1111111111111010 or 100But I was expecting either the first three bytes to be a number or the last three and the rest to be 0's.Does it automatically change the endianness from big to little per index in the buffer (16bits) or does it do it for the whole 32 bits. Or does the STM32 not do anything with the big endian number and just literally copy it into the DMA in big endian representation.Is there something I'm missing?DMA is set to circu
I using the stm32L4+MT29F2G01 and the latest Filex library from ST 2.0.0 (6.2.0 AzureRTOS). After the format, the performance is satisfactory for me (250ms write 2048B), but after saving a few files of about 1MB each, the efficiency drops sharply, the 2048B data writing takes up to 5 seconds.When I want to delete a 1 MB file, it takes more than 30 seconds.I using standart configuration with fault_tolerant.fx_user.h: #define FX_ENABLE_FAULT_TOLERANT #define FX_FAULT_TOLERANT #define FX_FAULT_TOLERANT_DATA ALIGN_32BYTES(UCHAR media_memory[2048]); ULONG fault_tolerant_memory[3072 / sizeof(ULONG)]; void fx_app_thread_entry(ULONG thread_input) { status = fx_media_format(&nand_flash_disk, fx_stm32_levelx_nand_driver, /* Driver entry */ (VOID *)CUSTOM_DRIVER_ID, /* NAND disk memory pointer */ media_memory, /* Media buffer pointer */ sizeof(media_memory), /* Media buffer size */ "NAND_FLASH_DISK", /* Volume Name */
I am using the NUCLEO-G474RE along with the X-NUCLEO-SRC1M1 board to create a USB-C power delivery source. I am also using the "SRC1M1_Source" example project in the x-cube-tcpp software download.I am attempting to provide a 20V, 5000mA source to a USB-C power delivery sink. After I connect the nucleo board to the STM32CubeMonitor-UCPD, I am able to add the 20V, 5000mA PDO and send it to the target. I plug the sink device into my SRC1M1 board (trace data attached)I see the sink requests the 20V, 5000mA profile, however the trace data shows USBPD_CAD_STATE_DETACH_SRC soon after the profile is accepted by my source. The connection and negotiation then start again and continue in an infinite loop. I am supplying the SRC1M1 board with an external power supply set to 5V. I had assumed that the source would not indicate SRC_READY until I manually adjusted the supply voltage to 20V, however it just disconnects. What is the proper way to use the SRC
I have a H745 Nucleo board running LwIP. I have implemented a simple udp echo server. I receive all of the data for the udp messages being sent to the board but the data I am sending back never makes it out on the wire (verified with Wireshark). I have stepped all the way down to HAL_ETH_Transmit() and everything looks fine at that point. The correct number of bytes get transmitted, just the wrong data (mostly zeros). I'm assuming this is a memory/cache/dma configuration issue but I can not seem to locate the problem. I've tried doubling the task stack size but that did not help. I've also been through numerous HowTo's including this one: https://community.st.com/s/article/How-to-create-project-for-STM32H7-with-Ethernet-and-LwIP-stack-working Any help is appreciated. My entire project is attached, including the ioc for CubeMX. All the relevant code is in main.c: functions myudpInit() and mydupEcho().
I am working on a tftp client program that receives a file from a tftp server. I found the tftp client library below and ported it. https://github.com/particle-iot/lwip/blob/master/contrib/examples/tftp/tftp_example.c The file is received in debugging mode, but it is not received at runtime. I checked and confirmed that 'fopen' does not work at runtime. I don't know why. Below is the fopen code. ------------------------------------------------------------------------------------- static void *tftp_open_file(const char* fname, u8_t is_write){snprintf(full_filename, sizeof(full_filename), "%s%s", LWIP_TFTP_EXAMPLE_BASE_DIR, fname);full_filename[sizeof(full_filename)-1] = 0; if (is_write) {return (void*)fopen(full_filename, "wb");} else {return (void*)fopen(full_filename, "rb");}} ------------------------------------------------------------------------------------- I tried delaying before the tftp_client_init() function because it seemed to be a timing issue. Please help. &nb
Hi ST Team,I am planning to use the X-CUBE-STL library with the STM32H7 dual-core microcontroller and RTOS (ChibiOS, FreeRTOS). Could you please guide me on how to integrate X-CUBE-STL with RTOS like ChibiOS, FreeRTOS, SafeRTOS, etc.? Additionally, are there any resources available for development?Thanks,Nitish Sharma
Hello to the whole communityDuring a recent project where we use the STM32G491VETx version as a microcontroller, I inserted as bootloader "STM32 OpenBootLoader V3.0.1" extracted from the package"STM32Cube_FW_G4_V1.5.0" downloaded from the ST website. Using the bootloader I found the correct functioning using the USART2 as a communication interface,while using the USART1 it does not work.In detail, when I try to connect to the bootloader through the synchronization character (7FH), it does not respond with ACK (79H).Thanks for any explanations.Rodolfo
AN5215 is about ` STM32H747/757 advanced power management`, which include freertos / ltdc / STemwin and other components.It's maybe my BEST reference code for my product.In page 1 , it clearly said " This application note is provided with the X-CUBE-PWRMGT-H7 MCU Package" , but when I switch to its page, it's Totally WRONG ! The 'X-CUBE-PWRMGT-H7 ' page said it's a demo about STM32H7x3/A3/B3 devices. Code zip attached, things like freertos / STemwin are completely missing ! My question is: Where can find the CORRECT AN5215 application code ? It's important for my product. Thks !
Dear All,For the needs of my project I need to be able to check if an USB drive is attached to my device, if it is then I need to mount it and then I need to be able to do all the different FatFS commands.So far I have managed to import the FatFS library and got it working with the SDMMC1 peripheral, so I am able to mount an SD card and create, read etc files and folders.Now I am trying to import the USB libraries needed for this. As a starting point, I took this repository:https://github.com/STMicroelectronics/stm32_mw_usb_host/tree/8b21b5c4a6b8df42ad46b9df63bb87c47bd7b2f5 where some drivers are provided.Based on this I was trying to figure out what is the correct implementation for the functions in the usbh_conf.c should be. To this end I tried loading an example for the STM32F769NIHx chip. But this board seems to be using a peripheral with a somewhat different configuration of that of the STM32U5A9NJHxQ.In CubeMX I have the following settings:In my code I am using this inside a
Please let me know if choosing Onvif stack to talk to a Surveillance Camera like CP-UNC-LA41ZPL5-MD,4MP WDR Network IR Bullet Camera - 50Mtr, from a NUCLEO-F767ZI board. Is it a good choice to choose Azure as RTOS for this project?Using HTTP is the only way to talk to the camera?We also have a custom board based on STM32-F767VIT6; we will be porting this code to the custom board, once it is proven on the NUCLEO board.We are going to download the Onvif stack from Genivia (Genivia Product Downloads).I would like to take your valuable opinions before jumping on to the project. Please suggest. Thank you!Raghu Devisetti
I am using kit board stm32f411vet6 discovery, it has L3gd20 sensor and LSM303DLHC sensor. I want to ask if i can use x-cube-mem1 for L3gd20 and LSM303DLHC because i didn't find one. If x-cube-mem1 is not used then what other library or support software should i use.
Dear Team, I am using an STM32F407VET6 controller with STM32CubeIDE and FreeRTOS. I’m encountering a problem with thread management in my application. Please find below an overview of my setup: Mutex: Used for UART communication. osTimer: Configured to generate a 1-millisecond periodic interrupt, primarily used to check received frames from the serial/UART. Once a complete frame is received, the data is placed into uartQue. Message Queues: One for UART communication (uartQue) with a message count of 2. One for TCP communication (tcp_messageQue) with a message count of 16. Tasks: http_task: Used for configuring UART settings. tcp_task: Retrieves data from the TCP/IP socket and places it into tcp_messageQue. serial_task: Gets data from tcp_messageQue and sends it over UART. It also retrieves data from uartQue and sends it over the TCP/IP socket. All tasks are currently running at the same priority (osPriorityNormal). the stack size for all task is 4096 The http
IT IS POSSIBLE TO KNOW HOW TO CALCULATE MCU INTERNAL TEMPERATURE OF STM32H743ZITX SERIES IF YES THAN HOW I DO IT GIVE ME CODE AND PROCESS ....
So we have our STM32 making nice serial diagnostics over a USB VCP port with a UCBC connector (only pins D+/D-/Gnd),and then I looked at my Android phone and its USBC connector... so much easier to carry in the field...I tried the Playstore Serial/UART/VCP apps but none would connect.Anyone know an Android App that might connect to an STM32 VCP port by USB? (USB2.X)Paul
I am trying to interface to a 3 port switch "Micrel ksz8863" using the MDIO interface. I have setup the eth peripheral and I can measure activity on the data and clock pins on the MCU. I measure a clock speed of 1.75 Mhz. But when I try to debug, the data I get returned from the PHY is always 0xFFFF and HAL_OK. uint32_t regValue = 0; while(1){ HAL_StatusTypeDef status = HAL_ETH_ReadPHYRegister(&heth, 3, 0x0B, &regValue); HAL_Delay(500); } CubeMX ETH generation: static void MX_ETH_Init(void) { /* USER CODE BEGIN ETH_Init 0 */ /* USER CODE END ETH_Init 0 */ static uint8_t MACAddr[6]; /* USER CODE BEGIN ETH_Init 1 */ /* USER CODE END ETH_Init 1 */ heth.Instance = ETH; MACAddr[0] = 0x00; MACAddr[1] = 0x80; MACAddr[2] = 0xE1; MACAddr[3] = 0x00; MACAddr[4] = 0x00; MACAddr[5] = 0x00; heth.Init.MACAddr = &MACAddr[0]; heth.Init.MediaInterface = HAL_ETH_RMII_MODE; heth.Init.TxDesc = DMATxDscrTab; heth.Init.RxDesc = DMARxDscrTab; heth
Hello everybody,I want to program a graphics animation for the lcd display of the STM32H7B3I-DK Board. In this project I dont want to rely on other libraries. I want to do everything by myself. That means do the read/write operations to the needed registers myself. I have already managed to enable the lcd display and initialise the ltdc. Initially I set the background color to green and everything worked fine. My next goal then was to use the layers. I tried to follow the steps provided in RM0455 Reference Manual.These are the following:1) Enable the LTDC clock in the RCC register.2) Configure the required pixel clock following the panel datasheet.3) Configure the synchronous timings: VSYNC, HSYNC, vertical and horizontal back porch, active data area and the front porch timings following the panel datasheet as described in the Section 36.4.1.4) Configure the synchronous signals and clock polarity in the LTDC_GCR register.5) If needed, configure the background
I need help with STM32F4 Firmware Upgrade Using Pendrive. I tried the FW Standalone Upgrade Application given for STM32F429 Discovery Board. But the code is giving hard fault error. It opens the directory properly and opens the file. But when it reaches the read function it gives error when reaches validate function inside f_read() function. I have not been able to debug and understand the exact point of issue. If anyone can provide some inputs will be helpful.Or else if someone has a working code for the bootloader and can share it will be really appreciated.Thankyou.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.