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 am using stm32f446re. i am using timer in synchronization mode one timer triggers another timer so my query is master timers triggers slave timer to generate another timer pwm so that triggers value i want to control so what hal function i use to control this triggers value while code is running then i want to change this trigger value. here is an example what i want-- lets say master generate 50% duty cycle pwm so when master is 25% of its pwm then slave gets trigger to generate its own pwm.so i want to control this 25% value. so what HAL function i use to control this value while code is running.
I'm using the STM32H7B3I-DK and having an issue I am not fully understanding. I am using the Scrolling Dynamic Graph and wanting to add some more peripherals such as SDMMC so I added a shareable region to the to my RAM.However, now whenever the graph hits about 80 data values, the screen starts to flicker in some areas that are updating.To be clear I do not have any SDMMC code in my project yet, I have only changed MPU settings to prepare for it.Below is my relevant MPU code: /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Number = MPU_REGION_NUMBER2; MPU_InitStruct.BaseAddress = 0x24000000; MPU_InitStruct.Size = MPU_REGION_SIZE_1MB; HAL_MPU_ConfigRegion(&MPU_InitStruct); /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Number = MPU_REGION_NUMBER3; MPU_InitStruct.Size = MPU_REGION_SIZE_256KB; MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE; MPU_InitStruct.IsShareable =
While recenting working on the FLASH peripheral for F2-F4-F7 devices (as their structure is pretty close), I noticed a few differences between the reference manuals and the device SVD. I'm not sure who's right and who's wrong in this situation (although I would tend to consider the RMs more reliable), but it would be great if both sources could be more coherent.So here's the list for each register (non exhaustive, there may be some I haven't seen):OPTKEYRFile named OPTKEYR in RMs while being named OPTKEY in SVD => almost all F2-F4-F7 devicesOPTCRField SPRMOD missing from SVD => 401, 411, 412, 413SRField RDERR missing from SVD => 401, 410, 411, 412, 413, 427, 429, 437, 439, 722, 723, 732, 733Field named ERSERR in RMs while being named PGSERR in SVD => 746, 750, 756, 767, 769, 777, 778, 779CRField named MER2 in RMs while being named MER1 in SVD => 765, 767, 769, 777, 778, 779Field named MER/MER1 in RMs while being named MER in SVD => 765, 767, 769, 777, 778, 779Globally
I would like to add a USB Host Driver that supports RNDIS to a project that uses Azure RTOS ThreadX.I would like a sample provided.If there is no sample, I would like some advice on development, such as how to implement it.Development environment: STM32H735G-DKAlthough a Device sample (link below) was provided, I could not find any Host sample.x-cube-azrtos-h7/Projects/STM32H735G-DK/Applications/USBX/Ux_Device_RNDIS at main · STMicroelectronics/x-cube-azrtos-h7 · GitHub
Hi,I've been trying to get a MicroSD card working with my H755 Nucleo for the last week. Tricky, isn't it?!I started with a SPI SD-card interface but gave up on that after about several days of pain. My focus now is on interfacing via SDIO, using the SDMMC peripheral on H7 and FATFS with FreeRTOS. I've tried both 1- and 4-bit mode.I have the card initialising OK in MX_SDMMC1_SD_Init(), but calls to f_mount() are failing in check_fs() (in ff.c) which returns FR_DISK_ERR (=4).I've tried multiple different cards.Interestingly I have been able to format a card, but it remains un-mountable, as well as when using an externally-formatted card.I came across https://community.st.com/t5/stm32cubemx-mcus/stm32h7-how-to-use-sdmmc-with-mdma/m-p/220163 which contains a useful PDF which aims to fill the holes in AN5200 (whoever wrote the section around Figure 14 "MDMA end of data configuration with STM32CubeMx" seems to have lost interest just as they got to the interesting and i
I am using UART Receive DMA in circular mode. I am expecting 8 bytes of data to be received on the UART from another device. Hence, I am using "HAL_UART_Receive_DMA(&UartHandle, (uint8_t *)aRxBuffer, 8)". The problem is when a burst of more than 8 bytes of data comes, it overflows to the start of the buffer. In a burst of more than 8 bytes, let's say 5 bytes more. That 5 bytes I want to ignore and don't want that 5 bytes to overflow at start and update the buffer. Please let me know the possible solution. With the present configuration, when USARTx_DMA_RX_IRQHandler is triggered, buffer has already received and overflowed data. How can we keep track that 8 bytes received and how we can avoid updating the buffer for next 5 unwanted bytesBelow is the code snippet to configure UART RX DMA: /* Configure the DMA handler for reception process */hdma_rx.Instance = USARTx_RX_DMA_STREAM;hdma_rx.Init.Direction &
Moved from this thread. Thank you very much! The projects works good while "TxHeader.DataLength" small than16. When I try to send more than 15 Bytes data, I couldn't receive any data. Could you help with me? Best Regards.
Hello there,I have created my own example to print the data on HyperTerminal (putty) following the already given example "UART_Printf" but mine is only printing the first char of the data and then stuck forever. Here is the clock config code and uart config: and what I would like to print:let me know if you need more info. Thanks,
Posted on May 12, 2016 at 12:08func HAL_DeInit(); // Reset of all peripherals does not reset EXTI block, as it is in HAL_GPIO_DeInit() /*------------------------- EXTI Mode Configuration --------------------*/ tmp = SYSCFG->EXTICR[position >> 2U]; tmp &= (((uint32_t)0x0FU) << (4U * (position & 0x03U))); if(tmp == ((uint32_t)(GPIO_GET_INDEX(GPIOx)) << (4U * (position & 0x03U)))) { /* Configure the External Interrupt or event for the current IO */ tmp = ((uint32_t)0x0FU) << (4U * (position & 0x03U)); SYSCFG->EXTICR[position >> 2U] &= ~tmp; /* Clear EXTI line configuration */ EXTI->IMR &= ~((uint32_t)iocurrent); EXTI->EMR &= ~((uint32_t)iocurrent); 
Hi community :) today for you I'm ShirleyIm using a STM32F411RE, a SIM7600G and a external eeprom 24LC1025.The SIM7600G will make requests to a web server where HEX files will be stored for the MCU firmware update. However, I noticed that initially, it sends 16 bytes of data, but at some point, it starts sending 8-byte data packets.Would there be any issue if I adjust this behavior by concatenating the data packets in groups of 16 so that I can receive them packet by packet through the SIM7600G? Then, after performing a checksum verification, I would write the data to the external memory, after that i would enter Bootloader mode and write the data to the Flash mem. Here's an example, in the highlighted line says that 8 bytes should be writen in address 08004190h and after that of the next 16 bytes, another 8 bytes should be writen in the same address, the leftover are stored in the next address.
Hello everyone, I am experiencing an intermittent memory leak issue when using LwIP on an STM32H723VG. I have an application where the Ethernet interface exchanges data periodically and over time I notice an increase in lwip_stats.mem.used and lwip_stats.mem.max, which indicates a possible memory leak. I have already reviewed the heap and stack settings, but the issue persists. Additionally, the system is configured to use D2 RAM, which is not cached, and the MPU is configured to protect certain memory regions. I would like to know if anyone has faced a similar issue and found a solution or has any suggestions on how to solve this. Here are some details of my setup: *** main.c *** /** Initializes and configures the Region and the memory to be protected */ MPU_InitStruct.Number = MPU_REGION_NUMBER9; MPU_InitStruct.BaseAddress = 0x30000000; MPU_InitStruct.Size = MPU_REGION_SIZE_32KB; MPU_InitStruct.TypeEx
Hello,i am using ThreadX and NetXduo for an ethernet applikation.For this i need several tcp connections, all with reduced mss to about 900bytes. So i configured each socket with the nx_tcp_socket_mss_set(...) function after socketCreate, as it is supposed i guess.So far so good, all things are working, also with reduced packet size in nx-pools.But to the question, i also need webserver running, and therefor it is also necessary to reduce the mss, not to overshot the packetpool-size. How is this done, for the webserver sockets, as they can't be accesses through usercode.Is it supposed to change the default mss in nx_tcp.h, as this is part of the library. I can't find any other "user" option to change mss for webserver-sockets, as to change the library-code.is there anything else?best regards
Hello Community, I'm setting up a test with NetxDuo + MQTT over TLS (aka MQTTs, port 8883) on a STM32F429NIx.As far as i see from the example available it consider a scenario where the client verify the certs provided by the server with the supplied CA.This could work, but it's not mutual-tls, while I'm trying to have a mTLS (mutual-tls ) where also the client_cert and client_key are used.I see the tls_callback function specified in the nxd_mqtt_client_secure_connect have two NX_SECURE_X509_CERT * parameter. UINT tls_setup_callback(NXD_MQTT_CLIENT *client_pt, NX_SECURE_TLS_SESSION *TLS_session_ptr, NX_SECURE_X509_CERT *certificate_ptr, NX_SECURE_X509_CERT *trusted_certificate_ptr) Always from the examples i see trusted_certificate_ptr is used for the CA, while the certificate_ptr for the cert received from the server.Then my question is: where i have to load the client certs? Have i misunderstood the certificate_ptr parameter so i have
Hi!i have a question about the use of byte pool in threadX.in the App_ThreadX_Init(VOID *memory_ptr) i have the pointer to the byte pool is given like that:UINT App_ThreadX_Init(VOID *memory_ptr) { UINT ret = TX_SUCCESS; TX_BYTE_POOL *byte_pool = (TX_BYTE_POOL*)memory_ptr; and i'm using this pointer to allocate memory for thread, queue ecc . now i'm passing the pointer byte_pool to my threads like this:tx_byte_allocate(byte_pool,&pointer,CONSOLETHREAD_STACK_SIZE, TX_NO_WAIT); tx_thread_create(&threadConsole,"console_thread",console_thread_entry,(ULONG)byte_pool,pointer,CONSOLETHREAD_STACK_SIZE,15,15,1,TX_AUTO_START);and i want to use that pointer to allocate memory with tx_byte_allocate for sending via queue pointer to data structure instead of the actual dataexample:VOID *pointer; if(tx_byte_allocate(byte_pool,&pointer,(sizeof(paramRequest_t)), TX_NO_WAIT) == TX_SUCCESS) { ((paramRequest_t*)pointer)->startParamN = 0; ((paramRequest_t*)point
hi, I'm using adc1 and adc2 in multimode dma , normally when i start it is working and reading correctly, when again im calling mx_adc1_init function it is going to error handler, i don't know why, since I'm not deinit and reinit again the peripheral, directly calling the mx_adc1_init. why it is happening like this how to restart the again. since other gpio and fdcan peripherals are working fine with same init if i calling once again. i have tried with hal deinit function also same behaviour only this time other peripherals also not working can someone suggest how to rectify this issue
Before posting, I checked against the STM32F7Cube v17.2 and this is still the same.In my application I'm using an F7 with a SDcard in 4bit mode, clocked at 50MHz.From the PC, I can read and write data. By de-layering the ST provided code and adding a read cache I have boosted read speed to ~7M/sec. Writes remain really slow. (The "pretty" HAL code with lots of function calls is really inefficient, even on a 200MHz processor, stripping out code made a improvement. The read cache was the biggest change.)The root cause of the slow write speed is single-sector writes to the SDcard and busy waiting until they are completed.The FATfs docs show this useful graphic that illustrates the problem.However, the PC asks to write in larger blocks. The USB code in HAL supports multi-packet requests, but the usbd_msc code does not use that ability. The bulk only transport (BOT) buffer is defined as a single packet, and when the PC asks to send more data, the code ignores it and only handles a single se
Hello,I WOULD LIKE TO FIND AN EXAMPLE OF CODE FOR A USB HID CONNECTION WITH A STM32F429, A SIMPLE CODE (C#)TO BE ABLE TO TURN ON AN LED IN MY SOFTWARE.BY RECOVERING A CODE IN C# THAT WORKED WITH A MICROCHIPTARGET AND BY CHANGING THE PID AND THE VID, CAN IT WORK WITH AN STM32?Best regardsSébastien
Hi forumI have a custom PCB with STM32F407 and a PHY+switch KSZ8863RLL. I am using CubeMX and cubeide, also LWIP. The physical connections have been verified by Microchip schematic- and board support program.Instead of using MDIO to interface the PHY, I am using I2C (needed to access the advance registers, and also discussed: https://community.st.com/t5/stm32-mcus-products/eth-anybody-used-ksz8863rll/td-p/645122/page/3).The switch part is functioning probably and I can successfully read and write registers. But I do not have a working ping up and running, yet. I can't measure any activity on RX/TX lines on the RMII interface.My understanding is that i need to modify the LAN8742 driver, which is default by Cubemx. When debugging I come across this part:in the ethernetif.c file.My question is, is it enough to rewrite the writeRegister, ReadRegister, Init, etc: to use I2C instead of the MDIO?Also, is it through the RMII interface that the MAC address of the STM is written (didn't fin
I have basic application of tcp_server. void tcp_echoserver_init( uint16_t port) { tcp_echoserver_pcb = tcp_new(); if ( tcp_echoserver_pcb != NULL) { err_t err; /* bind echo_pcb to port (ECHO protocol) */ err = tcp_bind( tcp_echoserver_pcb, IP_ADDR_ANY, port); if (err == ERR_OK) { /* start tcp listening for echo_pcb */ tcp_echoserver_pcb = tcp_listen( tcp_echoserver_pcb ); /* initialize LwIP tcp_accept callback function */ tcp_accept( tcp_echoserver_pcb , tcp_echoserver_accept); } else { /* deallocate the pcb */ memp_free(MEMP_TCP_PCB, tcp_echoserver_pcb ); } } } static err_t tcp_echoserver_accept(void *arg, struct tcp_pcb *newpcb, err_t err) { err_t ret_err; struct echoserver *es; LWIP_UNUSED_ARG(arg); LWIP_UNUSED_ARG(err); /* set priority for the newly accepted tcp connection newpcb */ tcp_setprio(newpcb, TCP_PRIO_MIN); /* allocate structure es to maintain tcp connection informations */ es = (struct ec
Dear Experts,I need your help to configure the clock using CMSIS. I am using Nucleo 64 board of STM32F411RE. Steps I have followed:-1. Enable PWR CLK.2. SET VOS value to 3.3. Enable Prefetch, Instruction cache, Data cache.4. Set Flash Latency 3WS.5. SET HSE Bypass.6. Enable HSE CLK.7. Wait for HSE RDY Flag.8. Set PLL Prescaler values.9. Enable PLL.10. Wait for PLL RDY Flag.11. Select System CLK as PLL.12. Check status of System CLK Source. (SWS bits)13. Set APB1 Prescaler to div 2.14. Disable HSI CLK. /** ****************************************************************************** * @file : main.c * @author : Auto-generated by STM32CubeIDE * @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 directo
int loopTime = 0, maxLoopTime = 0;/* Private function prototypes -----------------------------------------------*/void SystemClock_Config(void); int main(void){ /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* Configure the system clock */ SystemClock_Config(); /* Initialize all configured peripherals */ MX_GPIO_Init(); MX_DMA_Init(); MX_ADC1_Init(); MX_ADC2_Init(); MX_COMP1_Init(); MX_COMP2_Init(); MX_COMP4_Init(); MX_DAC3_Init(); MX_OPAMP1_Init(); MX_OPAMP2_Init(); MX_OPAMP3_Init(); MX_TIM1_Init(); MX_IWDG_Init(); MX_I2C3_Init(); /* USER CODE BEGIN 2 */ SystemManager_Start(); /* USER CODE END 2 */ /* Infinite loop */ /* USER CODE BEGIN WHILE */ while (1)
I Enabled LWIP DEBUG options in CUBEMXin lwipopt.h /* USER CODE BEGIN 1 */ #define LWIP_DEBUG 1 /* USER CODE END 1 */ in main.c int __io_putchar(int ch) { ITM_SendChar(ch); return ch; } But I am not getting anything in SWVITM Data Console
I am a novice, would like to ask if anyone will write a set of library files only for a single model of microcontroller because of the bloated official library files, is this common? For example, I was looking at the stm32h7 series recently, and the idea came to me because the layers of hal library nesting were very annoying.
hey,I am trying to figure out how to implement mcu-boot on an stm32l4I wanna have mcu-boot to be able to flash it over uart, but I cant find any documentation on how to implement mcu-boot on an stm32L4Are there any existing documentation or examples on this?
Hello, I have configured usb hs as msc, this is with uSD card. Drive for card is appearing and add/ copy files to card via drive also works. but recently when I added files with more than 500 lines (in csv), I see data is shifted, some corruption is happening. please suggest any settings or steps to avoid this.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.