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
I need an example of how to Transmit/receive data using SPI and DMA with LL library for the STM32H7.
Hello, I have a question about LWIP functionality.I'd like to know if it's possible to redirect a tcp request received on the pppos interface, to a device that is connected onto the ethernet interface and listening on the desired port.Thanks in advance!
Hello, My issue is related to:-MCU: STM32H733Middleware: Azure RTOSMiddleware Component: NetxDuo (6.2.0)Addon: mDNSI am using Azure RTOS with NetxDuo, I implemented a secure https server in my device and implemented mDNS which was working very well for me till I required to change domain. I want to add a sub-domain like (myhostname.mysubdomain.local). In documentation it is stated that by default the domain is .local but can be changed using following API Now, I have implemented this API in my code like this: ```status =nx_mdns_create(&mdns_instance, &ip_instance, &netxduo_packet_pool, MDNS_PRIORITY, mdns_thread_stack,sizeof(mdns_thread_stack), (UCHAR *)hostname, (VOID *)local_service_cache,sizeof(local_service_cache), (VOID *)peer_service_cache, sizeof(peer_service_cache), NX_NULL);if (status != NX_SUCCESS){Error_Handler();}status = nx_mdns_domain_name_set(&mdns_instance, "home");status = nx_mdns_enable(&mdns_instance, PRIMARY_INTERFACE);```It
I'm using a NUCLEO STM32F303K8 board attempting to use FreeRTOS, and I have a halting problem when I use CMSIS V2. I found this out by just trying to toggle the built-in LED using HAL using one statically allocated task and observing that the LED only toggles once.(I have OSdelay of 500, so I should be able to observe it). When I run into the debugger, it gets stuck in the default_handler. I then tried using CMSIS V1 and it toggles just fine. My question is is there any documentation on this? I've tried looking around, but haven't had any luck. I've used FreeRTOS on other STM32's/NUCLEO boards and I haven't had a problem using CMSIS V2. Just to clarify, I don't mind using CMSIS V1. I was just wondering if others knew the problem or experienced the same issue.
Hey there I've just started learning STM32 so I don't know if its a small error or big one but can you help me solve.I'm using STM32f407z and the task is to copy a file from SD card to the USB drive (pen drive) using reference blog of elm-chan FATFS. (http://elm-chan.org/fsw/ff/doc/open.html) The given code shows 0 error after compiling(build) but while debugging, It shows FR_DISK_ERR when f_open function is running for "myUSBFile". Thus it sometimes create the file but does not copy the content. Is there an issue with buffer or anything else I cant solve this error. @Tesla DeLorean , @TDK , @waclawek.jan, @Peter BENSCH these are the config settings in CUBE MX,SDIO->enabled -> SD 4 bit wide bus,USB_OTG_FS-> HOST_ONLY,FATFS-> SD card and USB Disk both are enabled, (USE_LFN->enabled with static working buffer on the BSS, MAX_SS->4096)USB_host->MSC (mass storage class),oscillator->8MHZCLOCK -> 168MHzUSB CLOCK -
Hello,I'm using a STM32H743 and IS42S32160 SDRAM. The SDRAM is in bank1, and I followed the instructions on how to setup the external memory from this guide:https://community.st.com/t5/stm32-mcus/how-to-set-up-the-fmc-peripheral-to-interface-with-the-sdram/ta-p/49457i can read/write the entire bank (64Mbytes) one word at a time, but then when I run a memory test, where it uses a pattern (incrementor) at each location the memory test fails. Also, in debug mode, when I step through the program and watch the memory window, i noticed weird things happening. Before this memory tests starts, the entire 64mb is initialized to x80000000 as shown below:Now the first write happens to location 0xc000_0000 <= 0000_0001, which seem to write there, but it also writes or reads from addresses: C000_0020, C000_0080, C000_00A0Something similar happens to the next memory locations: .... etc... it does that through out the entire memory space. I check
Hi all, I am using a STM32H747XIH6 MCU. I developed an application using LwIP library. When I connect my circuit directly to the computer, the application works stably. But when I connect the circuit to the LAN network, the application encounters a hardfault interrupt. Before the interrupt occurs, the application sends the message 'LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer timed out\n"));' in the ip_reass_tmr() function at the file ip4_frag.c. void ip_reass_tmr(void) { struct ip_reassdata *r, *prev = NULL; r = reassdatagrams; while (r != NULL) { /* Decrement the timer. Once it reaches 0, * clean up the incomplete fragment assembly */ if (r->timer > 0) { r->timer--; LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer dec %"U16_F"\n", (u16_t)r->timer)); prev = r; r = r->next; } else { /* reassembly timed out */ struct ip_reassdata *tmp; LWIP_DEBUGF(IP_REASS_DEBUG, ("ip_reass_tmr: timer timed out\n")); tmp = r; /* get the next pointer before fr
Edit : see this post for answers :https://www.reddit.com/r/embedded/comments/13rcrqf/stm32h723zg_creating_tcpip_with_lwip_but_cannot/reddit dot com /r/embedded/comments/13rcrqf/stm32h723zg_creating_tcpip_with_lwip_but_cannot/ Hello Summary what I want to dowhat I have donequestion ##### WHAT I WANT TO DO #####I want to send protobuf message from my STM32H723ZG (as a client) to a Raspberry using ethernet communication.So far I am just trying to create an ethernet connection and to ping the adress of the stm. ##### WHAT I HAVE DONE #####I looked at ressources online.The most ineteresting seemed to be this set of videos from controllersTech expaining hwo to do a bunch of ethernet thin on stm32H7xxx:youtube.com/watch?v=8r8w6mgSn1A&list=PLfIJKC1ud8ggZKVtytWAlOS63vifF5iJC&index=3as well as this github repo + video of a polish person doing a HTTPd project ont the exact same card as me stm32h723zg:https://github.com/trteodor/ownHTTP_withNUCLEO_STM32H723ZG/tree/maste
HELLO, I’m facing a hard fault when transmitting large data (60,018 bytes) via LwIP TCP/IP on STM32H723 with FreeRTOS. After increasing buffers and adjusting lwipopts.h, only 4000-5000 bytes transmit successfully. Remaining data causes crashes, likely due to memory exhaustion, stack overflow, or incorrect buffer handling. Need help resolving this. HARD FAULT STACK-"cam_bsnet Debug [STM32 C/C++ Application] cam_bsnet.elf [cores: 0] Thread #1 [main] 1 [core: 0] (Suspended : Signal : SIGTRAP:Trace/breakpoint trap) HardFault_Handler() at stm32h7xx_it.c:113 0x8002070 <signal handler called>() at 0xfffffffd ethernet_input() at ethernet.c:113 0x8023328 tcpip_thread_handle_msg() at tcpip.c:174 0x801714e tcpip_thread() at tcpip.c:148 0x8017102 pxPortInitialiseStack() at port.c:214 0x8012ab0 arm-none-eabi-gdb (13.2.90.20230627) ST-LINK (ST-LINK GDB server)"THANKS IN ADVANCE
Hi,I am using the STM32H7R7I8T6 in combination with the Macronix MX25L12833F on a custom board. As I understand it, I need to configure the External Memory Manager and the XSPI interface in STM32CubeMX and after initializing the flash via SFDP, the bootloader should jump into the application if the External Memory Loader is configured correctly. Am I right? It is not necessary to write a separate library for the flash and put it in memory mapped mode? When debugging the External Memory Manager, the error message EXTMEM_DRIVER_NOR_SFDP_ERROR_SFDP is returned at step “4 - Analyze SFPD structure to get driver information”.Does the External Memory Manager support all SFDP flash memory or is there something to consider? Also, I am wondering if the flash memory needs to support XIP (Execute in Place) in order for me to use the flash memory?
From my research, I've read that LwIP is written with FreeRTOS, but can be altered to support any OS. Since ST has made an effort to support/encourage LwIP and ThreadX, are there any resources/examples that we can reference?I am doing my evaluation with the STM32H753ZI and I want to utilize LwIP and ThreadX. I have played with the STCubeH7 LwIP examples on GitHub, but again, none are with ThreadX. If someone could also point me to a tutorial or documentation that explains the different components LwIP needs, that would also be helpful. As I've noticed some examples have different req files that the use needs to provide: ethernetif.h/c, app_ethernet.h/c, and net_conn.h/c, ethernet_perf.h, etc.
Hi, I stumbled on a little issue regarding DMA2D and a NUCLEO-F767ZI.I used STM32CubeMX 6.13.0, STM32CubeIDE 1.17.0, firmware FW_F7 1.17.2.DMA2D needs RGB888 input color but I configured as RGB565. (I think)The outputs also is RGB565 and seems fine. /** * @brief Fill rectangle * [in] x * [in] y * [in] width * [in] height * [in] color * [in] frameBufferPtr * @return None */ uint8_t Display_Fill_Rectangle(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint32_t Color, uint32_t *frameBufferPtr) { HAL_StatusTypeDef hal_status = HAL_OK; hdma2d.Instance = DMA2D; hdma2d.Init.Mode = DMA2D_R2M; /* Mode Register to Memory */ hdma2d.Init.ColorMode = DMA2D_OUTPUT_RGB565; /* DMA2D Output color format */ hdma2d.Init.OutputOffset = (uint32_t)(DISPLAY_SIZE_X - width); /* Offset in output */ /* Foreground Configuration */ hdma2d.LayerCfg[DMA2D_FOREGROUND_LAYER].AlphaMode = DMA2D_NO_MODIF_ALPHA; hdma2d.LayerCfg[DMA2D_FOREGROUND_LAYER].InputAlpha = 0x00; /* 0xFF = Fully o
Hi,I am interfacing my stm32f4 as a modbus TCP/IP client and my laptop act as server(modsim).So i need to give me the best example for that with modbus tcp/IP communication and also provide the portable Modbus TCP/IP stack so i can easily integrate into the my code.Thanks in advanced.
Hello.I have to develop a project with Riverdi STM embedded display (that uses STM32H757). In this project I have to read the USER NAME and the SERIAL NUMBER of GnuPG smart card. I started from AN4800 that is for GSM File system Smart Card but I don't understand how it works. I search on internet and GnuPG card is used by this library git.gnupg.org Git - gnupg.git/summary . Can someone support me? Someone has tried to use GnuPG card? Thankyou in advice.
Hi!I'm working with a STM32C071 and I would like to change uart1 pinout and settings runtime: I've defined USART1 (in the .ioc file) as PB2 (RX) and PC14 (TX). After boot, I would like to change the USART1 pinout as PB6 (TX) and PB7 (RX). So I've written the following:void UART_Reconfigure(UART_HandleTypeDef *huart2change, GPIO_TypeDef *newTXPort, uint16_t newTXPin, GPIO_TypeDef *newRXPort, uint16_t newRXPin, GPIO_TypeDef *oldTXPort, uint16_t oldTXPin, GPIO_TypeDef *oldRXPort, uint16_t oldRXPin) { // 1. Abilita il clock per i vecchi GPIO se necessario (PRIMA di deinizializzarli) if (oldTXPort == GPIOA || oldRXPort == GPIOA) { __HAL_RCC_GPIOA_CLK_ENABLE(); } if (oldTXPort == GPIOB || oldRXPort == GPIOB) { __HAL_RCC_GPIOB_CLK_ENABLE(); } if (oldTXPort == GPIOC || oldRXPort == GPIOC) { __HAL_RCC_GPIOC_CLK_ENABLE(); } // 2. Disabilita la UART prima di cambiare i pin HAL_UART_DeInit(huart2change); // 3. Deinizializza i vecchi pin HAL_GPIO_DeInit(oldTXPort, oldTXPin); H
Hello,Please excuse the basic question, I am reading the datasheet of stm32f429ve trying to understand which pins I need to send data from the microcontroller to an audio codec using I2S. I understand the I2S interface requires three pins, with an optional fourth pin:Bit clock, using PB13 = I2S2_CKWord clock, using PB12 = I2S2_WSSerial data, using PB15 = I2S2_SDMaster clock, using PC6 = I2S2_MCKHowever, I do not understand the function PB14 = I2S2_ext_SD. Is this dependent on whether the pin is transmitting or receiving like MOSI or MISO in SPI? I cannot find this documented anywhere which makes me think it must be obvious :)
i want to report a bug entered in the GNSS libary. in the LibNMEA in the file NMEA_parser.cin line 679: if (strcmp((char *)app[0], "$GPGST") == 0 || strcmp((char *)app[0], "$GNGST"))missing the == 0 part.and in line 734 if (strcmp((char *)app[0], "$GPRMC") == 0 | strcmp((char *)app[0], "$GNRMC") == 0)puting binary or ( | ) insted of logic or ( || ).this is only after the latast changes adding support to GN family.
Hello,I started a blank project for the STM32H743 with AzRtos, ThreadX, NetXDuo.. There is something weird with the compiler and linker, or I don't understand how to setup the project...The project compiles and runs, but the memory mapping seems to be all over the place, and I can't figure out why.There are 2 RAM sections that I want to use... RAM_D1 (axi-ram) and RAM_D2 (SRAM1). These are the current locations/size:So, I want all the data, stack, variables to go into RAM_D1 (@2400_0000) and only the ethernet Descriptors and DataPool in (@3000_0000).In the ethernet configuration, I setup the memory addresses as follows:Note: it seems the RxBuffers Address is not used anywhere (correct me if I'm wrong, but I searched everywhere in the code and could not find it being used). Anyway, the Ethernet descriptors were put at 0x3000_0000, and 0x3000_0060. Under AzureTROS settings, I allocated 40k to the NetXDuo memory pool In the Flash.Id file I made these entries:.e
Hi,I am trying to set up a basic project on a Nucleo H743ZI2 using AZRTOS ans NetX, but I can't get it to work. I am relying on this guide: https://community.st.com/t5/stm32-mcus/creating-a-dual-ipv6-amp-ipv4-netxduo-udp-application-for/ta-p/570521The only change I made was turning off IPv6 and deleting the code that manages it. However, I can't even ping the board. I also tried with the program linked in the guide, but it didn't work either. I don't think it is a problem with a board, because I tried the same thing with FreeRTOS + LWiP and it worked just fine. I am new to AzureRTOS and NetX, so I don't really know what to look for.I'd appreciate any help.
Hello,I started a new project using the H743, ethernet, LAN8742 and NetXDuo (on one of our custom boards). Its a very simple project that initializes the hardware, initializes AzRtos, ThreadX, and NetXDuo, and starts TCP, UDP, and ICMP. This project is just a base (Starting point) for much bigger projects. When connected to the network, i can ping the board, it can either use a static IP or the DHCP client.The strange part is that the software works when the clock configuration is set to 400MHz. If I try to set it to 480MHz, NetXDuo doesn't receive any packets from the network. At 480MHz, the phy is working properly and it detects (prints a line) stating the status of the ethernet cable (plugged in / unplugged). The phy is sending a 50mhz clock to the H743, so I don't understand why the MCU works at 400 but not 480. Anyway, I've been pulling my hair out trying to figure out why it doesn't work. Everything in the Clock Configuration
Hello,I am currently working on a small device with a C071GBU. This is the first time I am using a chip with shared pins (PA12/PA10 and PA11/PA9) as well as no dedicated single-function BOOT0 pin.My PCB has very tight space constraints, so software debugger or programming pads are no option - everything must work via the USB port, from first time setup on.If I understood the specsheet correctly ("Pins PA9 and PA10 can be remapped in place of pins PA11 and PA12 (default mapping), using SYSCFG_CFGR1 register"), PA12/PA11 are default (and not PA10/PA9), so a fresh chip out of the box can be used for USB DFU, am I correct in this assumption?Then there is my next question - how does BOOT0 work? If I understand correctly, the boot selector bits decide whether PA14 is BOOT0, or whether a software bit is used. The patterns in AN2606 are as follows:What I do not understand - how are the defaults? As in, if I have a fresh chip directly from the factory, how is it set up? Will PA14 operate as BOO
Hi, I am using LL_ADC_GetChannelSamplingTime() to obtain the sampling time of a specific channel but in some cases the return value seems to be incorrect. In my specific case the SMPR register has the value 0x00008046 and I call the function with channel = LL_ADC_CHANNEL_6. The function then returns 0xFFFFFE08 but I expect 0x00 (ADC_SAMPLINGTIME_COMMON_1) . After having a deeper look, it seems that smp_channel_posbit0 is not calculated correctly in this case. Can you confirm this?I am using STM32CubeMX 6.13.0 + STM32CubeU0 Firmware Package V1.2.0 and the ADC configuration is as follows: hadc1.Instance = ADC1; hadc1.Init.ClockPrescaler = ADC_CLOCK_SYNC_PCLK_DIV1; hadc1.Init.Resolution = ADC_RESOLUTION_12B; hadc1.Init.DataAlign = ADC_DATAALIGN_RIGHT; hadc1.Init.ScanConvMode = ADC_SCAN_DISABLE; hadc1.Init.EOCSelection = ADC_EOC_SINGLE_CONV; hadc1.Init.LowPowerAutoWait = DISABLE; hadc1.Init.LowPowerAutoPowerOff = DISA
Hello,I've been playing with the U585 IOT dev board and really enjoying it, I've got I2C communicating with the sensors without DMA and now I would like to test out the GPDMA. However, there is a little more too this DAM controller then the DMA on the older STM32s which is what I'm used too.I've done the bellow configuration in MX and I'm then calling HAL_I2C_Mem_Read_DMA, while HAL_I2C_Mem_Read works fine HAL_I2C_Mem_Read_DMA returns HAL ok but the data value, which should be 179 from the Who_Am_I reg of the LSP22HH, remains 0. I'm guessing my issuse is with my GPDMA config since I have not used it before. uint32_t I2C_Read(uint8_t address, uint8_t reg, uint8_t *data, uint16_t len) { return HAL_I2C_Mem_Read_DMA(&I2C_Handle, address, reg, I2C_MEMADD_SIZE_8BIT, data, len); }Another question I have is what are the callback functions I need to define for TX/RX Cplt? Cheers,Michael
Hello everyone,After successfully built the USB-C PD application with STM32U575Qll + TCPP0203 + BMS. Now I’m trying to establish USB communication between my STM32U575Qll board(USB-C) and Win10(USB2).I have created the Ux_Device_CDC_ECM project and referenced the example as below:https://github.com/STMicroelectronics/STM32CubeU5/tree/main/Projects/STM32U575I-EV/Applications/USBX/Ux_Device_CDC_ECMWhen the board has been connected to the PC(win10), the Device Manager re-flash when USB2 plug in/out. However, it’s not being recognized as any device in the Device Manager.I have checked USB-C DP/DM signal level by setting PA11/PA12 as GPIO_OutPut and checked VDDUSB(3.3V), VBUS(5V). I haven't find any hardware issue.I will be very appreciative if someone could help me on how to solve this problem.Thanks in advance.Robert
Hi,can someone help me ? I do not know how to use "HAL_TIM_RegisterCallback" function.My unsuccessful trial is in attachments. Can someone correct it ? + to attach the corrected version ?I tried this example: https://deepbluembedded.com/stm32-timer-interrupt-hal-example-timer-mode-lab/and it is working ok, but this example:https://community.st.com/t5/stm32-mcus/how-to-use-register-callbacks-in-stm32/ta-p/580499is not working - see screenshot below. .
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.