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,I want to transfer my ADC Data, which is transfered with DMA, over UART to a host. /* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2023 STMicroelectronics. * All rights reserved. * * This software is licensed under terms that can be found in the LICENSE file * in the root directory of this software component. * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** */ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "main.h" #include <stdint.h> #include <stdio.h> /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includ
Hello Everyone, I am trying to establish Ethernet communication with STM32H743Bi controller in my custom board. Am using 3 port PHY from Microchip - KSZ8863RLL in RMII mode. I am generating the code using STM32CubeMX with the LwIP Stack and FreeRTOS. Currently i cant even ping the board. I am using STM32CubeID. In cubeMx i could select only LAN8742 as PHY. In BSP->Components folder i can see the LAN8742.c and .h files. I understand i need to replace the these files with corresponding KSZ8863RLL files. Does anybody know how to configure. Please information's. help me.Please let me know if i need to provide any other Thanks and Best Regards,Vineeth
Hello there.In my project, I am using LWIP with FreeRTOS at CMSISv1 and static memory allocation (configSUPPORT_STATIC_ALLOCATION = 1, configSUPPORT_DYNAMIC_ALLOCATION = 0). Is this a supported configuration? When I generate code, LWIP/Target/ethernetif.c:low_level_init contains calls to xSemaphoreCreateBinary(), which is defined only when dynamic allocation is enabled. Is this a known bug? If so, what is a workaround that I can use? Buildable code would have calls to xSemaphoreCreateBinaryStatic() instead. Right now, I am unable to fix the code in such a way that the changes will not be wiped out by the next CubeMX code generation, as the code is not within a USER CODE section. For reference, I am using a STM32H743BITx MCU, V1.10 firmware package and STM32CubeMX version 6.6.1. If this is an issue that has been resolved in a higher version, please let me know.Thank you!
Hi amazing comminity.. I have configured the adc for reading the internal temp and vref in the following way .. void MX_ADC_temp_Init(void) { /* USER CODE BEGIN ADC1_Init 0 */ /* USER CODE END ADC1_Init 0 */ ADC_ChannelConfTypeDef sConfig = {0}; /* USER CODE BEGIN ADC1_Init 1 */ /* USER CODE END ADC1_Init 1 */ /** Configure the global features of the ADC (Clock, Resolution, Data Alignment and number of conversion) */ hadc1.Instance = ADC1; hadc1.Init.ScanConvMode = ADC_SCAN_DISABLE; hadc1.Init.ContinuousConvMode = ENABLE; hadc1.Init.DiscontinuousConvMode = DISABLE; hadc1.Init.ExternalTrigConv = ADC_SOFTWARE_START; hadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT; hadc1.Init.NbrOfConversion = 1; if (HAL_ADC_Init(&hadc1) != HAL_OK) { Error_Handler(); } // Configure ADC channel for temperature sensor sConfig.Channel = ADC_CHANNEL_TEMPSENSOR; sConfig.Rank = ADC_REGULAR_RANK_1; sConfig.SamplingTime = ADC_SAMPLETIME
Hi Community!We're working with an STM32G0B1xx MCU and using USB PD v5.0.0 library from github (https://github.com/STMicroelectronics/stm32-mw-usbpd-core).I see here that USBPD_EXT_VDM = 0x1E is defined properly. However, when I use this with USBPD_DPM_SendExtendedMessage(), I get a generic "USBPD_FAIL" response, and nothing gets sent out on the CC line.So, my question is: Does the v5.0.0 library support Vendor_Defined_Extended message? Thank you for the support!Screenshot from the USB PD 3.1 spec
Hi, I am working on a project doing realtime FFT processing on an audio signal using an STM32H730 processor with the CMSIS FFT library. Currently trying to reduce latency through lower block size and higher overlap between FFTs, and looking for ways to optimize and reduce processing overhead in the FFT function. I wanted to ask whether performance could be improved by replacing the arm_rfft_f32 function with the arm_rfft_f16 function? Would this be faster on the STM32H730 hardware? And would the fixed point functions like arm_rfft_q31 be faster still?Please let me know. Also open to any other advice on how to optimize CMSIS FFT processing for SMT32H730 hardware. Thanks!
I'm using STM32Cube_FW_G4_V1.5.1 for testing a NUCLEO-G474RE board, but none of the examples worked at the first try. After importing them into STM32CubeIDE v1.13.0, I'm always getting this error message on sysmem.c: ../Application/User/sysmem.c:63:1: error: unknown type name 'caddr_t' 63 | caddr_t _sbrk(int incr) | ^~~~~~~ ../Application/User/sysmem.c: In function '_sbrk': ../Application/User/sysmem.c:76:25: error: 'caddr_t' undeclared (first use in this function) 76 | return (caddr_t) -1; | ^~~~~~~ With reference to the solution posted into this thread:https://community.st.com/t5/stm32cubeide-mcu/core-src-sysmem-c-38-1-error-unknown-type-name-caddr-t/td-p/56309I have been able to fix all included examples for all boards by doing a search & replace into all sysmem.c files and I replaced all 'caddr_t' with 'void *'.I'm reporting this issue, so that it could be fixed into a newer release of that package, since it has been quite easy to do, afterall.Sincerely.
Hello everyone,I'm working on stm32f103.I try to use HAL_uart_transmit_DMA, in a circular buffer for simple logs.I created a circular buffer, on which I can write my strings.the issue is... my circular DMA write it as as loop instead as finishing at the end of the string.So if I write "Hello" wait enough time and "World" in 8 bit long buffer, I get:"rld'\0'oWo" in loop.I would have hope with some magic, dma would stop '\0', but it doesn't. This would be great option for asciiI would have hoped dma would send the right interrupt sor it can be easy, but it's not.I would appreciate any advice so that dma_tx in circular would work as circular buffer, but appropriate with logs.I would love is those advice would use hal library instead of driver layer or register to keep it working between projetcs and chips.
Hello dear engineers,I have gotten stuck in running SDIO on stm32f429igt6.No matter how hard I have tried, I wasn't able to successfully use FATFS with SDIO and stm32f429igt6. My code is attached. the f_mount function with immediate force on mounting return fr_no_filesystem. I use SANDISK SD Card with 16GB formatted with FAT32. Any help would be appreciated. Neither KEIL nor CUBEIDE compiler show different behavior. Furthermore, is it possible to run NTFS on stm32f429?
I want to transmit data over fiber optic from STM32H743VIT6. I am using internal MAC of STM32H743VIT6 and LAN8742 as PHY. The ethernet signals after LAN8742 are going both in the RJ45 connector and also in Fiber optic transceiver. I am using AFBR5803ATQZ as fiber optic transceiver. Ethernet is not working using AFBR5803ATQZ as fiber optic transceiver.
I am currently writing code for STM32F107VC CPU, and I want to use ADC, calibrating it first. I have noticed a strange thing in the ST HAL library.The datasheet on page 223 reads "Before starting a calibration, the ADC must have been in power-on state (ADON bit = ‘1’) for at least two ADC clock cycles."However in the firmware for this CPU (stm32f1xx_hal_adc_ex.c) the function HAL_ADCEx_Calibration_Start first disables the ADC, then waits for 2 ADC clock cycles. It doesn't wait after enabling the ADC again. The comment in the code says "Calibration prerequisite: ADC must be disabled for at least two ADC clock cycles in disable mode before ADC enable". And the code that follows there disables the ADC (clears ADEN bit).Why does the HAL code wait two ADC clock cycles after disabling the ADC, when the datasheet clearly says it should wait after enabling the ADC? Is this intentional for some reason (I checked the errata, but couldn't find anything), or did the author of this functi
Hi ST USB PD community. I'm using https://github.com/STMicroelectronics/x-cube-tcpp but can't seem to find the right callbacks to respond to our port-partner when they send a Get_Battery_Status command.I need the ST MCU to respond with the Battery_Status data message. Does the USBPD library support this?I have similar question for Battery_Capabilities and Manufacturer_Info.thank you for the support!
I've been working on a project based on the STM32U575 Nucleo board for some months now. I just updated STM32CubeIDE yesterday and I noticed the ThreadX memory pool size option in "Middleware and Software Packs -> THREADX ->Memory Configuration" has shrunk to a max of 201.216K bytes. Previously it was something a little bit larger, can't remember the exact number but at least a few K larger. The application I am writing needs nearly all the available memory on the chip, north of 700K. Since I've started this project, I've been manually updating the definition for the TX_APP_MEM_POOL_SIZE in app_azure_rtos_config.h to something suitably large after making changes in CubeMX and haven't noticed any issues, but I've always wondered why this memory pool size limitation is imposed. The new update and shrinking of the max mem pool size has only served to remind me of this. Can anyone explain exactly why this memory limit is so small in comparison to available ram? I've read the
I developed my first canbus bootloader for a stm32f105.Now im in need to use that same bootloader in a stm32f072.The bootloader works but im unable to build a program that starts from a flash address other than 0x8000000..... How are multi programm apps being programmes in stm32f0xx families?
How to receive the commands through the usb of USB_CDC_ receiveHello,I am working on the stm32f070c6 USB_CDC virtual COMK port ,I am transmitting the data from stm32 mcu to serial monitor but when I am trying to receive the commands through usb from my pc to serial monitor, i used usbd_cdc_receive function but unfortunately I am not receiving any commands from the pc to select the different operations of stm32f070c6, I am taking the received data to the main program of switch cases but I am receiving the data at usb_cdc_receive function but im not getting the data in main file ,how we can receive the data from the pc using USB_CDC virtual COM port and also when i try to use ptintf and scanf functions in stm cube IDE , even printf scanf functions also not working to print the messages on serial monitor ,they are not working nothing to display on the serial monitor, how can I overcome this problems, if anyone have an idea about of these please give a replyThanks in advance
In the Application Note for the ST Bootloader, DFU bootloader commands such as DFU_DNLOAD are specified. Where would I, as a programmer, use these commands? When communicating with the STM32 microcontroller using the ST Programmer via the command line, I have different commands. Does this mean the ST Programmer is an Application that uses that commands for its communication with the MC bootloader?
Hi,I saw that it is possible to flash firmware via the Cube Programmer and the System Bootloader. Is it also possible to update the device through the system bootloader from a USB stick?Also, does someone have a suggestion where I can find more information about the build- in bootloader other than the application note? Thank you very much
Hello everyone, I'm working on the LORA pingpong example, and in the pingpong_process code, where I receive the data, I want to print it aswell. The current code that's running is this: if(RxBufferSize > 0){ memcpy(receive_data, BufferRx, sizeof(BufferRx)); HAL_GPIO_WritePin(LED1_GPIO_Port, LED1_Pin, GPIO_PIN_SET); for(int i=0; i<60; i++){ APP_LOG(TS_ON, VLEVEL_L, "%d,\r", receive_data[i]); } APP_LOG(TS_ON, VLEVEL_L, "\n\r"); RxBufferSize = 0; }I've already managed to send it to serial once with the same code, but now it isn' working.I'm doing the process to open a new console everytime, but I don't know the issue. Any ideas of what I could be doing wrong?
Hi, 2 questions:how to develop doubleframebufferis clear framebuffer time 10ms top performance (-Ofast 160MHz)?Details:I'm experimenting with STM32U5A9J-DK round display board. After many trials and errors, comparing U5 examples with much richer ones for F4 pack I got working DSI LCD with singlebuffer.I created GFXMMU Excel as asked in Cube creator. Attached virtual GFXMMU buffer to LTDC. Got line interrupt on front vertical porch. Finally evaluated some timing.Now I want to use double framebuffer, and mu question: what is best approach to do this? I used to implement similar solution with SPI, DMA and half complete callback for STx driver. But I'm not sure how shoud it look like in this case.I see that LTDC has 2 layers. Should I pass 2 GFXMMU buffers and swap layers somehow? Or use 1 layer and replace buffers during blanking period?Question 2: Despite that I have some bad feeling about clearing screen. How should I draw to framebuffer? With memset i takes 36ms :( void gfx_p
After enable ADC in Cubemx, it is better if HAL_PWREx_EnableVddA() added automatically.
Hello,When I execute StartEcc() in a code without TrustZone enabled, it sets the ECCE & ALE bits of RAM CR as expected. but in my current project even after StartEcc() is executed, ECCE & ALE bits are 0, which means it is not able to turn the ECC feature ON. The difference between these two is that in the second, TrustZone is enabled. will that make any difference?Thank you
Hi, I have a question about the internal SRAM1 in the STM32F769NI.Do I need to do anything special to retain the data in SRAM1 on reset?If data retention is established by default, do you know how it works?
Hi, I am working on a project where we need USB DFU on the STM32H730. I have selected the USB DFU function in the .IOC, compiled and uploaded to the hardware, but when I try uploading a new program both via this online DFU Tester (https://devanlai.github.io/webdfu/dfu-util/) and via CubeProgrammer in USB DFU mode. Neither works. I have attached some screenshots of my .IOC settings and of the errors I am getting.How do I fix this?
Hello everyone!I read many topics on this forum and it is really helpful but currently I try to solve my problem - unsuccesfully.What I want to do: program MPU through bootloader CANHardware: NUCLEO-L496, STLINK-V3. Crystal HSE soldered on NUCLEO (AN2606). Common GND, CAN_VCC connected to 3,3V. CAN bus on PB8 and PB9Bits BOOTn are set by means of SWD. Bootloader is running - checked in MPU Core.When connect CAN TX and RX (NUCLEO and STLINK) directly - without CAN transceivers - STM32CubeProgrammer connect with STM correctly and it can be programmed. I made sure that bootloader work properly but that is not the point.When connect NUCLEO > transceiver, STLINK>transceiver and to the CAN bus then signal from NUCLEO to STLINK (STM_RX STM_TX, CANH CANL, STLINK_RX STLINK_TX) is transmitted through all 'levels' (checked on logic analyzer). If signal is sent from STLINK - it has correct form (CAN RX and TX) without connection to transceiver. If connect to transceiver - no signal. I checke
i'm getting -nan(0xfffffe0000000) value while reading from flash. why i'm getting this value and what is it?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.