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
Hello everyone,I am currently trying to create a CMake based C-project for the ST Evaluation board STM32H757I-EVAL, that allows me to render a UI on the MIPI DSI connected display, that comes with it.Due to other work related requirements, I don't want to use TouchGFX, but will later try to add the LVGL framework to create our UI.However, at time of writing I have been unable to configure my project in such a way, that I can manually fill a Framebuffer and have that have any effect on the display. I have created a github repo with a "minimal" example of the configuration efforts so far.A "short" overview:I tried to create said CMake project through the STM32CubeMX code generator, and after a lot of trial, error and misunderstanding what is and isn't generated, I added the ST libraries for the external SDRAM "IS42S32800J" as well as the display driver IC "OTM8009A" and tried to configure the clocks and configurations of the following components:GPIO of the attached display pinsFMC to en
Hi, I’m working on a custom board based on STM32H757BITx using an external NOR flash Micron MT25TL01GBBB8ESF-0AAT TR (Dual bank with Quad Lines)Current usageAt the moment, the external flash is mainly used to store UI assets (images/fonts/etc.) for a display. I’m not using the full flash capacity, so I’d like to use an unused region to store a small persistent structure (configuration/status/log header).To keep things organized, I created a partitioning scheme using the linker file, reserving separate address ranges:UI assets region (read-only at runtime)User structure region (needs occasional write/erase/program)How it’s configured right nowSince up to now I only needed runtime reads, the flash is configured in Memory-Mapped Mode (DTR, QPI). I enable it with:MT25TL01G_EnableMemoryMappedModeDTR(&hqspi, MT25TL01G_QPI_MODE);This works great for reading UI assets through the mapped address space. ProblemI now need to write into the user structure region, but I unde
I'm trying to compile a basic blinky application for the N6 and failing. I open the latest CubeIDE, import the GPIO_Toggle project (or any other one for that matter) and try to build. I get an error about no rule to make target. Please provide guidance on how to build the basic examples 13:47:52 **** Build of configuration Debug for project GPIO_InfiniteLedToggling_Init_FSBL **** make -j11 all make: *** No rule to make target '/Users/workspace/STM32CubeN6-git/Drivers/STM32N6xx_HAL_Driver/Src/stm32n6xx_ll_exti.c', needed by 'Drivers/STM32N6xx_HAL_Driver/stm32n6xx_ll_exti.o'. Stop. "make -j11 all" terminated with exit code 2. Build might be incomplete. 13:47:52 Build Failed. 1 errors, 0 warnings. (took 83ms)
HelloCurrently I am working with NUCLEO-N657X0-Q by using STM32CubeIDE_2.1.1 STM32Cube_FW_N6_V1.3.0MxCube v6.17.0Trying to investigate and migrate CDC ACM feature in to the my own project. As basis I am using Ux_Device_CDC_ACM Example provided by ST as reference.It was discovered that Ux_Device_CDC_ACM example would not work properly after MxCube project regeneration -- it goes to the HardFault_Handler() at some point (not defined currently at which point)The investigation showed that the issue is connected with the Optimization level (MxCube updated STM32CubeIDE project files) just only for the one single source file: "stm32n6xx_hal_rcc_ex.c". If optimization level is set to "-O0" for the mentioned file -- HardFault_Handler() is observed. By changing it to the "-O3" -- the application works successfully.Could you please explain this "hidden" dependency, and what is the reason of this?
Hello everyone,I am developing a firmware for an **STM32U5** microcontroller using Azure RTOS (ThreadX / USBX). I am implementing a USB Composite Device with two classes: **CDC** (Virtual COM Port) and **MSC** (Mass Storage Class). The MSC is interfaced with an eMMC using an 8-bit bus for data communication.I am facing a persistent issue that I cannot seem to resolve: the device drops the USB connection after about 5 to 10 minutes of operation. By debugging the code, I noticed that the disconnection is triggered because the device eventually calls the HAL_PCD_DisconnectCallback() function.My main concern (and source of confusion) is that this behavior is highly OS-dependent. For instance, on my dual-boot PC, the device works flawlessly without a single disconnection on **Ubuntu 22.04**, but it consistently crashes/disconnects on **Windows**.### What I see on Windows (Event Viewer)Right before the disconnection occurs, Windows throws several SCSI timeout errors in the Event Viewer. Spec
Hello everyone, I am trying to bring up a NetX Duo TCP Server on the STM32H755ZIQ Nucleo board using Azure RTOS ThreadX + NetX Duo, but I keep running into issues during initialization and runtime. Unfortunately, I haven't been able to find any fully working examples for dual-core H7 devices using NetX Duo. Most examples online are either for single-core MCUs or for different boards. Here is what I am trying to achieve: STM32H755 Nucleo board M7 core running ThreadX + NetX Duo Basic TCP server (listening on a port, accepting connections, sending/receiving data) Using STM32CubeMX for configuration LwIP is NOT used — only NetX Duo Ethernet driver: nx_stm32_eth_driver (CubeMX generated). It seems like the current CubeMX-generated NetX Duo code for the STM32H745/H755 series might be incomplete or not fully compatible. My questions: Has anyone successfully created a NetX Duo TCP Server project on the STM32H745/H755 Nucleo boards? Is there an official working example
Hello,I am working on an STM32F7 project where I need to sample multiple ADC peripherals using DMA triggered by a timer. Problem: No ADC data is being written to ADC_BUF or ADC3_BUF even though main loop runs (buffers ADC_BUF and ADC3_BUF remains zero while counter increases) Current Setup:ADC1: 1 Channel, DMA2 Stream 0, triggered by TIM2 TRGO UPDATE ADC3: 2 Channels, DMA2 Stream 1, triggered by TIM2 CC2 DMA: Circular mode, DMAContinuousRequests enabled TIM2: 10 Hz update event Mode: ContinuousConvMode is Disabled, ScanConvMode is Enabled What do I need to change to fix this? /* USER CODE BEGIN PV */ volatile uint16_t ADC_BUF[ADC_BUF_LEN]; volatile uint16_t ADC3_BUF[ADC_BUF_LEN]; uint16_t counter = 0; /* USER CODE BEGIN PV */ /* USER CODE BEGIN 2 */ HAL_CAN_Start(&hcan1); HAL_ADC_Start_DMA(&hadc1, (uint32_t*)ADC_BUF, ADC_BUF_LEN); HAL_ADC_Start_DMA(&hadc3, (uint32_t*)ADC3_BUF, ADC_BUF_LEN); HAL_TIM_Base_Start(&htim2); /* USER CODE END 2 */ /* USER CODE BEGIN
Hello,I am working with the STM32H7B3I-EVAL boardI have I2C slave model work properly the default adress used by contoller given in schematich work on 84 aand 85 adress but the other peripheral adress not get give me the roadmap for the coding of communication protocolsI2C Slave Address detect. how can i code done for other peripherals using mfx expander give me solution didnt solve the issue.Thank you
New question split from this post. OK THANK YOU @mƎALLEm , CAN U SHARE THE RMII CONFIGURATION FOR STM32H745BIT6?
I've developed on an STM32U5A9J-DK using ThreadX, which, via USBX, creates a loopback audio interface between the PC and the device in the way: PC->speaker on device->microphone on device->PC.The devices are correctly seen and are working, as I'm able to enumerate them on the host and the device correctly receives audio frame,s and I'm able to process them into the device.Now, the issue is that I'm unable to send the audio packets back to the host.My implementation is pretty simple: I'm using the USBD_AUDIO_PlaybackStreamFrameDone function to read the audio frames and send them back to the microphone interface withVOID USBD_AUDIO_PlaybackStreamFrameDone(UX_DEVICE_CLASS_AUDIO_STREAM *audio_play_stream, ULONG length) { UCHAR *read_buffer; ULONG read_length; UCHAR *write_buffer; ULONG write_length; AUDIO_FRAME_MSG frame_msg; AUDIO_FRAME_BUFFER *frame_buf; /* -------------------------------------------------------------------------- */ /* STEP 1: Get A
We are currently using LPTIM1 to measure the time period. As this operation needs to be performed frequently, we are using the following APIs: HAL_LPTIM_TimeOut_Stop_IT(&hlptim1) HAL_LPTIM_TimeOut_Start_IT(&hlptim1, 0xXXXX, 0xXXXX) During this process, the LPTIM_Disable() function temporarily disables all interrupts using PRIMASK while waiting for the LPTIM_FLAG_ARROK and LPTIM_FLAG_CMPOK flags. This global interrupt masking is causing data loss on LPUART1, which is operating at 115200 baud. As a result, we are encountering ORE (Overrun Error) due to missed UART interrupts. Given this behaviour, we would like your guidance on the following: Is it safe to modify the LPTIM_Disable() implementation by removing or commenting out the PRIMASK-based global interrupt disable? Alternatively, is there a recommended approach to avoid this blocking behaviour while still ensuring correct LPTIM operation? We are concerned about maintaining real-t
Hello ST Community,I M USING STM32H745I-DISCO (MB1381-H745XI-B02), WHICH COME DEFAULT MII MODE, TO CONFIGURE IT ON RMII, WHAT CHANGES I HAVE TO DO IN HARDWARE, IOC. AS THIS BOARD HAVE ETHERNET IC LAN8742A-CZ-TR WHICH HAVE BOTH MII,RMII PROTOCOLS.AS I HAVE SEEN SOME VIDEOS ON ETHERNET FOR DIFFERENT STM32 CONTROLLER IN RMII, I M NOT ABLE TO GET RESULT. I WANTED TO KNOW DO THIS BOARD CONFIGURE IN RMII, IF YES THEN TELL ME HOW I CAN DO. HERE IS CONFIGURATION I HAVE DONE IN MY PROJECT. PG11 ETH_TX_EN ARM Cortex-M7 n/a Alternate Function Push Pull No pull-up and no pull-down Very High n/a true PG14 ETH_TXD1 ARM Cortex-M7 n/a Alternate Function Push Pull No pull-up and no pull-down Very High n/a true PG13 ETH_TXD0 ARM Cortex-M7 n/a Alternate Function Push Pull No pull-up and no pull-down Very High n/a true PC5 ETH_RXD1 ARM Cortex-M7 n/a Alternate Function Push Pull No pull-up and no pull-down Very High n/a true PC4 ETH_RXD0 ARM Cortex-M7 n/a
NUCLEO-F767ZI I'm trying to use the LwIP middleware which I have enabled in MX. First I'm trying to check if an ethernet cable is attached or not. I have setup UART3 to use printf (which works as expected) I've set the callback in lwip.c to print when the cable is removed or plugged in or so I thought but I get no message when I connect or disconnect the cable. The LEDs on the socket light up when the cable is connected, so the board at some level does see the cable. What am I missing here? EDIT:: LWIP_NETIF_LINK_CALLBACK was enabled in MX // In main.c MX_LWIP_Init(); /* USER CODE BEGIN WHILE */ while (1) { MX_LWIP_Process(); /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ } /* USER CODE END 3 */ // In lwip.c the callback function that is registered in MX_LWIP_Init() static void ethernet_link_status_updated(struct netif *netif) { if (netif_is_up(netif)) { /* USER CODE BEGIN 5 */ printf("Cable connected\r\n"); /* USER CODE END 5 */ } else /* netif is down */ { /* USER C
Hello, I configured a timer in STM32CubeMX2 to use 2 channels (HAL_TIM_CHANNEL_1 and HAL_TIM_CHANNEL_3). After the mx_system_init() I use the following code: hal_tim_handle_t *htim5 = mx_tim5_gethandle(); if (HAL_TIM_OC_StartChannel(htim5, HAL_TIM_CHANNEL_1) != HAL_OK) { return (-1); } if (HAL_TIM_OC_StartChannel(htim5, HAL_TIM_CHANNEL_3) != HAL_OK) { return (-1); } if (HAL_TIM_Start(htim5) != HAL_OK) { return (-1); } The first channel starts as expected, but when I attempt to start the second channel the code causes an assert in HAL_TIM_OC_StartChannel: /* Check and update the channel state */ ASSERT_DBG_STATE(htim->channel_states[channel], HAL_TIM_OC_CHANNEL_STATE_IDLE); Do I need to do anything different? Regards, -Gil
Hi all.I wish disable auto PAD disable CRC append. Send packet use low_level_output(), before call HAL_ETH_Transmit_IT()I set TxConfig.ChecksumCtrl = ETH_CHECKSUM_DISABLE; TxConfig.CRCPadCtrl = ETH_CRC_PAD_DISABLE;but packet allways pad to 60byte,if use TxConfig.CRCPadCtrl = ETH_CRC_PAD_DISABLE;, no packet outputif use TxConfig.CRCPadCtrl = ETH_CRC_INSERT; output fine but have 4byte crcr append.How to do , NO-PAD NO-CRC send packet?
I'm trying to interface with a W25N NAND flash chip on an STM32H7, over QSPI. I've only got consistent output out of the reads, and even then, I notice the system hangs forever and can't accept anymore input after a read. Everything else will hang immediately, even a print statement to the terminal at the top of the function won't appear, and the whole system hangs. From some similar issues I found online, I thought it would be a timing issue, and so I tried to implement a status register check. That's my first function in my excerpt below. However, this function couldn't even run alone without again hanging the system (meaning something else is causing the resets, program, clear, and even status check to hang). What else could be the issue that stops everything from running? Any advice much appreciated. Thanks very much in advance.uint8_t W25N_status(void) { QSPI_CommandTypeDef cmd = {0}; uint8_t status; cmd.InstructionMode = QSPI_INSTRUCTION_1_LINE; cmd.AddressMod
Hello, is it possible to boot FSBL and load application from SD card upon powerup, bypassing onboard flash? I didn't see any clear guides on this procedure.Thank you
@FBL Can you explain me about buffer descriptor table (BDT)? Is it fixed?I have got behavior that I can't explain.Dumping packets on host I got wrong data. Length is ok, but data is wrong.In BDT I wrote correct address and length. Data wrote in pma (adress that is in BDT) is correct.But when I stop in debugging address in BDT is changed. As I think in BDT there is a place for each endpoint (or it is like cyclic buffer?)What I found if I set break point with "if" condition, just before sending address in BDT is OK, and data on host is OK. It seems to me that I am working incorrectly with BDT.
I am coding from the scratch to learn how STM32 works with MIPI-DSI LCD, because I am going to use customized MIPI-DSI LCD. I refer to the official code, but some incorrect content as below:official default code: in main.c , static void MX_LTDC_Init(void):// SETVCOMuint8_t InitParam60[4] = {00, 00, 00, 0xC0};if (HAL_DSI_LongWrite(&hdsi, 0, DSI_DCS_LONG_PKT_WRITE, 4, 0xC7, InitParam60) != HAL_OK){Error_Handler();}BUT, I check HX8379C datasheet (LCD control ), SETVCOM command is (B6h), and there is no 0xC7 command ?so what's this code for? and HX8379C datasheet dosen't mention initial sequence , how do we know that we need to set SETPOWER, SETDISP, Set display cycle timing,.....SET GAMMA,....,then Exit Sleep Mode to let LCD work? I don't use touchgfx now, just want to test if DSIHOST, LTDC work successfully, so I declare a framebuffer[480*480] then in MX_LTDC_Init(), write:pLayerCfg.FBStartAdress = (uint32_t)framebuffer;then using for loop
I am trying to capture data from the LINE_IN (blue jack on board), but I am not receiving the correct input. I evaluated my output at the oscilloscope and noticed that I am not receiving the sinusoid I am injecting; the frequency is correct, but the data appears clipped, as shown in the picture. I tried to reduce the Vpp, but it just started getting noisy instead of giving the correct input.My second test was to record on the sd card, and the problem persisted; I am only getting data above zero and noiseI am using the BSP library stm32h735g_discovery_audio.c, and to get the correct frequency that I was inputting, I modified these values in the BSP_AUDIO_IN_Initmx_config.FrameLength = 64;//changed: prev:128 mx_config.ActiveFrameLength = 32;//changed /An changed the number of slots like this:hsai->SlotInit.SlotNumber = 4; /* WM8994 TDM mode: 4 slots */I also tried to modify these registers from the audio codec directly, but nothing seems to make it work:* Disable mute on IN1L_TO_
Dear community members,STM32H7S78-DK: USBX standalone (CDC ACM + PIMA) works in HS now but PIMA / MTP is not supported in standalone mode in USBXCurrently, it is not possible to use the PIMA/MTP class in USBX in standalone mode (without an RTOS). The MTP implementation depends on Azure RTOS ThreadX, and there is no official support for running it in bare-metal configurations.When attempting to use it in standalone mode, the stack returns:#define UX_FUNCTION_NOT_SUPPORTED 0x54This is also reflected in the official documentation:USBX Getting Started – Bare-metal support matrices
Hello, I configured TIM5 to generate a signal out to a pin using STM32CubeMX2 for a Nucleo-C562RE board. I enabled the EXTI interrupt for the pin in the timer configuration to get EXTI6 interrupts on the falling edge. I also enabled the use of register callbacks for EXTI. The problem that I am having is that I cannot find the function to retrieve hEXTI6 to register the EXTI callback. I looked in the mx_tim5.h/c and in mx_gpio_default.h/c. I had no problem getting the EXTI handles for GPIO EXTI (for example mx_gpio_default_exti7_gethandle()) and getting TIM handles (mx_tim5_gethandle()). To make the code work I had to add mx_gpio_default_exti6_gethandle() prototype to mx_tim5.h and the implementation below to mx_tim5.c: hal_exti_handle_t *mx_gpio_default_exti6_gethandle(void) { return (&hEXTI6); } Maybe the definition/function is there but I cannot find it or maybe there is some additional configuration to be done in STM32CubeMX2. I attached my ioc2
Hey there,I'm currently trying to port a project that I was using successfully on the STM32U5A5, to the STM32N657.The project utilises the PDM2PCM library to convert a PDM audio stream received from a MEMS microphone via the SAI interface of the MCU into PCM audio data. It is based on an example from the STM32U3 MCU firmware package (STM32Cube/Repository/STM32Cube_FW_U3_V1.3.0/Projects/NUCLEO-U385RG-Q/Examples/SAI/SAI_AudioRecord_PDM), parts of which I have incorporated into my own application on the STM32U5A5.I'm now trying to port this project to the STM32N657 on a NUCLEO-N657X0-Q board. I've found the matching PDM2PCM library for the N6's M55 core in the X-CUBE-AUDIO-KIT as mentioned here.Now, when I integrate this library (libPDMFilter_CM55_GCC_wc32.a) into my project and start the debugger of the STM32CubeIDE it starts printing "Target is not responding, retrying..." in the debugging console as soon as the program flow reaches the call to the PDM2PCM_init function of the libr
Hi ST Community, I'm facing a critical and reproducible hardware JPEG encoding issue on the STM32N6. The JPEG encoder only works correctly when the image width is exactly 800 pixels. Any other width I've tested — including 480, 960, and 960x480 — causes the hardware to fail in exactly the same way. Height variations do not affect the outcome; the problem is solely tied to the row width. Environment: MCU: STM32N657xx (STM32N6-DK board) Firmware Package: STM32Cube FW_N6 V1.3.0 IDE: STM32CubeIDE Image Format: RGB565 input → YCbCr 4:2:0 subsampling, Quality 75. Issue Summary:When the image width is 800, JPEG encoding completes successfully and produces a valid compressed JPEG stream. When the width is 480, 960, or any other tested value ≠ 800, the hardware encoder aborts input processing early (after ~14 input chunks for 960 width) and subsequently dumps a massive amount of uncompressed raw data into the output buffer. The output DMA fills
I had some issues configuring H573 with CubeMX.When I configure TIM2 or TIM3 according to the instructions of RMII_PTP_Synchro in CubeMX I cannot enable the RMII PTP functionality.And when looking at RM0481 it seems that the description of the relationship between these two timers and ETH MAC is a bit vague.What configuration is required to enable RMII_PTP_Synchro on H573?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.