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
Hi,This message started popping up whenever I try to debug my firmware or just want to download it from the RUN button on my STM32Cube IDE (1.14.0).I have a ST-LINKv3 connected to my custom board. I can build the project and download without issues using the USB DFU but my code does not run, and it used to prior to changing my I2C1 interface to slow mode for some tests and then changing it back to fast mode. I've checked another "similar" post that pointed to a crystal hardware issue, but this is not the case in my situation. I have even uninstalled the IDE and re-installed it with no luck. Any suggestions please?Thank you in advance!
which camera module is used for stm32...?
Hello STM Team, I want to interface STM32l476vgt6 with HC-SR04 ultrasonic distance sensor for learning purpose, Requesting you to suggest the working code that will be very helpful for me as i have tried many codes from internet but failed it.please help me with that.Thank you
I'm trying to get SAI working with DMA on a NUCLEO-U575ZI-Q but have not been successful.I've tried using both standard request mode and linked-list mode, but the DMA configuration code is never generated.On an older STM32L4 project, the bottom of `HAL_SAI_MspInit` looked like: hdma_sai1_a.Instance = DMA2_Channel1; hdma_sai1_a.Init.Request = DMA_REQUEST_1; hdma_sai1_a.Init.Direction = DMA_PERIPH_TO_MEMORY; hdma_sai1_a.Init.PeriphInc = DMA_PINC_DISABLE; hdma_sai1_a.Init.MemInc = DMA_MINC_ENABLE; hdma_sai1_a.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD; hdma_sai1_a.Init.MemDataAlignment = DMA_MDATAALIGN_WORD; hdma_sai1_a.Init.Mode = DMA_CIRCULAR; hdma_sai1_a.Init.Priority = DMA_PRIORITY_LOW; if (HAL_DMA_Init(&hdma_sai1_a) != HAL_OK) { Error_Handler(); } /* Several peripheral DMA handle pointers point to the same DMA handle. Be aware that there is only one channel to perform all the requested DMAs. */ __HAL_LINKDMA(saiHandle,hdmarx,hdma_sai1_a); __HAL_LINKDMA(
Hello Everyone,I'm reaching out for some guidance on a project that I've been working on. Despite considerable effort, I'm still struggling to find an effective solution.My project involves developing a controller design to manage different models on each STM32 microcontroller. The goal is to synchronize these controllers. I have successfully built the models, and they are functioning well. The key task is for each board to transmit data to another board. This data is crucial for calculations, leading to the generation of new data. This process of data exchange needs to be continuous. The image below shows how the each stm32 work. Here's the challenge: I'm having difficulties with the data transmission and reception between the boards. The data, which is in double format.I would greatly appreciate any advice or suggestions on this matter, as I'm starting to run low on ideas.Thank you in advance! P.S. This is the code i am using for both boards. Just to check if i can tr
Hi all, I'm currently working on a NUCLEO-H723 board , trying to improve performance of FileX/LevelX.First of all, seems cache is enabled (FX_DISABLE_CACHE is commented) and LX_NOR_SECTOR_MAPPING_CACHE_SIZE is set to 8.I'm trying to access to the first 8 bytes of a file consequently but each time i trigger a read it always falls into the LX driver in charge of reading over DMA to the ext flash.Is cache really working or not? Then while working on that i tried to enable LX_DIRECT_READ, hoping that this will do a read access directly to the memory-mapped octo-spi flash. Nothing work , but a question raised: where do i have to set the base-address for the memory-mapped read access? Thanks in advance to all Davide
HelloI got weird problem. I tried to experiment with WolfSSL+WolfTPM+ST33TP available package and example. All setup I did is according to available git pages as well as youtube tutorial. The original example was tested by WolfSSL on F4xx MCU, I tried to carry over all configurations carefully to my H7 nucleo setup.To the point - I see communication on SPI2 is initiated - first transaction is visible on the lines. There are 3 phases for transaction:-4 bytes TX (80 D4 00 00) /RX-polling for wait states - in my case just single byte is TX/RX but wait flag is not seen.-confirmation byte.Then, next transaction is initiated, its exactly the same like the first one. But just SINGLE BYTE is transmitted (0x80) and that's it, bus is silent. When debugging I see that for both transactions the same data is feeded to HAL_SPI_TransmitReceive().I attach:SPI2 setup: Overall traffic until TRX is gone (red circles mark where same TRX of 4 bytes should be visible): Zoom in to first 2 bytes (correct
hiI am using Nucleo-H743ZI2 for Ethernet :Ethernet RMII:First TxDescribter Address: 0x30040060.First RxDescribter Address: 0x30040000.Rx Buffers Length: 1536.MPU SETUP:void MPU_Config(void) { MPU_Region_InitTypeDef MPU_InitStruct = {0}; /* Disables the MPU */ HAL_MPU_Disable(); /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Enable = MPU_REGION_ENABLE; MPU_InitStruct.Number = MPU_REGION_NUMBER0; MPU_InitStruct.BaseAddress = 0x0; MPU_InitStruct.Size = MPU_REGION_SIZE_4GB; MPU_InitStruct.SubRegionDisable = 0x87; MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0; MPU_InitStruct.AccessPermission = MPU_REGION_NO_ACCESS; MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_DISABLE; MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE; MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE; MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE; HAL_MPU_ConfigRegion(&MPU_InitStruct); /** Initializes and config
I am attempting to enter the system memory bootloader and reload my microcontroller via DFU on USB. I am having great difficulty getting it to work - I will detail the things I've tried below:I have tried entering the bootloader via software and also by holding the BOOT0 pin low and resetting the part. I can enter the bootloader by both methods, but in neither case does the HSE start, nor the USB enumerate properly. When connected to a windows PC, I get "Device Descriptor Request Failed" if I check in the device manager.When attempting to enter the bootloader via software, I use the following method: In the program below, I set _BOOTLOADER_TOKEN to BOOTLOADER_MAGIC_CODE and perform an NVIC_Reset - BOOTLOADER_TOKEN is reserved in my linker definition file, so it is not cleared by startup code, and I check for it at startup. This code executes in main() after HAL_Init() but before I have initialized any peripherals or clocks or anything. The behavior i
Hi,I'm trying to make a thread project. I create my project properly and wrote just multicast coap codes but when I run my code on the board, it get error. I follow my code and I found this function "otInstanceErasePersistentInfo()" returns "OT_ERROR_INVALID_STATE". Firstly I check my fus version and its okay also check my stack and option bytes and they are okay too. How can I solve this problem because there is no error from my codes or fus/stack firmwares?Best regards.
I've got the USB CDC VCOM standalone example compiled and running from https://github.com/STMicroelectronics/STM32CubeF0/tree/master/Projects/STM32072B_EVAL/Applications/USB_Device/CDC_StandaloneThe documentation has some noteable gaps, some of which would be obvious if the CubeMX project file were available.The example is a "USB to UART bridge" application, which is not really how most use would use the STM32F072 as a USB CDC end point. Certainly I want to parse the incoming characters to make my system do something. The example just plumbs bytes to a UART, and the way the code is structured there's no visibility of execution flow. What I've discovered is:1. The 'UART' plumbed to the USB VCP is USART2, based on the fact that it's the only one enabled.2. USART2 RXD and TXD aren't routed to any pins, PD6 and PD5 don't count as they don't exist on 64 pin package.
The value returned from USBD_HID_SendReport always returns USBD_FAIL,What settings are wrong? We think we am doing the settings in project.ioc correctly.[IDE]STM32CubeIDE 1.14.0Connectivity -> USB_OTG_FS -> [Mode]Device_OnlyMiddleware -> USB_DEVICE -> [Class For FS IP]HID[board] NUCLEO-F446RE
Hi,I am using STM32H5 microcontroller with Free-RTOS environment.Interfaced SD card with the MCU using LittleFS file system.My SD card has Compressed files, I wanted to decompress them and write to the separate folder. Is there any libraries supported to carryout this procedure in Free-RTOS environment?Provide if there is any example code
Dear SIR,I am trying to STM32G0B1 USART3 DMA receiving data from PC and do processing on MCU.I add code in callback function HAL_UARTEx_RxEventCallback()these code are try to get the whole package ending with '\r' and set a flag to notice the FreeRTOS get the whole package and do process in FreeRTOS.After running some times, No more flag set in the callback. In my test, 1st send "test", 2nd send "this is a test of stm32", 2nd callback is not triggerred.Is there any wrong? Or what is the right procedure to get the whole package in DMA callback and set flag to FreeRTOS Application layer to do future process?Thanks. #include "stm32g0xx_hal.h" #include "FreeRTOS.h" #include "task.h" #include "stm32g0xx_hal_uart_ex.h" #include "stm32g0xx_hal_dma.h" #define RX_BUFFER_SIZE 128 extern UART_HandleTypeDef huart3; extern DMA_HandleTypeDef hdma_usart3_rx; uint8_t rx_buffer[RX_BUFFER_SIZE]; uint8_t cmd_terminated = 0; volatile uint8_t rx_size = 0; void HAL_UARTEx_RxEventCallbac
I'm using an STM32L475RC with USB host and using FAT FS to read a memory stick. This worked fine in previous hardware build, but since new hardware and update of CubeMX (now at MCU pkg 1.17.2) and updated USB host, an odd bug has appeared. When I run the init, the first attempt always fails. Init is only ever run when a USB stick is detected in the socket, to save power. There is a fair bit of other code involved, but this is the basics: /* Init host Library, add supported class and start the library. */MX_USB_HOST_Init(); PRINTDBG("Host stack init, waiting for USB stick",PRINT_NOTIME);gTimeTick = 0;while ((USBH_MSC_IsReady(&hUsbHostFS) == 0) && (gTimeTick < USB_STICK_TIMEOUT)){ /* USB Host Background task */ USBH_Process(&hUsbHostFS);}//Not shown - do USB stuff if no timeout//ShutdownPRINTDBG("Shutting down USB stack",PRINT_TIMESTAMP);//stop the USBUSBH_Stop(&hUsbHostFS);/* De-Init */USBH_DeInit(&hUsbHostFS);&n
Hello,I trying to follow the steps provided in this video : https://www.youtube.com/watch?v=Z_Sn6CBbz-kFollowed each step, compiled, and successfully uploaded the firmware.I am able to see the COM port COM34 in my device manager as shown in attached image. I am unable to see COMport in cube monitor UCPD software, I tried refresh option multiple times. However its visible in select tracer port.When I select tracer port, nothing is visible.Pin configuration is as per document : https://www.st.com/resource/en/application_note/dm00663511-how-to-build-a-simple-usb-pd-sink-application-with-stm32cubemx-stmicroelectronics.pdf(image attached)
Hi everyone.I'm using STM32H7B3I-DK.I want to save configuration to microSD or load configuration from microSD via user action on UI.In this regard, the ToughGFX UI side has been checked, but the microSD side is not working.Please check my configuration and action, let me know what is need to work.I configured SDMMC1, FATFS on STM32CubeIDE as follow.for SDMMC1bclock for SDMMCfor FATFS Initialize code in Main() function After starting FreeRTOS scheduler, only one task of FreeRTOS call this function.Always i meet the error on f_open() function. The error code on f_open() is 1 or 13.Please let me know what have to do.Do I need to set up MDMA for SDMMC1 ? Steve.cha
Hello everyoneI want to use dwt unit to create microsecand delay function. How safe is it to use the DWT unit ? Does it only work in debug mode or does it also work in runtime ?Is there a guarentee that every time the MCU is reset it will start up properly every time ?Can i use it in place wehere critical processing in required ?
Hello!,I got a custom PCB with a STM32F76 MCU with a PHY chip.Running Freetos CMSIS V1, and LwIP. I want to setup the MCU as a PTP slave/client. Is there a way to configure this in the .ioc file?Looking through the drivers enabled HAL_ETH_USE_PTP in stm32f7xx_hal_conf.h Also added the following to HAL_ETH_Init() :ETH_PTP_ConfigTypeDef *ptpconfig ;HAL_ETH_PTP_GetConfig(heth,ptpconfig );// Get PTP actual configuration into ETH_PTP_ConfigTypeDefHAL_ETH_PTP_SetConfig(heth,ptpconfig); What is the proper way to enable PTP support in the .ioc file ? Do I need to know the IP of the PTP master? Thanks,Steve
Hi allI'm want to send a string from one stm32 to another stm32 to blink an led on it I'm using uart polling method to do that.The communication happens and led blinks only if I press the Reset button once I switch off and on power supply. What should be done if I want continuous communication.
Hello. I want to use raw ethernet with HAL API. Is there any example for it ? I dont want to use LWIP, just raw ethernet frames and communicate between 2 board. Any example for guide could help me alot
I understand, why STM goes meanwhile with AZURE RTOS: it has several nice features. e.g. FileX, LevelX, several network and USB stacks (where STM needs effort to provide as well). But I do not understand why this AZURE RTOS should be a "Real-Time OS" for ARM based platforms? I see so many violations on ARM based coding rules, esp. this: ARM based systems use up to four registers directly, for the function call parameters if you use more as four parameters on a function call: a stack located parameter is needed (and shuffling registers inside the called functions) - suggestion is to put more as four into a struct and use "call by reference" using stack based call parameters: it consumes space from stack (memory size!) - and it can be slower compared to the use of MCU registers (stack is on slower memory) it makes it tough to predict how many stack size do you need I see so many function calls with more as four parameters, e.g. in FileX: UINT fx_directory_first_full_e
I have a bare metal board with an STM32H723ZGT6.I can connect and program the device.Initially I tried to use the HAL_Delay function but I found it hung the program never returning.This I determined by illuminating an LED on each side of the function, the first lights the second stays off.I then switched the HAL_Delay function for a delay in code so I can create the blinky LED in a coded delay.I then tried to implement a separate simple timer and that does not seem to function either trying to toggle an LED in the handler - no joy.I have ensured interrupts are enabled using __enable_irq and I also changed the timerbase priority from 15 to 0 in the NVIC setting.I am puzzled as to why interrupts do not seem to be occuring.Open to any suggestions on this as I really need a simple timer I can use.
Hello newbie here.What happens if we write the following code respectively in non-blocking mode, How does it change? thank you
Hey,I use STM32H745, I created ETH communication on the M4 core and it works well.Now I want ETH communication with two ports, one port per core.It is possible?In each core before the main while, I do:MX_LWIP_Init();/* create new tcp pcb */tcpb = tcp_new();err_t err;if (tpcb != NULL){//err_t err;/* bind echo_pcb to IP and PORT (ECHO protocol) */err = tcp_bind(tpcb, &ipaddr, SysIP.PORT);if (err == ERR_OK){/* start tcp listening for echo_pcb */tcpb = tcp_listen(tcpb);/* initialize LwIP tcp_accept callback function */tcp_accept(tpcb, PC_tcp_accept);}else{/* deallocate the pcb */memp_free(0, tpcb);}}And inside the main while, I execute MX_LWIP_Process();For M4 core: SysIP.PORT == 4949.For M7 core: SysIP.PORT == 4950.IP ADDRESS, NETMASK ADDRESS and GATEWAY ADDRESS are the same for both cores.I have no ping at all when I try to create this way.What am I doing wrong? What should I do differently? Need to change something in CubeMX? Thanks for the helpers!
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.