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
STM32H7 RM explains that I/O compensation cell code is set through PCC_MCC / NCC_MCC / PCC / NCC bits of SYSCFG_CCCR. What is not explained is the encoding of these four-bit fields. Is there some explanation somewhere that I missed?On the HAL side, these fields are set through HAL_SYSCFG_CompensationCodeConfig(), but again I cannot find any explanation of sample code of SYSCFG_PMOSCode, / SYSCFG_NMOSCode parameter values. Help?
Hello everybody!Can anybody advise me on a simple way to emulate EEPROM for STM32f… MCU?Right now I need it for STM32f373C8T6 MCU.Yes I have X-CUBE-EEPROM, but there is no “STM32F” series at allYes, I have read the "AN4056 EEPROM emulation in STM32F30x/STM32F31x, STM32F37x/STM32F38x microcontrollers" and have the corresponding code. And of course, it was very useful some 10 years ago, before STM force using their HAL drivers instead of “StdPerif”. But now any attempts to use it inside native STM32Cube IDE lids to errors because of incompatibility between these two drivers.I understand how to emulate the EEPROM, but to be honest, I have no wish to do it by hand. And I wonder if nobody needs EEPROM in their projects? Or maybe is there so simple way that I can’t see it myself?So help, please! Show me the way, how to use emulated EEPROM for STM32f373C8T6 MCU (and any STM32F MCU) with HAL, or even better LL drivers?
I want to use the OV5642 camera with the STM32F7508-DK card and display the image I take from the camera on the LCD screen on the card.Is this possible? If it is possible, can you help me how to do this?
I have created a web server using the STM32H723VET6 processor and can communicate with my own circuit through the web server. I can send and receive data to and from the processor over the web server (using LWIP). I am sending data every second through the UART. I also want to send this data using the MODBUS TCP protocol. Since I have never worked with the MODBUS TCP protocol before, I'm not exactly sure what I need to do. Is there a suitable library and example for my processor to do this?
I am using code for (uwIndex = 0; uwIndex < BUFFER_SIZE; uwIndex++){*(__IO uint32_t*) (SDRAM_BANK_ADDR + WRITE_READ_ADDR + 4*uwIndex) = aTxBuffer[uwIndex];}/* Read back data from the SDRAM memory */for (uwIndex = 0; uwIndex < BUFFER_SIZE; uwIndex++){aRxBuffer[uwIndex] = *(__IO uint32_t*) (SDRAM_BANK_ADDR + WRITE_READ_ADDR + 4*uwIndex);} after writing0x000000010x000000020x000000030x000000040x000000050x000000060x000000070x000000080x000000090x00000010 I am reading back0x000100000x000200000x000000000x000400000x000500000x000000000x000700000x000800000x000000000x000A0000 any idea what the problem might be ?
1I need help running the zerpf example with USB over ethernet for the STM32 NUCLEO F429ZI board. I could run the example with an ethernet port and ping the connection using iperf-2.0.5b-win32.However, when I have configured the proj.conf file by adding these lines for setting Ethernet over USB.CONFIG_USB_DEVICE_STACK=y CONFIG_USB_DEVICE_NETWORK_ECM=n CONFIG_USB_DEVICE_NETWORK=y CONFIG_USB_DEVICE_NETWORK_RNDIS=y CONFIG_NET_IPV6=n #Disabled this flag else mcu reboot again and again when the command is sent)These configuration settings are also described here: sample.net.zperf.netusb_rndis After flashing the code, an RNDIS network is discovered via a USB connection, and I can manually set the network's IP. However, when I run iperf-2.0.5b-win32 in server mode on my Windows 11 and send zperf tcp upload 192.0.2.2 5001 10 1K 1M on the board, I get the error.TCP upload failed (-116)The connection is not established for TCP. Also, I am getting an error for UDP up
Hello Team, I have connected the STM32H723ZI2 board to the PC, i could see the virtual drive connection to the PC, but when I use the embedded coder support and generate code and try to flash the board it showing No board connection to the board.
Default USB settings for command packet size is 8U (CDC_CMD_PACKET_SIZE), meanwhile, if we want to change "hardware flow control" flags, we need to send 10 bytes command packet. (for 32F103)If CDC_CMD_PACKET_SIZE is redefined in cubeMX package, I receive lots of warnings:In file included from USB_DEVICE/App/usb_device.c:26: Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc/usbd_cdc.h:61: warning: "CDC_CMD_PACKET_SIZE" redefined 61 | #define CDC_CMD_PACKET_SIZE 8U /* Control Endpoint Packet size */I suggest to add few lines in "usb_cdc.h":#ifndef CDC_CMD_PACKET_SIZE #define CDC_CMD_PACKET_SIZE 8U /* Control Endpoint Packet size */ #endifNow I can change command packet size in CubeMX user constants.Why I need this? To set serial port control pins status.void USB_CDC_SerialStatus(unsigned char status) { unsigned char buf[10]; buf[0]=0b10100001; //request type. buf[1]=0x20; //notification SERIAL STATE buf[2]=0; buf[3]=0; buf[4]=0; buf[5]=0; buf[6]=2; buf[7]=0; buf[8]=status; buf[9]=0;
Hello, I'm using STM32H750VBTWhen I'm trying to use DMA for ADC data collection I'm experiencing MCU crush. Currently I know that issue happens when DMA fill half of defined buffer.I'm using STM32CubeIDE and builded in CubeMX. To precize issue I used debug By SWD STLink. to be able run code step by step I desabled continuous conversion mode. Attaching my Cube MX ADC settings:And DMA settings After pre configured by CubeMX initiation I'm calling conversion by HAL_ADC_Start_DMA(&hadc2, (uint32_t*)testDMA, 20); And entering into while (1) loop where calling adc2 conversionHAL_ADC_Start(&hadc2);after every loop I checking testDMA[] bufferand DMA cycle by cycle fills testDMA as well up to [8], but on testDMA[9] debugger shows errors and don't able to cintinue code running (example on attached screen) I tried to change in HAL_ADC_Start_DMA(&hadc2, (uint32_t*)testDMA, 20); from 20 to any another value and issue happens on half of
Hello,In this thread, I would like to clarify a point regarding how to read the RTC_CLR[ALRF] flag. I am using the STM32F103C8T6 microcontroller and the STM32Cube Firmware (HAL) version 1.8.5. This flag indicates that the alarm has been activated.My intention is to determine the reason for the system reset, as I have configured two ways to exit the STANDBY mode before enabling it:1. Through the wakeup pin.2. Through the activation of the alarm.To achieve this, I am trying to read the RTC_CRL[ALRF] bit after returning from STANDBY mode and executing the functions HAL_Init(); and SystemClock_Config(); The result I obtain is somewhat curious. When the debugger is connected (Stlink V2), the flag is correctly activated after the system reset. However, when I disconnect the debugger and perform logging through UART, the bit never gets activated, even though it is the alarm that causes the system reset.I have created my own function to read the register following the instructions I´ve found o
Hello, I am using an open source voice-recognition software known as Picovoice. To use their library it must be passed a PCM signal at a certain rate with a specific number of samples per frame. I used CubeMX to enable the PDM2PCM library on the STM32F407-DISC1 but am unsure at this point how to receive and convert that data to PCM. Any assistance in where I could find examples or learn how to use this library properly would be appreciated. I'll put the links to Picovoice's github and API if anyone is curious about it. The function that needs the PCM audio is pv_picovoice_process(). Thanks! https://picovoice.ai/docs/api/picovoice-microcontroller/#pv_picovoice_process https://github.com/Picovoice/picovoice/blob/master/sdk/mcu/include/pv_picovoice.h
Hi,Can you please provide the XMODEM code on Stm32f429zi for file transfer
Posted on September 18, 2017 at 15:52A brief introduction to this problem:STM32F7 is configured for USB Device FS. USB interface is used to transmit a large array of data from MCU to computer. If, by any chance user closes the Virtual Com Port of MCU, next time user opens com port, MCU will send remains of the data it was transmitting to computer, creating a lot of troubles.I want to flush TX buffer of USB Device mode or abort transmition progress whenever VCP is opened/closed in the computer.#cdc #stm32 #hal #usb #vcp
I am using a stm32F103ZET6 to just blinking a led but the HAL_Delay() is not working.I change the HAL_Delay() with for loop and it work.this is the code that i am using :while (1){HAL_GPIO_WritePin(Led_301_GPIO_Port, Led_301_Pin, 1);HAL_Delay(500);//for (int i=0; i < 500000; i++);HAL_GPIO_WritePin(Led_301_GPIO_Port, Led_301_Pin, 0);//for (int i=0; i < 500000; i++);}}I want to work with HAL_Delay because i need to use it in a project with this mcu
I am using STM32F407G.I am attaching a main.c (that use DMA) that reads simultaneously the voltage coming from 3 potentiometers connected to 3 channels of ADC.In the code, if you try to change "volatile uint16_t adc_value[3]" to "volatile uint32_t adc_value[3]" this is what happens:Huge values (above the upper limit 2^n with n = num bits) are displayed.I don't understand why this happens."adc_value" is the number read by the ADC while "adc_CH1_value_volt" is converted to volt (of the 1° channel)
Hello,I am using the STM32 USBPD Library in a DRP battery bank application, and want to reduce idle power consumption. In the documentation and source files, there is mention of a usbpd_lowpower.h file but I cannot find this file anywhere.There is also a reference to this file in UM2785.Any idea where I might find this file?Thanks,Nate
I have set up the FDCAN and confirmed that sending single messages works. However, I cannot get the FIFO to work at all - if I queue two messages at the same time, only the first appears on the wire. It is fine if I add a 1ms delay before sending the second message. I guess this works because the first message is long gone rather than still active. Rather than dig into the HAL code, I created an external queue to feed messages in one at a time. The idea is to call HAL_FDCAN_AddMessageToTxFifoQ() to set up the next message when I get a TX interrupt. I can receive the FDCAN_IT_TX_FIFO_EMPTY interrupt which calls TxFifoEmptyCallback(). Calling HAL_FDCAN_AddMessageToTxFifoQ() from here has the same problem - the second message is not sent. I have also tried to receive the FDCAN_IT_TX_COMPLETE interrupt but have been completely unable to get the implementation to call TxBufferCompleteCallback(). My interrupt activation code is &
The BL462ECELL1 that I bought, I have been working on it for the last 5 days. I was wandering around in search of the answer for how to get the module sim registered as the registration past was getting denied over and over again. I have already activated the sim, but I am now struggling with the registration process and the turned-off LED screen on the module,I seek desperate help from the ST team.Thank you
Dear ST Community,I'm currently working on STM32F091RC using STM32Cube IDE, and I've encountered an issue with handling UART receive interrupts for variable-length data. Currently, I have set a fixed length of 5 bytes for the data, and the UART communication is functioning properly. However, I now require the flexibility to receive data of varying lengths, such as 1 byte, 5 bytes, and so on.Despite my attempts to modify the code to accommodate variable-length data reception, the UART doesn't seem to work reliably. I believe I might be missing something crucial in my implementation.Could someone please provide guidance, code snippets, or any possible solutions to efficiently handle variable-length UART receive interrupts for the STM32F091RC?Any help or insights would be greatly appreciated.Thank you,Santhosh
Some STM32H7 MCUs have I2S capability on SPI6, but the HAL does not define "SPI_SPI6I2S_SUPPORT" for all of them. The ones with the missing define gets the prescaler computed wrong if the clock for SPI123 and SPI6 is different. Has HAL support:H7B3H7B0H7A3 Has capability but missing HAL support:H735H733H730H725H723 Manually adding the define fixes the issue, the prescaler is calculated correctly and the expected clock frequency is sent to the I2S pins.
Hello. i have installed my pack but it wasn't on the left side. (I-CUBE-RBUF)But other packs added before.https://github.com/nimaltd/STM32-PACK/but when i installed from local disk. it works.
I have a STM32L476RG Nucleo-64, and I am trying to run code from ram, but whenever I do it, it makes it to the function but does not execute the code, and on return it hard faults. I am not trying to put all code in ram just one function. /* 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. * ****************************************************************************** */ /* USER CODE END Header */ /* Includes ------------------------------------------------------------------*/ #include "main.h" #include "quad
Hello everyone,I'm working on an STM32 project where I need to establish PPP (Point-to-Point Protocol) communication with a GSM module, such as the SIM7600. Additionally, I aim to integrate the NetXDuo TCP/IP stack into the project for network communication.Similar to how the ESP32 has the esp-modem component for managing modem communication, I'm seeking recommendations for STM32-compatible modules or libraries that handle both PPP communication and facilitate the integration of the NetXDuo TCP/IP stack.I've searched extensively but haven't found a dedicated solution like esp-modem tailored for STM32 platforms.Any insights, suggestions, or recommendations on efficient ways to implement PPP communication with GSM modules and integrate the NetXDuo TCP/IP stack into STM32 projects would be immensely helpful.Thank you all for your time and expertise!
Hello community,I'm looking for some feedback on how to optimize the ADC peripheral when using a handful of single-ended channels.I have an STM32H735G-DK and have 4 NTC3950 type thermistors connected to 4 of the Analog pins from the Arduino headers, attached in the R2 position of a voltage divider.NamePort/PinADC NumberADC ChannelR1 Resistancetemp0PC0ADC3Channel 10487100temp1PH2ADC3Channel 13463500temp2PC2_CADC3Channel 0468800temp3PC3_CADC3Channel 1468200The goal is to gather the 4 analog values and convert them to temperatures - the readings need to be accurate to the correct temperature and consistently the correct temperature (I would very much prefer to not have much of a software filter to smooth the readings).Using CubeMX, the peripheral is being initialized as follows:static void MX_ADC3_Init(void) { /* USER CODE BEGIN ADC3_Init 0 */ /* USER CODE END ADC3_Init 0 */ ADC_ChannelConfTypeDef sConfig = {0}; /* USER CODE BEGIN ADC3_Init 1 */ /* USER CODE END ADC3_Init 1 */ /*
Hi there,I am working with the Nucleo-H563ZI board. The board is modified so that its hardware can act as a USB host. I am running Azure RTOS with USBx in the board. USBx is configured in host mode (not OTG) with classes HID (keyboard) and Hub. A USB HID device connected directly to the board's USB port (CN13) is successfully enumerated and the data typed with the keyboard is received by the firmware. Enumeration of the HID device fails when I insert a USB hub. The hub is enumerated, but the device enumeration fails when the USB host tries to assign the device address. The USB host never receives a response to this request.I have already compared my solution with the HUB_HID_MSC example from the STM32U5. It is very similar and I don't see anything wrong with my solution.Can you please help me?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.