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
Hi all, I am currently running tcp echo client example code from st on a NUCLEO-H563ZI which I have got working send and receiving messages over TCP/IP I am trying to get nx_tcp_socket_receive_notify working however when I use the function and connect to the server the callback is never called when the server sends a message any ideas why its not would be great I have attached the code to give a better idea of what I am doing. volatile int data_received_flag = 0; static VOID App_TCP_Thread_Entry(ULONG thread_input){ UINT ret; UINT count = 0; ULONG bytes_read; UCHAR data_buffer[512]; ULONG source_ip_address; UINT source_port; NX_PACKET *server_packet; NX_PACKET *data_packet; /* create the TCP socket */ ret = nx_tcp_socket_create(&NetXDuoEthIpInstance, &TCPSocket, "TCP Server Socket", NX_IP_NORMAL, NX_FRAGMENT_OKAY, NX_IP_TIME_TO_LIVE, WINDOW_SIZE, NX_NULL, NX_NULL); if (ret != NX_SUCCESS){ Error_Handler(); } /* bind the client socket
Hi, I have written below application. When manager task is scheduled for the 2nd time, the xStatus and xWorkTicketId get strange values as seen below. When employee task is scheduled, xStatus gets "0" which indicates no variable in the queue waiting. This behaviour is strange, because there is variable in the queue. Could you please help me sort out the issue ? Thanks. /* 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 is provided AS-IS. * **********************************************************
Hi everyone!I'm using a NucleoWB55 and the LPUART protocole to communicate with a SIMCOM module. I'm able to send via the LPUART the AT commands that I want and to receive it's answers. I'm now trying to print on my terminal the content of my web page. I connected a USB to TTL (CP2102 module) to observe the UART RX of the SIMCOM module. The module transmits the entire content of the web page but I can't get it on my STM32 via LPUART. To make it easy to understand here are some screenshots : Here is the terminal where I transmit via UART the received data:Here is the terminal where the transmit data of the SIMCOM module is connected: We can see the entire content of the web page.Finally the interesting parts of my code : Commands and reception buffers: I presume there's a problem in receiving and displaying the data received. I know my "received" buffer
Hi,We are using STM32F072RBT6 in our project.We have configured the SPI1 in Slave mode(8bit/16bit) in-order to receive the input stream @1Mbps with 64bytes frames.we have observed that the FIFO full and overflow is happening @Spi slave while receiving the data stream @1Mbps.Pl provide inputs in this regard.
Hi,Does any one how to make pbuf’s be in a certain memory range?For example when I call pbuf_alloc(PBUF_RAW, PBUF_POOL_BUFSIZE, PBUF_POOL) it will allocate a pbuf from a pool that is contained in this array memp_memory, is there a better way/proper way to do this no how I did.memp.c:.... /** This is the actual memory used by the pools (all pools in one big block). */static u8_t memp_memory[MEM_ALIGNMENT - 1#define LWIP_MEMPOOL(name,num,size,desc) + ( (num) * (MEMP_SIZE + MEMP_ALIGN_SIZE(size) ) )#include "lwip/memp_std.h"] __attribute__((section(".my_mem")));....I just added __attribute__((section(".my_mem"))), in my linker scrip I have that section tied to an absolute address.And I'm using lwIP 1.4.0. Best regards,Alex
Hi all, I was wondering is there was a function pack or GitHub repo anyone has found which indicates how to implement CDC USB communication from the SensorTile.box PRO to a PC in STM32CubeIDE? Thank you in advance.
Hi,I found issue in STM32F4xx_DSP_StdPeriph_Lib_V1.9.0 when I test serial port communication. "\r\n" simple missed when get received data. I try STM32F4xx_DSP_StdPeriph_Lib_V1.4.0 run same code works fine, so I do some research about what's changes between these versions.After research I found code logic difference in "GPIO_ResetBits" and "GPIO_WriteBit" function between two versions. Please look follow image:V1.4.0V1.9.0I understand that you use 32bits parameter to replace old version two 16bits parameter, but in current code only saved high or low BSRR value, not both of them.I change your code like follow image, then serial port works fine in V.1.9.0, please take a look green rectangle part:I wonder is this a bug or not? If this is a bug, could you please fix this in next version?
I'm just using whatever USB device library comes with my latest Cube setup. How do I find out which device library version I have, and change that (either get the latest version or roll back to a previous version)? Is there a doc that explains this?[ FWIW, the USB device library does not show up as a package in the CubeMX repository manager ]Thanks
I can not find stm32cube_fw_h7_v1.11.0 in the official website, where can download, ask stm32cube_fw_h7_v1.11.0.zip!!!
I'm trying to use the SD-Card on the STM32H7B3I-DK with FatFS, but the transfers from the card do not work if the D-Cache is enabled.There are a number of other posts that report similar with this one looking most similar (and has a solution).I have enabled cache management and the scratch buffer:#define ENABLE_SD_DMA_CACHE_MAINTENANCE 1#define ENABLE_SCRATCH_BUFFERHowever, the card still does not work if I enable the D-Cache.What else do I need to look at?
Hello,I'm currently trying to set up an SD-card driver for the STM32H750. I've following code right at initialization.The driver code is from:https://controllerstech.com/interface-sd-card-with-sdio-in-stm32/Unfortunately, it doesn't work reliably. With D-Cache enabled, only the first file "FILE1.TXT" is created when powering on, but without content.If the board is in operation and the card is empty, and I just do a reset, both text files are created with content.In following link it explains to change the "win element" in the struct FATFS and change something to aligned, but unfortunately there is no example code.https://yairgadelov.me/setup-sdcard-on-stm32-mcu/I lack a deep understanding of this cache issue, and the STM32 application notes does not really helped me (to complicated). What else needs to be adjusted to make it work reliably? I can't find any example code for STM32H750 or 745.Thank yousd_diskio.c: /* USER CODE BEGIN enableSDDmaCacheMaintenance */ #define ENABLE_
Hello,Is there any documentation or source code to use ULPL with USB3343? Even I am not cleared USB3343 chip could be used for external High-Speed USB support to STM32F407. Or suggest me any chip with low complexity, I aim to achieve high-speed data transfer from PC to Memory to stream ADC Data and DAC data.
Hi,I found wrong code at STM32F4xx_DSP_StdPeriph_Lib_V1.9.0\Libraries\CMSIS\Device\ST\STM32F4xx\Include\stm32f4xx.h file. Please see follow image:This part code will cause incompatible redefinition of macro warning and maybe another issues. I think these codes in red rectangle should change as follow image:
Dear Experts,I need your assistance. I am attempting to change the memory address of DMA2 during runtime. I am streaming ADC data through UART. The ADC operates at 10MSPS using Timer1, and the tim1_up event triggers DMA2 Stream5 in circular mode. My buffer is data_buf[16384], and initially, I set the ADC to write data on the next half of data_buf[8192] to data_buf[16384].My UART uses DMA2 Stream7 to transmit a full buffer from data_buf[0] to data_buf[16384]. Once the Half Transfer Complete Callback is received from the UART, I need to change the memory address and set it to the upper half of data_buf[0] to data_buf[8192]. This way, the ADC can write data on the upper half. Once the Transfer Complete Callback is received from the UART, I need to change the address and set it from data_buf[8192] to data_buf[16384].However, I cannot change the address of the DMA2 Stream5 memory, even after disabling it by resetting bit 0 of the Stream Control Register. /* USER CODE BEGIN Header */ /*
Hi,I'm struggling with recording audio on STM32F411-disco (MB1115D) board.I'm trying to run dedicated to this board example (Audio_playback_and_record), but out of the box it just doesn't work - recorded file is all silence.I've spend quite amount of time on that, and after borrowing logic analyzer, I found that, microphone do not output any data - looks like clock is too low. Audio_playback_and_record example uses 16Khz audio sampling, when I increase it to 48Khz by changing below line:#define DEFAULT_AUDIO_IN_FREQ I2S_AUDIOFREQ_48KIt kinda start working, there is finally some sound being recorded but there is also a lot of glitch there.Overall quality is very low.Given, that do I miss something here? I was expecting that it will be super easy weekend project since I have my board, my PDM mic on it and examples but reality isn't that beautiful :face_with_rolling_eyes:Attaching the recording, Thanks in advance.
Hello ST Community, I am researching the possibility of using ZeroMQ on a STM32 MCU device. Currently, we are targetting the STM32H5 series of processor, using Azure RTOS/NetxDuo. From the looks of it, ZeroMQ is a socketed implementation, so it would reside in whatever software package maintains the TCP/IP stack. Any ports available out there? Or documentation on using ZeroMQ in Azure RTOS/NetXDuo? Am I barking up the wrong tree?
I use stm32h743 with lwip. tcp and udp work fine respectively. but, Running tcp and udp at the same time breaks the communication aperiodically, and display Assertion "pbuf_free: p->ref >0" failed at line 747... stm32cubeH7 example is the same. but stm32F7 is good working without problem. I think stm32cubeH7 example is flawed.
I'm trying to build the example project "Tx_Thread_Creation" for the NUCLEO-F429ZI. During the build process with the MDK-ARM (uVision) V5.28.0.0 toolchain I got the following linker errors:linking... Tx_Thread_Creation\Tx_Thread_Creation.axf: Error: L6218E: Undefined symbol __RAM_segment_used_end__ (referred from tx_initialize_low_level.o). Tx_Thread_Creation\Tx_Thread_Creation.axf: Error: L6218E: Undefined symbol _vectors (referred from tx_initialize_low_level.o). Tx_Thread_Creation\Tx_Thread_Creation.axf: Error: L6218E: Undefined symbol g_pfnVectors (referred from tx_initialize_low_level.o). Not enough information to list image symbols. Not enough information to list load addresses in the image map. Finished: 2 information, 0 warning and 3 error messages. "Tx_Thread_Creation\Tx_Thread_Creation.axf" - 3 Error(s), 0 Warning(s). Target not created. Build Time Elapsed: 00:00:03I also tried to build the same project with the STM32CubeIDE Ver. 1.8.0 toolchain. The build process finished s
Hello ST Community,I'm developing a USB CDC communication project on an STM32L476RET6 microcontroller, using STM32CubeIDE. While I can successfully receive data from a PC using PuTTY, I'm facing a challenge with transmitting data back to the PC using the CDC_Transmit_FS function.Environment:MCU: STM32L476RET6IDE: STM32CubeIDEUSB Configuration: Configured as a CDC Virtual COM PortOS: Windows 10Issue Description: Data reception from the PC works flawlessly. However, when attempting to transmit data back using CDC_Transmit_FS, the function seems to never complete. The code gets indefinitely stuck waiting for hcdc->TxState to reset to 0, which, based on my understanding, should happen via an interrupt once the transmission completes.Troubleshooting Done:Confirmed correct USB descriptor configurations.Debugged to pinpoint that the halt occurs during data transmission, specifically waiting for hcdc->TxState to reset.Questions:Are there any known issues with USB CDC on STM32L476RET6 tha
Hello,We have switched from STM32g071 128kb flash to stm32g0b1rct6 with 256kb flash.We are able to flash the application binary from ST-LINK in STM32 cubeprogrammer. but, not via UART protocol.We are using the default STM32 system bootloader. We have used option bytes to force the MCU to jump to bootloader and start flashing via UART in STM32Cube programmer. But, we are not able to connect the stm32 Cube programmer tool to MCU. the command 0x7F is being sent from the Cubeprogrammer ,but there is not response from the new MCU. So, flashing sequence is not staring.I would really appreciate, if I can get some help to solve this issue.Thanks in advance.
Hi all, I am successfully transferring from a memory location to the data register of USART2 Tx using DMA operation. And the USART2 has been used by the printf() to output to the PC. What I don't understand is, what moderates the rate at which DMA moves data from memory location to the Tx data register? Obviously, data cannot be moved to Tx data register faster than it can transmit, otherwise there would be overwrite errors. Nor should the data be moved at a much slower speed than the Tx can handle, otherwise time would be wasted.So what is the mechanism that moves the data to Tx data register at just the right rate? I did not set any Tx transmit complete flags or ISRs to indicate to the DMA the completion of the last transmission out of the Tx data register. Thanks in advance for your help and explanation!
Hey, i have ported the iperf2 example(https://github.com/STMicroelectronics/STM32CubeH5/tree/main/Projects/NUCLEO-H563ZI/Applications/NetXDuo/Nx_Iperf) of the H563 board to the H573i-DK Board.It pretty much works as expected now, but the TX performance is a little bit poor. I expected >95Mbit/Sec for all tests. I got the following results (I ran each test about 10 times and took the average values). - TCP TX: 85.00 Mbits/sec- TCP RX: 93.41 Mbits/sec- UDP TX: 95.20 Mbits/sec- UDP RX: 99 Mbits/sec Executed Commands on the host system (Ubuntu22.04, iperf version 2.1.5 (3 December 2021) pthreads)- TCP TX: `iperf -s`- TCP RX: `iperf -c 192.168.1.101`- UDP TX: `iperf -s -u`- UDP RX: `iperf -c 192.168.1.101 -u -b 200M` I'm currently trying to benchmark another setup with modified ethernet settings and got even poorer results for TCP TX.Because of that I'm wondering whats the bottleneck here. Is it the CPU?I'd appreciate any hints or suggestions on how to fin
Hi all,I am trying to implement the SPI Slave Mode using a circular DMA. I am using the STM32U5A5 as my slave device. The SPI master is sending packets of unknown length at 2 MBit/s over SPI which I want to receive and process. Additionally, I want the packets to be synchronized to the Chip Select. Basically, I want each CS phase to be one packet.My concept is to have my CS signal on an external interrupt, which triggers both on the falling and rising edge. This way I can store the start index and the end index of the DMA buffer to my chips select packet. When chip select is de-asserted (i.e. chip select goes high) I then raise a flag that my data is ready. In my Process task loop I then process only this chunk of data from the start index to the end index of the DMA.This is my EXTI function: void EXTI8_IRQHandler(void) { /* USER CODE BEGIN EXTI8_IRQn 0 */ HAL_GPIO_WritePin(DEBUG_1_GPIO_Port, DEBUG_1_Pin, 1); if(HAL_GPIO_ReadPin(CS_EXTI8_GPIO_Port, CS_EXTI8_Pin) ==
Hello,I am developing a USB PD sink product using STM32G0B1VET6 MCU.I have a project in CubeIDE, created proof-of-concept code following ST tutorial Getting started with USB-Power Delivery Sink and everything works as expected.I then tried to transfer all of the code into my project (outside of CubeIDE) and it's not working. See the attached traceThe events go as follows:Source advertises SRC_CAPABILITIESSink requests PDONo answer, sink repeats request 3 more timesSink requests PE_STATE_SEND_SOFT_RESETSometimes, source answers, usually notAfter 4 attempts ad soft reset, sink requests hard reset.Repeat indefinitelyI suspect the sink isn't actually sending any data out.I tried sniffing the PD bus, and indeed, there is no communication going from sink to source. Maybe something went wrong, when moving the code to different project. Maybe I forgot something.How do I debug this?
I have problems in getting this working. I moved from FreeRTOS to Azure RTOS, and I found out that in general there's lot less information on this RTOS. So I've been looking into the few resources, but I'm afraid I'm missing some important points. Articles in knowledge base show how to manage low power mode in ThreadX, but don't cover tickless mode (while an article about tickless mode is available for FreeRTOS). Examples in CubeMX repository are very simple. I also don't have much experience on STM32U5, and this doesn't help... I'm using CubeMX and HAL functions, IDE is STM32CubeIDE (current versions). Here's the problem:I'm using ThreadX kernel running at 1 kHz, low power and tickless mode enabled. Two timers, one every 10 ms and another every 250 ms. RTC is interrupting every second, DMA2D interrupt also firing when LCD is updated. TDC is used for the LCD. Threads are waiting on events to perform some actions.Here are partial definitions of the functions related to low power managem
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.