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 everyone, I use the button to hold the Semaphore in this task, when I press the button the Semaphore is released, but the error I get is that the button is not pressed but the Semaphore is automatically releasedplsss help me, thank so much
I am writing my own context switcher. I have a couple LED blink tasks for testing. It works fine when the tasks don't call any functions. Everything is inline. But when I include some function calls in the tasks and I get a context switch while in one of these functions, upon returning from the function my SP switches from the PSP to the MSP. I am thinking it my have something to do with the pipelines. Not sure. Follow-up questions welcomed.
Hello,I'm trying to interface to the FTDI FT2232H chip in FT245 Style asynchronous FIFO Mode to get a higher throughput over USB without needing to mess with the USB stack. I'm looking to get around 5MB/s throughput ultimately. Planning to use asynchronous as it's a bit easier. I'm having trouble trying to figure out what configuration i should use in FMC in order to get this going? It seems all i need is an 8 bit address bus, read strobe, write strobe and buffer full/empty (from https://ftdichip.com/wp-content/uploads/2020/08/TN_167_FIFO_Basics.pdf) I'm getting quite confused with the PSRAM,NAND,SDRAM configurations.Any advice is appreciated.Thanks!
Using STM32G0 with zephyr on a board that has motion sensor, flow sensor, Quectel BG770 modem and Quectel FC41D modem. Modem power is controlled by the switch which is being turned off for sleep and various other peripherals are also being disabled but the power consumption won't fall below 950uA. This is my first project using SMT32 on zephyr so I am no expert and need help! void enterLowPowerMode(void) { int err = 0; //TODO - implement low power mode // modem_disconnect(); modem_onOff(false); wifi_powerOnOff(false); GXHT3x_LowPower(); // err = pm_device_action_run(motionI2c, PM_DEVICE_ACTION_SUSPEND); // err = pm_device_action_run(tempI2c, PM_DEVICE_ACTION_SUSPEND); //I2C pins have external 47K pull ups err = gpio_pin_configure(wifi_gpioa_dev, 10, GPIO_DISCONNECTED); //i2c sda err = gpio_pin_configure(wifi_gpioa_dev, 9, GPIO_DISCONNECTED); //i2c scl // err = gpio_pin_configure(wifi_gpioa_dev, 10, GPIO_INPUT | GPIO_PULL_UP); //i2c sda // err = gpio_pin_confi
To implement Ethernet communication on the STM32F746 Nucleo board where the Hercules software acts as a TCP server, and the STM32 board (acting as a TCP client) sends a string to control an LED on PB7, same as off string send server recevie the client than pb7 led is on. .section .text.Default_Handler,"ax",%progbitsDefault_Handler:Infinite_Loop:b Infinite_Loop.size Default_Handler, .-Default_Handlercode is run server on string send client is receive the on string but pb7 led is not on
Hi, I'm trying to transmit Ethernet frame received by STM32H7[0] (passed this packet via serial) to STM32H7[1] to output on STM32H7[1] Ethernet. Ethernet packets input and output operates well if I act just with single controller, but looks like Ethernet packets can't passed to out.I think the problem on STM32H7 hardware MAC configuration as I've tried to pass Ethernet packets with differ hardware address .My efforts to configure Ethernet HAL gave no result: ... FilterConfig.PromiscuousMode = 1; FilterConfig.HashUnicast = 0; FilterConfig.HashMulticast = 0; FilterConfig.DestAddrInverseFiltering = 0; FilterConfig.PassAllMulticast = 0; FilterConfig.BroadcastFilter = 1; FilterConfig.ControlPacketsFilter = 0x03; FilterConfig.SrcAddrInverseFiltering = 0; FilterConfig.SrcAddrFiltering = 0; FilterConfig.HachOrPerfectFilter = 0; FilterConfig.ReceiveAllMode = 1; HAL_ETH_SetMACFilterConfig(&EthHandle, &FilterConfig); ... Praying
Hi Folks, I am implementing a HAL/DMA UART TX / RX Routine that waits in a state machine for a line-idle interrupt, parses the inputs and immediately responds to the output.The routine needs to work flawlessly, and if a UART error occurs, it needs resolving ASAP.I think the best (safest) approach is a simple catch-all where if any UART error occurs (via the HAL_UART_ErrorCallback) then the firmware will simply disable/reinitialise the USART entirely.Will such a simple "catch all" reset address:HAL_UART_ERROR_PE, HAL_UART_ERROR_NE, HAL_UART_ERROR_FE, HAL_UART_ERROR_ORE, HAL_UART_ERROR_DMA, HAL_UART_ERROR_RTO?I would rather do this than identify individual conditions and resolve them individually.Does anyone see any issues with this simplistic approach?regards
HiI'm fighting with stm32f107vct to work with external PHY LAN8720.After many tries running it on FreeRTOS with lwIP I decided to start it over.I disabled freertos and lwIP.In CubeIDE I’m enabling only ETH, changing addresses of registers (since IDE doesn’t set it properly), changing PHY address.When I’m debugging, during initializing ETH BSR register (adress 1) = 30729 (0b0111100000001001)Corresponding to the data sheet it’s proper value, so I consider that MAC is communicating with PHY 0b0111100000001001 Now my problem is that after connecting cable (rj45) I’m not getting bit responsible for link on (BIT 2).LEDs aren’t blinking and after connecting a logic analyzer I do not see any activity.maybe I will try it tomorrow with a oscilloscope.On ETH_XTAL1 line I can see stable 50Mhz clock. ETH_XTAL1 is also clocking MAC. My schematic and BSR
Hello I'm developing RTOS environment of dual-core in STM32H757. An error occurred while transfering the data from CM4 to CM7, and I didn't think the EndPoint was fully created, so the value of variable "status" checked, and the value is greated than 0. Is the variable and creation of EndPoint irrelevant? <Flow> 1. CM7 & CM4 : EndPoint and OpenAMP initialized (status ≥ 0). 2. CM7 : Function MAILBOX_Poll() is circling an infinite loop in the function OPENAMP_Check_for_message() within function receive_message(). / CM4 : Waiting for the flag status. 3. [Send error from CM4 to CM7] CM7 : The same condition as '2.' / CM4 : Function OPENAMP_send is returning RPMSG_ERR_ADDR because dest_addr is equal to RPMSG_ADDR_ANY. Any help is greatly appreciated! # The code in rpmsg.h file. # Terminal results Friendly regards, Tau
Both X-CUBE-EEPROM and STSW-STM32117 (AN4061 - for STM32F0) use "Virtual Addresses" in the emulated storage: But nowhere explains how these "Virtual Address" numbers are determined/decided.It seems to me that (apart from 0x0000 and 0xFFFF being reserved)*, the choice is completely arbitrary - is that right?The examples use "sparse" virtual address values - is there any advantage in doing that ?Would there be any benefit in choosing values with maximum spacing - more "entropy" ? EDIT:* Both 0x0000 and 0xFFFF are reserved by X-CUBE-EEPROM;Only 0xFFFF is reserved by AN4061 (presumably also by AN2594, AN3390, AN4056, and AN3969?)
Hi,I have been trying to trigger a RAM ECC error for testing. I have referenced the code Here. However, I cant trigger an ecc error.The plan is to read uninitialized ram as mentioned in AN5342. I am using SRAM(1-3) (Mem address 0x30000000 - 0x30047FFF). Please find the code snippet below. RAMECC_HandleTypeDef hramecc2_m1; RAMECC_HandleTypeDef hramecc2_m2; RAMECC_HandleTypeDef hramecc2_m3; RAMECC_HandleTypeDef hramecc2_m4; RAMECC_HandleTypeDef hramecc2_m5; #define SRAM_3_START (char*)0x30040000 #define SRAM_3_END (char*)0x30047FFF #define SRAM_2_START (char*)0x30020000 #define SRAM_2_END (char*)0x3003FFFF #define SRAM_1_START (char*)0x30000000 #define SRAM_1_END (char*)0x3001FFFF static void MX_RAMECC_Init(void) { /* USER CODE BEGIN RAMECC_Init 0 */ /* USER CODE END RAMECC_Init 0 */ /* USER CODE BEGIN RAMECC_Init 1 */ /* USER CODE END RAMECC_Init 1 */ /** Initialize RAMECC2 M1 : SRAM1_0 */ hramecc2_m1.Instance = RAMECC2_Monitor1; if (HAL_
Hello all,I am testing low power mode 2 using ThreadX but having a bit of a problem when waking up. I have generated a simple test, there is one task running blinking a led every second for 10 secs and then sending the MCU to low power mode 2, until this point all works okay.I have got a button that will wake up the MCU by an interrupt when it is pressed and the unit should go and start blinking the LED every 1 sec for another 10 secs.The MCU comes out of mode 2 when the the button is pressed but I am having a problem with the clock configuration when waking up, the led flashes at around 6 secs after waking up instead of every 1 sec.Main routine:VOID LED1_thread_entry(ULONG initial_input) { uint8_t counter = 0; while(1) { HAL_GPIO_TogglePin(LED1_GPIO_Port, LED1_Pin); tx_thread_sleep(1000); counter++; if(counter == 10) { counter = 0; Enter_LowPower_Mode(); } } }This is my routine that put the MCU into low power mode 2: void Enter_LowPower_Mode(void) { HAL_GPIO_Wr
Good evening all community members,I am using STM32F4 board. My current project has multiple .c files to have a modular approach. ADC files is working on its own interrupt and another file called gpio file working on timer2 interrupt. I got a sensor's value from ADC and i want to use this value in gpio file. Trying my best, i am not able to share adc variable's data to gpio file. Request if someone could guide me what is it that I am doing wrong here??regards and thanks...!
Hello,I am having a problem with the Azure USBX MSC libraries. The version I am using is ### V6.2.0 (23-12-2022) ###. The microcontroller is STM32U545.If I connect the device to a computer with windows 7, the msc memory is mounted correctly and I can access both reading and writing. If instead I connect the device to windows 11, the hard disk icon is displayed but I have no way to access the resource and after a few minutes a hard fault occurs. In debug mode I saw that the driver crashes bouncing between the state: UX_SLAVE_CLASS_COMMAND_ACTIVATE and the state UX_SLAVE_CLASS_COMMAND_DEACTIVATE present in the file _ux_device_class_storage_entry.cHow can I solve it? Do I need a particular driver for windows 11?Thanks
Hello,I’m designing a custom bootloader for the STM32F103 series, and I’m looking for alternative memory regions to store the bootloader instead of using Flash memory.The reason I don’t want to use Flash memory (starting at 0x08000000) is that I want to allocate the entire Flash space for the user's application code. This way, we avoid the need to modify the linker file each time we flash new application code using Cube IDE.I’ve considered using SRAM, but since it’s volatile, I’m not sure if it’s a reliable solution for bootloader storage. Are there any other memory options or techniques I can explore to store and execute the bootloader reliably?You can also suggest me a diff board / series than STM32F103.Thanks in advance for your advice!
Good morning, I'm writing to ask about the missing "Hardware flow control" option on our new H7S3L8 board..We are trying to migrate a project from an F756ZG which did almost everything well (aside from the debugger). However, we're having an issue with our RS485 connections, which require a "DE" (driver enabled) signal :Here's the F7 UART7 configuration (with the Hardware Flow Control option)We tried to implement it ourselves, thinking it would just require an extra GPIO output and the following logic : HAL_GPIO_WritePin(TX_EN_GPIO_Port, TX_EN_Pin, GPIO_PIN_SET); HAL_UART_Transmit(&huart7, data, strlen (data) , 1000); HAL_GPIO_WritePin(TX_EN_GPIO_Port, TX_EN_Pin, GPIO_PIN_RESET); But right now we're having issues communicating with our sensors (we're going through a MOD-RS485 board)Does anyone know if the H7S3L8 will eventually get the feature, is it something that can easily be done manually... or should we give up and move to a different H7 variant? (lik
HiWe have some custom hardware which we’re commissioning.It contains a MMC Device which we’re trying to get working with a Microcontroller.Currently operation fails at the MMC initialisation stage.I wonder if you could help us, please? The MMC device is a Swissbit SFEM032GB2ED1TO-A-5E-111-STD(which advertises itself as JEDEC e·MMC 5.1 compliant) The Microcontroller is a STM32F407IGT(which says “an SD/SDIO/MMC host interface is available, that supports MultiMediaCard System Specification Version 4.2 in three different databus modes: 1-bit (default), 4-bit and 8-bit.) Please can you tell us whether this combination of Microcontroller and MMC Device should work together in principle, or whether we’ve made a major mistake (in which case any recommendations in terms of a different MMC Device to try [ideally pin compatible])? Many thanks in advanceDave
Hello, I am trying to interface the sdcard FAT32 based on SPI with STM32F429ZI MCU. I am using the FATFS library (R0.12c) provided in the stmcube ide. I am able to successfully initialize the sdcard using f_mount() function. I want to implement the below mentioned code. f_open is sending the FR_OK response that means file is opened successfully but f_lseek command is not responding correctly. fres = f_open(&fil,"HEADER.TXT", FA_READ | FA_OPEN_EXISTING); if(fres == FR_OK) { fres = f_lseek(&fil,2); fres = f_read(&fil,&temp,3, &ptr); fres = f_close(&fil); } It is also came to my notice that when I send the command fres = f_lseek(&fil,0); then it responds FR_OK. Any non zero value in f_lseek function responds to the FR_INIT_ERROR. During Debugging: in my case ofs =2 bcs = (DWORD)fs->csize * SS(fs); /* Cluster size (byte) */ --> this line results in bcs= 0 since the fs_csize is 0 ofs -= bcs; fp->fptr += bcs; --> Due to bcs=0 this line do
Hi, I am using sprintf to format data before sending it over a UART. STM Cube IDE 1.16.1STM32F103 The code works in one project but not in another. I have ticked "Use float with printf in MCU/MPU Settings"int size = sprintf(&Buffer,"{\"src_addr\":\"%s\",\"PDOP\":%5.2lf,\"HDOP\":%5.2lf,\"VDOP\":%.2lf,\"Volts\":%.2f}\n", "2", pdop, hdop, vdop,Volts);for some reason the code end up in syscall.cvoid _exit (int status) { _kill(status, -1); while (1) {} /* Make sure we hang here */ }
HiIm trying to set the speed for ethernet to 10Mbps, usingHAL_ETH_SetMACConfig()static void MX_ETH_Init(void) { /* USER CODE BEGIN ETH_Init 0 */ /* USER CODE END ETH_Init 0 */ static uint8_t MACAddr[6]; /* USER CODE BEGIN ETH_Init 1 */ /* USER CODE END ETH_Init 1 */ heth.Instance = ETH; MACAddr[0] = 0x00; MACAddr[1] = 0x80; MACAddr[2] = 0xE1; MACAddr[3] = 0x00; MACAddr[4] = 0x00; MACAddr[5] = 0x00; heth.Init.MACAddr = &MACAddr[0]; heth.Init.MediaInterface = HAL_ETH_RMII_MODE; heth.Init.TxDesc = DMATxDscrTab; heth.Init.RxDesc = DMARxDscrTab; heth.Init.RxBuffLen = 1536; /* USER CODE BEGIN MACADDRESS */ /* USER CODE END MACADDRESS */ if (HAL_ETH_Init(&heth) != HAL_OK) { Error_Handler(); } memset(&TxConfig, 0 , sizeof(ETH_TxPacketConfigTypeDef)); TxConfig.Attributes = ETH_TX_PACKETS_FEATURES_CSUM | ETH_TX_PACKETS_FEATURES_CRCPAD; TxConfig.ChecksumCtrl = ETH_CHECKSUM_IPHDR_PAYLOAD_INSERT_PHDR_CALC; TxConfig.CRCPadCtrl = ETH_CRC_PAD_INSERT; /*
Hi,Im starting a new application on a custom board with a STM32H753ZIT, i see when added the FATFS lib from middleware the version of elmchan version is the R0.12c but i see also in the git of the stm32 STM32 FATFS GIT a release of the R0.15 but in the configurator i cant select the R0.15. There will be soon any update on the stm32cube sw to show this version of the fatfs in the short time?
I have created a CPP critical section class using stm32_lock_acquire and stm32_lock_release. The main issue is in stm32_lock.h the file #include <cmsis_compiler.h>. The stock version of this file, included with CubeMx won't work if included in a c++ file. Investigating, I found that if I move the cmsis_compiler.h include in to the extern "C" block, it works just fine. Am I misusing stm32_lock? or is this a suitable way to create a critical section in cpp?Before change - won't compile because cmsis_complier.h or something it includes cannot complied with a c++ compiler.#ifndef __STM32_LOCK_H__ #define __STM32_LOCK_H__ /* Includes ------------------------------------------------------------------*/ #include <stdint.h> #include <stddef.h> #include <cmsis_compiler.h> #ifndef STM32_THREAD_SAFE_STRATEGY #define STM32_THREAD_SAFE_STRATEGY 2 /**< Assume strategy 2 if not specified */ #endif /* STM32_THREAD_SAFE_STRATEGY */ #ifde
Hello there,Using stm32h747i disco board: azureRTOS + netxduoI have added azure RTOS and netXDuo on CM4, I want to run MQTT on Ethernet. I have done below changes on the board.I have connected the LAN cable from board to laptop for peer to peer connection.Initially i was trying to to ping from board to Ubuntu system with "nx_icmp_ping" but getting "NX_NO_RESPONSE (0x29)" in response.in 2nd try i have disabled the ping related code and trying to ping from laptop to board.I'm able ping the board when i start debugging mode,But after flashing the code or after rest the board, not able to ping the board.Attaching the project, please guide us on the same.Thanks and Regards,Ishan
Hello,I'm using Nucleo-H563ZI Board and trying to use FreeRTOS with LWIP. I am able to find the FreeRTOS software extension for the STM32H5 series (X-CUBE-FREERTOS) and enabled in the .ioc file. Attached the .ioc file for reference.But I'm unable to find the LWIP package for the STM32H5 series.How to enable the LWIP for STM32H5 series in .ioc?Thank you
Hello members of the ST community,I want to access LAN8742 PHY with RMII via ethernet protocol with STM32H743VIT6 microcontroller. I want to run the system using the default address settings generated by CubeMX. I created 10kB space for MEM_SIZE. I wanted to access the callback function of the system over ethernet by creating a UDP server. The system does not enter the callback function determined by the data coming over UDP. The addressing I used in this microcontroller is shown below;LWIP_RAM_HEAP_POINTER : 0x30004000First Tx Identifier Address : 0x30000080First Rx Identifier Address : 0x30000000Rx Buffers Address : 0x30000100I found an application for lwIP application in the forum using MII connections. I tried the configurations there but no results. When I run the system in debug mode, mem_malloc: could not allocate in mem.c is returned; MEM_STATS_INC(err);LWIP_MEM_ALLOC_UNPROTECT();sys_mutex_unlock(&mem_mutex);LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, (“mem_malloc:
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.