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
Posted on May 20, 2016 at 16:47I am porting an existing design from an F107 to a L4 micro in the hopes that I can push sleep current below 50uA.Currently I have only one barrier to achieving this low power: the USB device peripheral. No matter What I do, once the USB has been initialised, I can't get stop1 current below ~200uA. I have tried calling USBD_DeInit and USBD_Stop before stopping, but this only got me down to the 200uA. I have seen some forum posts (/c8dfa70e) related to the F4 saying that VBus sensing can account for this, but I have checked and the GCCFG register is completely reset after DeInit. Does anyone have any ideas? I an using the latest Cube L4 HAL libraries, V1.4. #pull-up #stm32l4 #stm32l4 #usb #usb #power #stm32cube #pull-down
i'm using 'HAL_SPI_TransmitReceive_DMA' , but error in 'devid''HAL_SPI_TransmitReceive_DMA' -> The path to use this function is If I use the commented 'HAL_SPI_TransmitReceive' function, the 'devID' value is 0xdeca0310 (normal value)If you use the 'HAL_SPI_TransmitReceive_DMA' function, the 'devID' value comes out as 0x0(error).DMA settings are as follows.I must solve this problem/Let me know if there is any information you need to solve the problem.
Hello,I'm working on a NUCLEO-H743ZI2 Board.I am attempting to record ADC samples on an SD card using a FreeRTOS CMSIS-V1 program. Below are the configurations for my ADC and Timer6:ADC Configuration:Timer6 Configuration, I try to have around a 7500Hz Frequency (APB Timer Clock = 64MHz): I am acquiring a simple 30Hz sine wave generated with a Low-Frequency Signal Generator. I use HAL_ADC_ConvHalfCpltCallback() and HAL_ADC_ConvCpltCallback() to trigger a TaskNotify(). In my task, if the notification comes from HalfCplt, I write the first half of my adc_buffer (size = 10240) to the SD card. If the notification comes from Cplt, I write the second half of the adc_buffer (ping-pong mechanism).Everything appears to work well, but there is an issue: when I examine the recorded file on my computer, I notice that some samples are missing between the first and second halves of my buffer, as seen in this screenshot: The discontinuity occurs every 5120 samples (half the size of my
I generated code for STM32H563VIT6 via CubeMX with USBD MSC enabled.When I now run the software, I get an unaligned memory access error within: static void USBD_FrameWork_MSCDesc(USBD_DevClassHandleTypeDef *pdev,uint32_t pConf, uint32_t *Sze) in the MACRO: __USBD_FRAMEWORK_SET_EP((pdev->tclasslist[pdev->classId].Eps[1].add),(USBD_EP_TYPE_BULK),(uint16_t)(pdev->tclasslist[pdev->classId].Eps[1].size),(0U), (0U)); which is disassembled to:676 __USBD_FRAMEWORK_SET_EP((pdev->tclasslist[pdev->classId].Eps[1].add),08005d9a: adds r3, r4, r108005d9c: mov.w r12, #708005da0: strb.w r12, [r4, r1]08005da4: movs r4, #508005da6: strb r4, [r3, #1]08005da8: ldr r4, [r0, #4]08005daa: mov.w r12, #92 ; 0x5c08005dae: mla r4, r12, r4, r008005db2: ldrb.w r4, [r4, #42] ; 0x2a08005db6: strb r4, [r3, #2]08005db8: movs r4, #208005dba: strb r4, [r3, #3]08005dbc: ldr r4, [r0, #4]08005dbe: mla r4, r12, r4, r008005dc2: ldrh r4, [r4, #44] ; 0x2c08005dc4: strh r4, [r3, #4] &n
I have been trying to use the USB Host CDC library for a project but there is no example and online support available for STM32H5xx Series Controller. If anyone can share this Implementation please share the example on how to use the STM32H5xx USB as a host to read data from other MCU with USB Protocol.
Hi all, I am developing a TCP server starting from the STM32F4 TCP server echo sample.My goal is to keep the echo functionality and send in addition a periodic message.I modified slightly the original file and I managed to have the echo working and the method tcp_echoserver_periodic_notification called every second, but that message does not get to my client.I am probably doing something wrong but I do not understand what since it's my first time with LwIP and I must say it's not very straightforward.Can you please help me, what am I doing wrong?Also, I see other examples using the methods pbuf_take and pbuf_alloc, but the ST example does not use them, what is best to do here?Thanks.
Hi everyone, I am trying to develeop a program, I need to use ili9341 LCD screen on SPI but at the same time I need to storage some datas by eeprom emulation on sector 2 and sector 3 in flash memory addresses.I use these codes for eeprom emulation. link for githubSrc>main Src>eeprom.cInc>eeprom.hI use a library for ili9341 on SPI. link for githubBut when I use EE_Init function to initialize eeprom writing process, I cant use SPI correctly. Bascily, I need to draw a logo on the screen, I can do it unless I use EE_Init function. But after I use it, my logo drawning processes always stuck. Thanks everyone in advance,Volkan
We have different series of the stm32g070cbt processor that we are currently using. For example, in some processors with serial numbers 202 and 225, the processor works after a program is sent to the processor, but when the processor is reset, the program does not continue its flow. This problem disappears when I replace the processor with serial number 255 with the processor number 202,225 in different series. Is there a difference between these series? And how can I solve this problem? I think there is a possibility that I may experience such a problem when I place a bulk order.
Hey everyone, i'm trying to implement CMSIS filtering function to my project. Sound sounds fine when i'm using 1,0,0,0,0 coeefs, but every single change makes filter degrading input signal, and i'm getting so much noise on output. I'm using coeffs from biquad calculator v3, witch was fine when i used eqation implementation with my own, but using CMSIS it don't wanna work. I remembered changing the sign in a1 and a2 coeffs. Here's my code, maybe someone will have any idea what's wrong:/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** * @attention * * Copyright (c) 2024 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 i
Hi I wanted to translate the following Arduino code with hal stm:uint32_t TMC5160_SPI::readRegister(uint8_t address){// request the read for the address_beginTransaction();_spi->transfer(address);_spi->transfer(0x00);_spi->transfer(0x00);_spi->transfer(0x00);_spi->transfer(0x00);_endTransaction();//Delay for the minimum CSN high time (2tclk + 10ns -> 176ns with the default 12MHz clock)#ifdef TEENSYDUINOdelayNanoseconds(2 * 1000000000 / _fclk + 10);#elsedelayMicroseconds(1);#endif// read it in the second cycle_beginTransaction();_spi->transfer(address);uint32_t value = 0;value |= (uint32_t)_spi->transfer(0x00) << 24;value |= (uint32_t)_spi->transfer(0x00) << 16;value |= (uint32_t)_spi->transfer(0x00) << 8;value |= (uint32_t)_spi->transfer(0x00);_endTransaction();_lastRegisterReadSuccess = true; // In SPI mode there is no way to know if the TMC5130 is plugged...return value;}Thanks
Hi,Does anyone have an idea what i am doing wrong.I want tot test the X-CUBE-EEPROM v6.1.0 on a nucleo-C031C6 but get below errors when building the project.I import the project with import --> Existing projects into workspace C:/ST/STM32CubeIDE_1.12.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-closer.o): in function `_close_r':Description Resource Path Location TypeC:/ST/STM32CubeIDE_1.12.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.11.3.rel1.win32_1.1.1.202309131626/tools/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/lib/thumb/v6-m/nofp\libc_nano.a(libc_a-lseekr.o): in function `_lseek_r': NUCLEO-C031C6 C/C++ ProblemDescription Resource Path Location TypeC:/ST/STM32CubeIDE_1.12.1/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools
Hi,I am trying to assign Adc.Raw[0] and Adc.Raw[1] to Vref and Vtemp as in below code snippet. But, Vref and Vtemp gets 0. These variables never updated with Adc.Raw values.Could you please point me in the right direction ?
Say that I have the following set of sensors: s1,s2,s3, s4, s5 and s6.I want the set (s1,s2,s3) to be scheduled at 100ms, s4 every 200ms and the set (s5,s6) every second. My gut feeling suggests me to create three periodic tasks task1, task2 and task3 that calls `sensor_set1()`, `sensor_set2()` and `sensor_set3()`, respectively.The problem here is that all the sensors are connected in the same ADC, and therefore, at the beginning of each function call I should re-configure the ADC.My idea is to do something like the following but I don't know if it is correct or not. Any help? :)sensor_set1(){ hadc1.Init.ScanConvMode = ENABLE; hadc1.Init.NbrOfConversion = 3; sConfig.Channel = ADC_CHANNEL_1; sConfig.Rank = 1; sConfig.SamplingTime = ADC_SAMPLETIME_3CYCLES; HAL_ADC_ConfigChannel(&hadc1, &sConfig); sConfig.Channel = ADC_CHANNEL_2; sConfig.Rank = 2; sConfig.SamplingTime = ADC_SAMPLETIME_3CYCLES; HAL_ADC_ConfigChannel(&hadc1, &sConfig); sConfig.Channel = AD
this is the same issue as previously reported in a thread that had an answer marked as a solution (it was not, in fact, a solution) I am looking to test X-CUBE-EEPROM on a supported eval board. (nucleo-G431RB) I load the relevant X-CUBE-EEPROM project into my workspace "existing projects into workspace option" I can see all the files and when I go to compile it "succeeds" but with 4 warnings that there are no implementations for _close_r, _lseek_r, _read_r, and _write_rwhen I go to run my firmware on the target board it doesn't work (as you'd probably expect) When I load other target projects from the same package up in STM32 cube IDE I get the same errors when I go to build. I am running STM32 cube IDE 1.14.1 and AFAIK this install is auto-updating, I don't see any updates I am missing) the ide works fine for other projects (like the one I am actually developing, as well as an example project for a sensor I used recently to test that with an eval board be
Hello Forum, I am struggling with a sync timer problem and I have no more idea for resolve it. Here we go :TMR5 is configured as master for TMR3TMR3 is configured as master for TMR4 I configured TMR3 as OnePulse output signal with a delai from a OutputCompareStatus of TMR5I configured TMR4 as PWM signal started by OutputCompareStatus of TMR3 I do Init/Configure/Start after a powerOn and the system works well. I want to do an update of the delai on TMR3 and, impossible to have a correct synchronization between my signals as in the first call.I did several attempt and I lost my self in all theses, someone know the exact sequence of call I have to do for make the magic happened ?Thanks a lot When it works, Any other attempt stop/update same delai/start, the blue wave loose the synchro Mickael
Hello,even the STM32Cube_FW_U5_V1.4.0 devices headers contain senseless casting like:#define SDMMC_IDMABASER_IDMABASER ((uint32_t)0xFFFFFFFF) /*!< Memory base address register */ Header files should use a designator at the end of the number, like#define SRAM1_SIZE (0x30000UL) /*!< SRAM1=192k */used in most other places. Maybe a supervisory check of the header before publishing is missing... Regards
I am wondering if HAL functions have some builtin protection mechanism or if I have to wrap them around a semaphore/mutex take/give. For example, if two tasks call `HAL_ADC_Start(&hadc1);` or `HAL_UART_Receive_IT`, what will happen? Shall I use a semaphore/mutex at OS level?
In stm32f1xx_ll_gpio.h, LL_GPIO_AF_EnableRemap_SWJ(), LL_GPIO_AF_Remap_SWJ_NONJTRST, LL_GPIO_AF_Remap_SWJ_NOJTAG(), LL_GPIO_AF_DisableRemap_SWJ() all use SET_BIT(AFIO->MAPR, AFIO_MAPR_SWJ_CFG_xxxxx);which is incorrect, as SET_BIT is #define SET_BIT(REG, BIT) ((REG) |= (BIT))and the read value of AFIO_MAPR.SWJ_CFG field according to RM0008 is unpredictable.JW
hi,i'm trying to build the kernel source on the stm32f746-discoi'have forked github link of kernel sourcehttps://github.com/KpuFish/linux-stm32f7regarding the step discriptions,-->>Steps to make the uImage :1) use `make stm32f746_disco_defconfig' to configure a kernel configuration withsupport following STM32 IPs: USART, LTDC (framebuffer).2) `sudo tar xf initdir.tar', to extract initdir.tar to initdir directory. Note: use `sudo' to ensure `tar' will succesfull create dev nodes.3) `export ARCH=arm'4) `export CROSS_COMPILE=arm-uclinuxeabi-' Note: arm-uclinuxeabi-* toolchain may be in your path. Note: arm-uclinuxeabi- toolchain provided by sourcery in link[1]5) `make', to compile kernel6) to create loadable uImage: `mkimage -A arm -a 0xc0008000 -e 0xc0008001 -n 'Linux kernel0' -C none -T kernel -d arch/arm/boot/Image networking.uImage'i'm stuck in step (5)i have tried many times set the PATH commandsalthough i also have modified bashrc same thing, it failed to build current source
In How do I create a project for STM32H7 with Ethernet and LwIP stack working? by @Adam BERLINGER we have the following MPU configuration: Cortex-M7 configurationThis step can be skipped when using Cortex-M4 core.Enable ICache and DCache.Enable memory protection unit (MPU) in “Background Region Privileged access only + MPU Disabled ...” mode. Configure regions according to the picture below: Can someone explain that in more details?Where does it say these regions should be protected from MPU?What is the rational of behind each of those MPU regions? Many thanks,Eduardo.
Hello Folks,[Re-posting this question since I believe I had it in the from Board. I would delete the original one if I could.]I use the H723ZG Nucleo board without FreeRTOS. I had configured Ethernet for the H723ZG in the past. But I am unable to configure it again now, even when following the same steps. When I first got it working, my configuration was based on this Youtube video STM32 ETHERNET #1. Hardware Configuration || PART 1. In addition, I spent countless days trying to configure the Ethernet without FreeRTOS based on this post How to create project for STM32H7 with Ethernet and LwIP stack working from @Adam BERLINGER . I was able to get it working WITH FreeRTOS, but not WITHOUT it. And I am here to kindly ask for your help. Here are some screenshots from my `.ioc` file. I am testing it with the ping example. /* USER CODE BEGIN 0 */ extern struct netif gnetif; /* USER CODE END 0 */ [...] /* Infinite loop */ /* USER CODE BEGIN
Posted on November 04, 2016 at 14:45 Hello ! The board I am using for this topic is based on the ST http://www.st.com/en/evaluation-tools/stm3220g-eval.html hardware for the Ethernet part. I have generated a basic code with cubeMx (nice tool!) and Ethernet communication is working well on this board. The problem is that Ethernet is working only when Ethernet cable is connected at startup (especially when initialization function is run). If I start my board without cable, Ethernet is not working (ping test failed) and will never work even if I connect the cable. To solve this, I added the following function after LWIP initialization: netif_set_link_callback(&gnetif, ethernetif_update_config); The ''ethernetif_update_config'' function is generated by cubeMx (in ethernetif.c file) to restart auto-negotiation: /** * @brief Link callback function, this function is called on change of link status * to update low level driver configuration. * @param net
Hi Community,I am trying to integrate SIM800L module with STM32F103C6T6 using UART (POLL method), code given below, but all I am getting a response is a single char 'A' or sometimes a random value as shown in screenshots. I have also tried setting up the Baud rate at 9600. But no luck, everytime I am getting the HAL_TIMEOUT error message with buffer sometimes a single digit character 'A' or some values from command itself populated in the response buffer. Also, I have tried with Putty and it works fine, I get the complete response for a given AT command as expected from manual /* Includes ------------------------------------------------------------------*/ #include "main.h" /* Private includes ----------------------------------------------------------*/ /* USER CODE BEGIN Includes */ #include <string.h> #include <stdio.h> /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ /* USER CODE BEGIN PTD */
Dear Community,I looking for some help - I need to be able to read a gamepad controller (in this case logitech wireless F710) with a H723ZG board. I tried to adapt the mouse and keyboard examples without any success.With the HID_standalone example, I get the following output when I connect the wireless dongle:**** USB OTG HS in FS MSC Host **** USB Host library started. Starting HID Application Connect your HID Device USB Device Connected USB Device Reset Completed PID: c22fh VID: 46dh Address (#1) assigned. Manufacturer : Logitech Product : Logitech Cordless RumblePad 2 Serial Number : N/A Enumeration done. This device has only 1 configuration. Default configuration set. Switching to Interface (#0) Class : 3h SubClass : 1h Protocol : 2h Mouse device found! HID class started. USB Device disconnected ERROR: USB device disconnected !!! USB Device Connected USB Device Reset Completed PID: c21fh VID: 46dh Address (#1) assigned. Manufacturer : Logitech Product : Wireless Gamepad
Hello forum,I'm working in STM32CubeIDE with the STM32F107VCT6 on a custom board which successfully run a TCP Server application using Ethernet communication + FREERTOS + lwIP and I'm struggling in enabling AUTOIP feature.My custom board need to be IP assigned if working in a network ...where a DHCP server exist, but also in a personal network (e.g. LAN cable connected from the board straight to the PC LAN Port)...where a DHCP server does not exist. Premise that DHCP if correctly working in the first scenario, I can't get the second one working.Since switching dinamically to a static IP is not a good solution (I can't elect a static IP beforehand and...I'm freightened about doing this with lwIP) I was triggered by a forum post by LCE (here) talking of AUTOIP as solution, I've google around the web for lwIP AUTOIP feature but noone is talking about it or giving working examples, then my attempts follow below.In STM32CubeIDE I've flagged:General Settings > IPv4-DHCP Options >
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.