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
HiSo, I want to load images at runtime from the flash memory, I have just started testing this and I found the official post on how to load BMP files at runtime, I copy pasted the BMPFileLoader.hpp and .cpp files, and called them like this:It's like that because i have 21 elements and for now I just wanna change the 2nd one for testing. The problem is i execute it with no errors, but when i execute it i get an empty image like this:The text and the 3 images are because the image is inside a container with those elements tooThe image i load is the default poly.png image from touchgfx assets, but i turned it to bmp. Just in case I also tried converting it to jpg, as for some reason in the example of the official post it appears to be calling a file named image.jpg instead of bmp but it did'nt work either, any ideas on what I am messing up?
Greetings,STM32CubeIDE newbie user here! I have the above eval board, and would like to jumper SPI-A (master) to another (different) eval board (slave),and run full duplex SPI transfers.I have played with the Example (SPI_FullDuplex_CommIT_Master), and having trouble making it work.I have so many questions but will start with a few of my most urgent. 1) In the manual for the NUCLEO eval board it says,SPI_A_SCK (PA5) is CN7 pin 10.The readme.md under the project saysCN6 pin 10I assume one of them is a typo? 2) All of the SPI example projects that I have perused, set the SPI_A interface as follows:hspi1.Init.NSS = SPI_NSS_SOFT;I assume this means that I have to use a GPIO for the SPI chip select?Why don't the examples ever use HARD_OUTPUT, is there an issue with using this mode? 3) Have tried many times to create my own projects, and failed, mostly due to me lack of experience with the CubeIDE.Can someone suggest the correct procedure (please list all the steps)
I'm using a STM32F746-disco and lwip to communicate with and another embedded system (a commercial standalone air monitoring system).When the two are connected via a switch the STM32 can Ping, get web pages via HTTP and get FTP files from the industrial system quite happily.When I remove the switch, Ping works, however with HTTP and FTP lwip’s netconn_connect() seems to connect but I can’t get any data to transfer, it just times out on the read/write.I tried cross over cables etc, and everything I can think of. Normally I'd have access to an optiview, but with lockdown I cant get hold it it!I can go into a lot more detail, lwip diagnostics etc, and share code etc, but if there is someone out there who can say if this should work or not, or what to look for it’d really help.ThanksMark
HiI see sleep/awake cmd is implemeneted in HAL fpr STM32H7only.Now I ported it myself to Stm32f446 myself successfully. However instead of while loop below, i inserted a HAL_Delay(1);H7 has a SDMMC but Stm32f446 has a SDIO.In the H/ HAL bit SDMMC_FLAG_BUSYD0END flag is checked to check when device is ready.SDMMC_FLAG_BUSYD0END is bit 20 in SDMMC status register (SDMMC_STAR)This bit how ever does not exist in SDIO status register (SDIO_STA).How can I implement this on Stm32f446 ?Its is about this while loop which i need to rewrite:Thx /* Wait that the device is ready by checking the D0 line */while ((!__HAL_MMC_GET_FLAG(hmmc, SDMMC_FLAG_BUSYD0END)) && (errorstate == HAL_MMC_ERROR_NONE)){if ((HAL_GetTick() - tickstart) >= timeout){errorstate = SDMMC_ERROR_TIMEOUT;}} /* Clear the flag corresponding to end D0 bus line */__HAL_MMC_CLEAR_FLAG(hmmc, SDMMC_FLAG_BUSYD0END);
Hello STM community,I'm working on optimizing SPI communication on an STM device, and I'm encountering an issue with the timing of SCLK pulses. After transmitting 16 SCLK pulses, there's a delay of 3μs before the next set of 16 pulses can be generated.I need to reduce this delay to ensure that SCLK can be immediately generated after CS goes low. Can anyone suggest methods or configurations to minimize this delay and maintain a continuous SCLK stream after CS is pulled low?I'm trying to achieve sampling rate for ADC ADS7046 interfacing.sclk take same time even not used CS.I want to sclk immediately on after cs low.Below I attach some snap of spi cycle.
I am working on a port of the STM32L5xx Open-Bootloader for the STM32L4xx MCUs so that I can disable some of the peripherals that I am not using. While working on the port, I had some questions about the memory regions defined in the openbootloader_config.h file. I am using the references manuals linked below to find the address and size of the memory regions (Figure 2. pg. 88 for the L5 and Figure 4. pg. 95 for the L4). The open bootloader library and reference project being used are also linked below. ICP (system memory): In the L4 MCUs, there are two separate system memory sections as opposed to 1 region for the L5 MCUs. In the port, will I need to define a separate region in the code for each different system memory or should I use one region over the other? OB (option bytes): Same question as the system memory. There are two regions for the option bytes for the L4 and I'm not sure which one is needed by the bootloader. OTP/ EB (Engi bytes): In the L5 example, the le
This Error occures when compling code 13:39:46 **** Incremental Build of configuration Debug for project 15_04_24_RTOS_TEST **** make -j4 all arm-none-eabi-gcc -o "15_04_24_RTOS_TEST.elf" @"objects.list" -mcpu=cortex-m4 -T"D:\STM32 RTOS\15_04_24_RTOS_TEST\STM32F411CEUX_FLASH.ld" --specs=nosys.specs -Wl,-Map="15_04_24_RTOS_TEST.map" -Wl,--gc-sections -static --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -u _printf_float -u _scanf_float -Wl,--start-group -lc -lm -Wl,--end-group C:/ST/STM32CubeIDE_1.14.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.100.202309141235/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: ./Core/Src/main.o: in function `vApplicationGetIdleTaskMemory': D:/STM32 RTOS/15_04_24_RTOS_TEST/Debug/../Core/Src/freertos.c:123: multiple definition of `vApplicationGetIdleTaskMemory'; ./Core/Src/freertos.o:D:/STM32 RTOS/15_04_24_RTOS_TEST/Debug/../Core/Src/freertos.c:123
Hi,How would one go about giving access to hardware handles in source files other than `main.c`? For instance, the ADC state is stored in a struct called `hadc3` in `main.c`, without an access modifier. I would assume that this is extern by default, but the linker doesn't pick it up when referencing from any other source file. Instead, I get something like:For reference I am trying to initialize and control a peripheral from a ThreadX thread. Something like:VOID tbw_thread_entry(ULONG initial_input) {HAL_ADC_Start(&hadc3);while (1) { HAL_ADC_PollForConversion(&hadc3, 20); int adc_value = HAL_ADC_GetValue(&hadc3); HAL_UART_Transmit(&huart2, (uint8_t*)msg, strlen(msg), HAL_MAX_DELAY); sprintf(msg, "Light: %hu \r\n", adc_read); HAL_GPIO_TogglePin(GPIOE, 0x0002); tx_thread_sleep(20); }If there is a better way to show code please let me know. As an additional question, in trying to access `HAL_MAX_DELAY` by including `stm32h7xx_hal_def.h`, I get tons of compiler errors: 
I AM USING A ETHRNET ON STM32H734ZI BUT ETHERNET CONTINUE WORKING FOUR DAY ON MY DIVICE AFTER STOP MY DEVICE WORKING SO I CAN NOT FIND MY SOFISTICATED SOLUTION IN ETHERNET PLEASE GIVE MI SOLUTION
Hi - I'm using HAL_GetTick(), and then subtracting one value from another to determine a GPIO input pulse width.What happens if I happen to to call HAL_GetTick() around the point where the SysTick timer rolls over through zero.Do I need to watch out for this situation generally?Regards, John.
Hi,I have an UDP Server on a STM32H743ZI. It works very good only if the ethernet cable is already connected when I power on the board.However, if I connect the cable after powering on the board, UDP Server does not receive any message.FreeRTOS is used on my project and I have added LWIP_NETIF_LINK_CALLBACK 1 to lwipopts.h but I never go in callback function even if I connect/disconnect the ehernet cable.Where's the problem?what should I add to detect the cable connection?Thanks a lot!Kind regards.
Hello Community!Now a days i started Working on STM32H747 Discovery board. im trying to configure Ethertnet on Cortex-M7 core.i enabaled ETH in connectivity with RMII on M7 core. Selected FreeRTOS with CMSIS V2 and enabled the DCache. now when im trying to enable LWIP for M7 Core Enable check box is not getting activated.Problem 1: why LWIP Enabled box is not getting Activated for Cortex-M7 only?M7 lwip selectwhen im selecting M4 core in LWIP then n only its getting enabled. Problem 2: Why in the RTOS Dependency WITH_RTOS(USE FREERTOS) option is disabled? M7 M4 LwipNote: Here i have already selected PHY Device In the Platform Setting after taking the Screen Shot.these issues is not coming in CubeMx 6.2.1 version.
Hi, I'm using a timer to create a software delay on a high prio task (HPTask with FreeRTOS).The MCU used is STM32H755ZI.My target is:use a timer and arm an interrupt which duration will be 250 usec;suspend the HPTaskon the timer END PERIOD interrupt restart the HPTaskTo reach this result I used TIM17 and OnePulse API.This is my setup on main from CubeMX:htim17.Instance = TIM17;htim17.Init.Prescaler = 200;htim17.Init.CounterMode = TIM_COUNTERMODE_UP;htim17.Init.Period = 10000;htim17.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;htim17.Init.RepetitionCounter = 0;htim17.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;if (HAL_TIM_Base_Init(&htim17) != HAL_OK){ Error_Handler();}if (HAL_TIM_OnePulse_Init(&htim17, TIM_OPMODE_SINGLE) != HAL_OK){ Error_Handler();}This is my setup to generate the delay:HAL_TIM_Base_Init(&htim17);HAL_TIM_Base_Start_IT(&htim17);HAL_TIM_OnePulse_Start(&htim17, 0U);Now... I reached something that is usable but not exactly what I
Hi guys,I;m writing a PC program to communicate with STM32L051 bootloader bia USB-serial and CH340C IC. Getting MCU's ID and bootloader version is fine, which is version 3.1 and ID 0x417I'm stuck at reading this MCU memory. Every time I try to read more than 512 bytes of memory by reading chunks of 128 bytes, bootloader stop responding within 1 second timeout after some successful readings beforehand. Reading 512 bytes from memory is fine though.P/S: I follow communication instruction from document AN3155.Did I overload the bootloader ?
I am using nucleof439 with lwip. I use DHCP to get ip address. Is anyway to detect IP address to be set? I notice there is two thread, "tcpip_thread" and "EthLink", I don't know which one is good for user to get ip address, also struct netif is local variable. it is quite difficult to get it in main.c or freertos.c
Hi Team,We use stm32f303Rbt6 microcontroller. I need a output for Input capture, I am using two timers. I generate pulse for Tim1(1khz) and I set for Tim2 for input capture mode(input capture direct mode). TIM1 generate the pulse for continuously(1khz). But TIM2 set the mode for frequency capture in rising edge only. But we did not get the output and I enable the global interrupt for TIM2. But HAL_TIM_IC_CaptureCallback function does not woring my code. So we did not get the output for Frequency. So I'm already try this method to develop my code. I attach my code and I made a mistake pls correct me.TIM1 and TIM2 Configuration Pictures.#include "main.h"#include "tim.h"#include "gpio.h" /* Private includes ----------------------------------------------------------*//* USER CODE BEGIN Includes */ /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*//* USER CODE BEGIN PTD */ /* USER CODE END PTD */ /
Hello STM32 community,I'm facing an issue with my project involving the STM32F107 microcontroller and LWIP 2.0.3 stack. Here's a brief overview of my setup:Microcontroller: STM32F107LWIP version: 2.0.3Operating System: No issues without RTOS, but encountering problems with RTOSI've successfully implemented LWIP 2.0.3 without an RTOS, and I can ping the microcontroller without any problems. However, when I introduce an RTOS (Real-Time Operating System) into the system, I encounter difficulties. Specifically, I'm unable to ping the microcontroller. I have attached the RAR file of my project(with RTOS)
I am working on firmware with stm32c011f4u6 mcu. When the program is operated, a timeout error occurs after falling into the infinite loop of the function below. HAL_StatusTypeDef RTC_EnterInitMode(RTC_HandleTypeDef *hrtc) { uint32_t tickstart; HAL_StatusTypeDef status = HAL_OK; /* Check if the Initialization mode is set */ if ((hrtc->Instance->ICSR & RTC_ICSR_INITF) == 0U) { /* Set the Initialization mode */ SET_BIT(hrtc->Instance->ICSR, RTC_ICSR_INIT); tickstart = HAL_GetTick(); /* Wait till RTC is in INIT state and if Time out is reached exit */ while (((hrtc->Instance->ICSR & RTC_ICSR_INITF) == 0U) && (status != HAL_TIMEOUT)) { if ((HAL_GetTick() - tickstart) > RTC_TIMEOUT_VALUE) { /* New check to avoid false timeout detection in case of preemption */ if ((hrtc->Instance->ICSR & RTC_ICSR_INITF) == 0U) { status = HAL_TIMEOUT; /* Change RTC state */ hrtc->State = HAL_RTC_STATE_TIMEOUT; } else { bre
Hello,I'm trying to implement the QSPI interface to a micron device utilizing the OSPI hardware with LL kinda of driver (It's not available so I tried to write it by myself). I configured the OSPI and OSPIM registers and from signals that I see on my custom board they're toggling. However, as an initial test I want to read the Device ID from "MT25QL128ABB1ESE" with command "0x9E" in 1-0-1 mode. Initially I tried to keep the FIFO disabled (FTHRES = 0) however, after 2 bytes the FT flag won't set while I want to read five bytes. Then I decided to put the FIFO flag for 5 bytes (FTHRES = 4) and run it this way. ErrorStatus MT25QCheck ( OSPIHandler *OSPI_Handler){ErrorStatus Status = SUCCESS;uint8_t Data[20]; /* Configure for instruction+read in 1-0-1 mode */OSPI_RegularCmdTypeDef RegularCmdStruct = {0};RegularCmdStruct.OperationType = LL_OSPI_OPTYPE_INDIRECT;RegularCmdStruct.InstructionMode = LL_OSPI_INSTRUCTION_1_LINE;RegularCmdStruct.InstructionSize = LL_OSPI_INSTRUCTION_8
Posted on November 15, 2017 at 11:09Hello After I face some fitting to flash problem I saw my largest function is HAL_RCC_OscConfig.I thouht a function that writes static variables to registers should be smaller. Am I doing something wrong or is there a setting for it?I am using GCC 6_2017q2 with System workbench#program-size #hal #flash #cube-hal
Hi allI would like to create 2 virtual COM ports (VCPs) using the CDC class in USBX. The .ioc only allows for one unique PID and VID, but it appears that multiple interfaces can be created of the same class.I want to know if it is possible to create two interfaces with the CDC class, using the USBX peripheral, and to assign a unique PID/VID to each one, instead of the same PID/VID, but different interface numbers. It appears impossible using the .ioc file alone, but can it be done somewhere in code?The end result I am hoping for is to have something like this:VCP_NR_ONE (COM1) with hardware ids: VID → 0x1234 PID →0x4567VCP_NR_TWO (COM2) with hardware ids: VID → 0x1234 PID → 0x7890while still using only the USB_OTG_HS peripheral on the STM32U5A5Thanks☺
Hello,I want to use the USBX MTP stack on a stm32u5 without threadx. The configuration in stm32CubeMx worked fine but when i run the programm, i get UX_FUNCTION_NOT_SUPPORTED from this location: UINT _ux_device_class_pima_initialize(UX_SLAVE_CLASS_COMMAND *command) { #if defined(UX_DEVICE_STANDALONE) UX_PARAMETER_NOT_USED(command); return(UX_FUNCTION_NOT_SUPPORTED); #else UINT status; UX_SLAVE_CLASS_PIMA *pima; UX_SLAVE_CLASS_PIMA_PARAMETER *pima_parameter; UX_SLAVE_CLASS *class_ptr; Are there any other options to use the USBX MTP stack in standalone mode at the moment or are there any plans to support the standalone mode in the future?Thanks in advance.
First post, please let me know if I've made any mistakes in asking my question.I'm trying to write a bootloader for a device using a STM32u585ZIT chip. When booting, it will read a partition table saved in flash to determine if it will boot from partition A (Address 0x08080000) or partition B (Address 0x08180000). I have decided on using the BANK_SWAP option byte to swap the addresses of these partitions so that I only need to write a single linker script for the application code. Here is the code I'm using to set the swap bit if we want to boot from partition B: if ((partitions.a == partitionStatusUpdate) || ((partitions.a == partitionStatusActive) && (partitions.b != partitionStatusUpdate))) { printf("Booting partition A\n"); } else if ((partitions.b == partitionStatusUpdate) || ((partitions.b == partitionStatusActive) && (partitions.a != partitionStatusUpdate))) { if (HAL_FLASH_Unlock() != HAL_OK) { printf("Could not unlock flash!\n"
Hi, I'm working on a project which requires USB MIDI functionality. I looked into a couple of videos where USB MIDI implementation was done on other boards, but when I try to do the same on mine it's not working. I'm using a NUCLEO board (H755ZIQ), I tried checking with both micro USB ports in the board but i'm still getting nothing. In the videos I watched it was achieved by editing the descriptors inside USBDEVICE. This is one of the video that i followed https://www.youtube.com/watch?v=C6jAYpNR1-E&t=990sWhat i did so far is>>Configure USB_OTG_FS as Device only with>>Activate VBUS = VBUS_Sensing and activate SOF checked (This was already there by default.)>> Used the default clock setting for the Nucleo board with 64MHz.>>In middleware settings, I selected USB_DEVICE_M7 and class was set to HID.>>I replaced the values in “ALIGN_BEGIN static uint8_t USBD_HID_CfgDesc[USB_HID_CONFIG_DESC_SIZ] ALIGN_END “ With the descr
Hi, I'm using a nucleo board with stm32h755zi chip for prototyping a MIDI device. I am trying to get it working as both CDC and MIDI device via USB. I was able to achieve this using I-CUBE-USBD-Composite but there is a minor problem with the implementation. What i've done so far is, I created a HID + CDC composite class and i changed the HID descriptor to MIDI descriptors. So by using send report function i can send MIDI notes and by using CDC transmit function i can send serial data. Before i added MIDI descriptors i was able to transmit CDC data with just a single channel. That is i set _USBD_CDC_ACM_COUNT as 1. But when i added MIDI descriptors my CDC transmit stopped working even though i was able to detect a serial monitor. To solve this what i did is, i changed _USBD_CDC_ACM_COUNT to 2. Now i can see two serial ports and the second port works fine whereas the first channel is still not working. When i look at the code second channel has different end points
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.