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 Team,I am working on the Class B (V2.3.0)library for the STM32H7 series. It works fine without the notifier, but when I use the notifier, the stack section gets flushed, and the runtime stack test fails.Please help me with this issue. Thank you in advance.Regards,Prakash R
Hello,I’m currently working on an application using the STM32G031xx MCU and need to ensure IEC 60730 Class B compliance for safety-critical software. I found the X-CUBE-CLASSB-G0 (v4.0.0) library and have a few questions:Is X-CUBE-CLASSB-G0 v4.0.0 the correct library to use for Class B compliance with the STM32G031xx series?Does the library already include all the required safety routines (e.g., CPU register tests, RAM tests, clock tests, stack/PC tests), or do I still need to implement additional safety code manually, such as the March-C test for RAM?Are the provided function prototypes in the library sufficient to meet compliance if I integrate and call them as recommended in the documentation, or should I modify or extend them to achieve full Class B certification?For example, the function is declared asSTL_Status_t STL_SCH_InitRam(STL_TmStatus_t *pSingleTmStatus);but there is no visible definition. Do we need to implement this function ourselves, or is the definition (including the
I want to send and receive data using the USBX library with the STM32U073 as a COM port. Can I use bare metal (without RTOS)?
Hi everyone,I'm currently working with the DMA concept on an STM32H7. I'm reading data from an FIFO via SPI. My goal is to trigger the SPI DMA transfer using TIM12 TRGO, but I’m not sure where to start or how to properly configure this connection.I’m relatively new to this topic, so any guidance, examples, or tips on how to set up the timer trigger and link it to the SPI DMA would be greatly appreciated.Thanks in advance for your help!
Spend full week trying to get NOTIFY response during mxwifi_init() Hope that accurately reproduced main steps of demo for Wi-Fi Web Server for the U585 board that is by miracle working Accurately Removed all code related to Web ServerFailed to implement LPTIM1 properly so dropped it Long story short - stuck in the middle in webserver_wifi_connect(void) line 92 >> Netif = NetInterfaceOn(mx_wifi_driver, hnet_notify);app_entry()-> wf_wifi_init() completed->wf_wifi_connect a start CS=1 and reset, notify, cs =0 Netif = NetInterfaceOn(mx_wifi_driver, hnet_notify); MX_WIFI_STATUS_T MX_WIFI_Init(MX_WIFIObject_t *Obj) // printf("MX_WIFI_INIT_START OK\r\n"); /* 1. Initialize the WiFi low level IO (UART/SPI). */ (void)(Obj->fops.IO_Init(MX_WIFI_INIT)); { printf("MX_WIFI_io_INIT_started OK\r\n"); if (MIPC_CODE_SUCC
Hi everyone, I’m currently working with an STM32H747 and trying to perform SD card write operations using core M4. The SMMC1 peripheral is connected to the D1 domain, which (as far as I understand) means that the M4 core (D2 domain) doesn’t have direct access to it. When I try to write to the SD card from M4 (using MDMA), it always fails — f_mkfs returns an error. However, when I run exactly the same code on core M7, everything works perfectly fine. So my questions are: Does it make sense that the M4 cannot access SMMC1 because of the D1 domain connection? Is there any way to make SD write operations work from the M4 core (for example, through shared memory, DMA Settings, or another workaround)? Thanks in advance.
I am implementing custom CAN bootloaders for H725, G491, and H563. I would like to use the same bootloader across all MCUs.Are the flash interfaces across these MCUs close enough that a common bootloader is feasible? [I haven't compared the reference manuals yet]If there are differences, does HAL hide them?
I have setup a Nucleo-F103RB as a USB composite device by (CDC + HID) by modifying a STM32CubeMX CDC project. The device enumerates correctly and everything works initially, however I am encountering a strange bug where if I open a COM port to read the CDC data and then close it, the HID portion stops responding until I open the COM port again. Also worth mentioning I am using FreeRTOS with separate tasks for sending HID report and CDC data.Does anybody know where to look to fix this bug?Thanks in advance.
Hello,I am trying to get the USB HID working on STM32U073 with ZephyrOS.I took the sample code from https://github.com/zephyrproject-rtos/zephyr/tree/v4.2.0/samples/subsys/usb/hid-mouseAnd tried both the NEXT and legacy USB stack. However, when I boot, I always get the USB Not recognised popup along with the following logs: 00> [00:00:00.003,000] <dbg> usb_device: usb_enable: lock usb_enable_lock mutex 00> [00:00:00.011,000] <dbg> usb_descriptor: usb_get_device_descriptor: __usb_descriptor_start 0x20000594 00> [00:00:00.021,000] <dbg> usb_descriptor: usb_get_device_descriptor: __usb_descriptor_end 0x2000062e 00> [00:00:00.031,000] <dbg> usb_descriptor: usb_fix_descriptor: Device descriptor 0x20000594 00> [00:00:00.040,000] <dbg> usb_dc_stm32: usb_dc_ep_check_cap: ep 0, mps 64, type 0 00> [00:00:00.049,000] <dbg> usb_descriptor: usb_desc_update_mps0: Set bMaxPacketSize0 64 00> [00:00:00.057,000] <dbg> usb_desc
Device: STM32F411RE NUCLEOHello, I am having some issues with STM USBD AUDIO library. For some reason I cannot get it to stream audio data to a host device in a proper way.The device is successfully recognized as 2 channel 16 bit microphone by my PC.When I press the record button in windows recorder or audacity nothing happens.So far all I know is the USBD_AUDIO_DataIn is not getting called and from what I have read so far this is the function where I am supposed to be handling the sending data to host.I have been trying to get this working for weeks and I have had it working in the past with the following conditions: I put the LL_Transmit function in the USBD_AUDIO_SOF function. This worked as the audio data is supposed to get polled every 1ms anyway. Then I had the problem that every other packet sent was empty, so I added the LL_Transmit function back into DataIn stage and now my sine wave was being sent perfectly. Which is really weird if you think about it. I cannot imagine that t
Hello, I am working to implement LwIP onto my MCU (STM32H750VBT6TR) with the PHY (DP83825IRMQR). I got everything set up and was able to do a ping test and create a basic UDP client to send and receive packets (see this thread). This works well on my bare project with just these elements. The issue is that the amount of flash memory taken up by just adding the LwIP peripheral is absurd (it is a combined 110.8 kB out of 128 kB). This leaves little space for the rest of the code this needs to interface with. Looking at tutorials for LwIP implementations show that only around 77 kB is typically used. I am wondering if anyone can help me track down why so much flash memory is being used in my implementation and if it can be minimized? Project files are attached. Thanks in advance.
Hello,I am trying to set up FileX with USBX, but my computer recognizes a disk drive but does not see any volume.Can you help me determine whether I am using the fx_media_format and fx_media_open functions correctly, given that they do not return any errors? UINT ret = FX_SUCCESS; /* USER CODE BEGIN MX_FileX_Init */ UINT RETT = lx_stm32_nor_custom_driver_initialize(&nor_flash); /* USER CODE END MX_FileX_Init */ /* Initialize FileX. */ fx_system_initialize(); /* USER CODE BEGIN MX_FileX_Init 1*/ /* Format the NOR flash as FAT */ status = fx_media_format(&nor_flash_disk, fx_stm32_levelx_nor_driver, // Driver entry (VOID*)&nor_flash, // Device info pointer (VOID*)NOR_CUSTOM_DRIVER_ID (UCHAR*)media_memory, // Media buffer pointer sizeof(media_memory), // Media buffer size "NOR_FLASH_DISK", // Volume Name 1, // Number of FATs 32, // Directory Entries 0, // Hidden sectors TOTAL_SECTOR_LOGICAL, // Total sectors SECTOR_SIZE
I’m working on a project that involves reading audio samples from ADF1 and storing them in an internal RAM buffer using the GPDMA. The GPDMA is configured using Linked Lists in circular mode. An interrupt is generated when the buffer is half-full and full. The STM32 should remain in STOP1 mode while the buffer is filled, and wake up when either of the two interrupts occur.Note that FatFs is also used to write the buffered data to an SD card through the SDMMC interface.I have this all working perfectly on my custom STM32U575 pcb, but only when I put the STM32 into sleep mode. It does not work in STOPMODE1. The interrupts never occur and the device never wakes from STOPMODE1. What am I missing? How can I make this work? I’ve looked for existing example code using GPDMA and STOP1, but have come up empty. See below for CUBEMX configuration and code:Most of my code is in the main() function:int main(void) { FRESULT ReturnResult; FIL MyFile; int numberOfWrites = 16; HAL_Init();
Hello, I would like to know if this PTP client example from Netxduo can be used on an STM32H723 MCU: https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/netx-duo/netx-duo-ptp-client/chapter1.md Another MCU, the STM32N6 has this implementation here: https://github.com/STMicroelectronics/STM32CubeN6/tree/main/Projects/NUCLEO-N657X0-Q/Applications/NetXDuo/Nx_PTP_Client I wanted to confirm if the STM32H723 does support that example because i am looking at https://github.com/STMicroelectronics/x-cube-azrtos-h7/tree/main/Projects and I cannot find any ... Thank you.
I am developing a product which has an STM32H743 device. I am designing the firmware for the first PCBA prototype. The product receives 30fps video signal from an 720i analog video decoder through DCMI (every second bytes are stored, all lines, so 360x240 resolution frames are captured) to external SDRAM. The stm32 does an image conversion and sending the converted data from internal RAM to a second processing unit through parallel bus. The second processing unit displays the data. The parallel bus is a 16bit interface, with 10MHz clock (20Mbyte data rate with ~44% duty cycle – 44% reading, 56% idle). And in the during operation, the device captures two channel audio signals as well.The ideal operation flow is the following:DCMI interface uses DMA1 Stream0 (very high priority, fifo), dma in double buffer mode. DMA moves data from DCMI to FMC external SDRAM. It generates two interrupt signal, half transfer complete and full transfer complete. When full transfer completed the transfer is
Hi everyone,I'm working on an STM32 project using STM32CubeIDE. I'm using the built-in debugger with ST-LINK and UART (via HTerm) to monitor communication between the STM32 and a host PC.Here's something odd I noticed:When I click the "Debug" button in STM32CubeIDE (but before I press "Resume"), I already see some UART output in HTerm, like:AA 00 40 02 00 00 4D 55AA 00 50 02 00 00 2A 55Then, when I press "Resume", the same two messages are sent again. So in total I see them twice.This seems strange because I wouldn't expect the UART to be transmitting anything before the code is running (i.e., before Resume is hit). But clearly, something is happening during the debugger halt or initialization phase.Is this normal?Is it common for STM32CubeIDE to somehow "pre-run" some initialization code before Resume?Could it be something about HAL_UART_Transmit being called from main() before HAL_Init() fully returns?Or maybe the ST-LINK somehow triggers this?The program runs fine otherwise, b
Post edited by ST moderator to be inline with the community rules especially with the code sharing. In next time please use </> button to paste your code. Please read this post: How to insert source code Hello there, i have some connection/re-connection problems with my opcua server, when i unplug the LAN cable.Because of prevent memory problems i disable the most Options for the opcua Server. Perhaps in the Future i will try more options out.But at first the Connection should be stable and when I unplug the LAN cable a re-connection should be possible again.Perhaps you can help me here. Hardware:- STM32F407- DP83826 (TI)- etc. Firmware:- open62541 v1.3.6 (amalgamation)- LwIP v2.2.0- FreeRTOS v10.5.1- etc. Perhaps interesting Settings:- Memory Management: Heap5 - lwipopts.h: #define MEMP_NUM_NETBUF 4 #define MEMP_NUM_NETCONN 8 #define LWIP_COMPAT_MUTEX 1 #define LWIP_COMPAT_MUTEX_ALLOWED 1 #define LWIP_TCP_KEEPALIVE 1 /* STM32CubeMX Specific Parameters (not defined in opt.h) -
I am working on an STM32 H7 but I assume this applies to other series as well. I wrote an application function to set a timer period based on a uint32_t value which basically contains the following snippet: htim->Init.Prescaler = timerClockFreqInMHz - 1;htim->Init.Period = periodUs;if (HAL_OK != HAL_TIM_Base_Init(htim)){ Error_Handler();}Now this worked as expected for some timers but failed specifically when using timer TIM4. I took some time to debug but I realized only via cubeMX (and later on checked in the manual) that some timers do not have a 32bit ARR register but only 16bit and indeed my "non working behaviour" came from an overflow on the 16bit TIM4. Now going deeper in the HAL, it appears that HAL_StatusTypeDef HAL_TIM_Base_Init(TIM_HandleTypeDef *htim)calls void TIM_Base_SetConfig(TIM_TypeDef *TIMx, const TIM_Base_InitTypeDef *Structure)and here ARR is set /* Set the Autoreload value */TIMx->ARR = (uint32_t)Structure->Period;&n
Hi, was wondering if someone can point me in the right direction on an issue I've been battling with regarding USB device enumeration. I'm using Cube FW_H5_V1.4.0 > Projects > NUCLEO-H563ZI > Applications > USBX > UX_Device_HID_CDC_ACM for STM32Cube IDE as the starting point. Closest example I could find but have had to make significant changes as I'm trying to create a bare metal version, don't want HID and of course am using a different micro on the STM32H573I-DK board. I've got the code running and get the "USB device not recognised" popup on Windows when I connect the board. I'm hitting a breakpoint in the HAL_PCDResetCallback function but HAL_PCD_SetupStageCallback() never runs to start the first SETUP packet. I can see that bits 10 and 11 are set in the ISTR register so it seems SETUP transaction was received and endpoint 0 RX is complete. I'm having a hard time working out exactly why, suspect endpoint 0 is not configured correctly but how to confirm and fix? Any
Board: STM32U5x9J-DK (Discovery) MCU: STM32U5xx (U5G9J series) STM32Cube package: STM32Cube_FW_U5_V1.8.0 Example path: STM32Cube\Repository\STM32Cube_FW_U5_V1.8.0\Projects\STM32U5x9J-DK\Examples\OSPI\OSPI_NOR_MemoryMapped File: main.c (write/read operations performed in switch(step), case 1) IDE / toolchain: (please mention your IDE, e.g., STM32CubeIDE v1.19.0) Running the example on the Discovery board: the write appears to run, memory-mapped mode is entered, but reading back returns garbage — the mismatch counter res always becomes 256 (I interpret that as every byte failed the compare). The write/read block is in case 1 of the main loop. case 1: if (CmdCplt != 0) { CmdCplt = 0; /* ... set up mem-mapped write/read ... */ /* Writing Sequence ----------------------------------------------- */ mem_addr = (uint8_t *)(OCTOSPI1_BASE + address); for (index = 0; index < BUFFERSIZE; index++) { *mem_addr = aTxBuffer[index]; mem_addr++; } HAL_Delay(MEMORY_PAGE_PROG_DELAY
Hello,I'm struggling with setting up a environment to develop Zephyr applications using VS Code. I've little to no knowledge about VS Code, Zephyr and the underlying build system. I only used STM32CubeIDE in the past.What I have so far is a dedicated computer running Ubuntu, VS Code, Zephyr & Zephyr IDE extension for VS Code. I'm able to build e.g. the blinky example and I also can download it. Attaching to a running target is not possible.The launch.json file has been automatically created by Zephyr IDE and should provide configurations for launching (flash the MCU + debug with breakpoint at main()) and attaching (connect to MCU without flashing, probably halting the MCU). Interestingly, there was no difference in the behaviour of those configurations. Both flashed and connected to the MCU. So, by digging deeper into that launch mechanism I realized that both configurations used 'launch' as the request type. I changed the type to 'attach' for the corresponding attach configuration
Hello everyone,I’m currently working on setting up UDP communication using NetX Duo with a static IP address, configured through STM32CubeMX (IOC) in nucleo n657x0-q.Please note that the UDP communication needs to be initialized and executed in the Application (APPLI) — not in the FSBL.I’ve gone through several related threads in the community, but I still haven’t managed to get the communication working properly.Could someone please provide a clear, step-by-step explanation or example of how to configure and initialize UDP communication (client or server) with a static IP in NetX Duo under APPLI?I would greatly appreciate details on:The correct IOC configuration (Ethernet, NetX Duo, IP, UDP, MPU etc.)The proper initialization sequence in APPLI (how and when to start the network and socket)Relevant NetX Duo API functions (e.g., nx_udp_socket_create, nx_udp_socket_bind, nx_udp_socket_send, nx_udp_socket_receive)Common issues or pitfalls when moving UDP handling from FSBL to APPLIThank y
Hello superhero MCU enthusiasts,I'm playing with the STM32N6570-DK and have created a simple project with an FSBL that initializes the MCU and boots the Appl. Once booted, the Appl flashes a "Hello World" LED.Both can be loaded to external flash using the STM32CubeProgrammer.Now, I'm trying to map external PSRAM (XSPI1 -> 0x90000000) inside the FSBL, but it fails.To do that, I change a line in a file in the FSBL, stm32_extmem_conf.h, line 35 of (PSRAM disabled):#define EXTMEM_DRIVER_PSRAM 0Now I try to enable and map the external PSRAM by setting the definition to 1:#define EXTMEM_DRIVER_PSRAM 1However, it doesn't succeed.When debugging I see we land into a HardFault.The FSBL generates a HardFault when executing SAL_XSPI_EnableMapMode, because the function HAL_XSPI_MemoryMapped fails.I can't find the cause.Anyone?I posted a project here with a short Readme.md:https://github.com/AngryCarrot61/STM32N6570-DK_004Note: to see FSBL and Appl working one has to set EXTMEM_DRIVER_PSRAM
Hi,I'm try to communicate between my windows pc and my STM32GOB1RE Nucleo 64 board, with the CDC Class.To validate my hardware ( PA11 PA12 and gnd connected to usb pc), i did few dfu flahsing operation with CubeProg without issue. Windows detect properly my device in DFU mode, i can do the programmation and new firmware runs well. -> Hardware looks fine. I have generated the code with CubeMX and i'm using the HSI to 60mhz. Just this simple code with USB_DRD_FS Usb clock derived from it at 48Mhz.I'm also using the SOF detection and CRS SYNC Source USB.I have added th Code line in usbd_cdc_if, but it is not really the problem.Windows generate Error of not Descriptor reading.Here is the log of the USB Device Viewer, a windows tool that bring information:[Port7] FailedEnumeration : Périphérique USB inconnu (échec de demande de descripteur de périphérique)[Port7] FailedEnumeration : Périphérique USB inconnu (échec de demande de descripteur de périphérique) Is Port User
Hello, I have been following a few different Ethernet tutorials for my MCU (STM32H750VBT6TR) I have on a dedicated PCB. Thus far, I have been unable to get a simple ping test working. For reference, I am mostly using this tutorial in combination with this one, but I am not using freeRTOS at this time. I simply want to get LwIP to set up correctly and ping the board so I can then adapt it to a UDP server. I know my memory locations for the rx/tx designators, and rx pool base, and the LwIP heap are in the right locations (assuming they are as the tutorial states), but my code fails when the LwIP.c file calls netif_add(), which makes me think the issue does not lie within the memory. Can anyone who is more experienced in simple LwIP implementations help me out here? I am not sure where to turn at this point, as it does not seem people on other posts are having the same issues. I will attach my project files, namely the IOC, so anyone can look to see if there are
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.