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 am using a STM32H750 with STM32CubeExpansion_Audio_V1.1.1 and I am trying to use the Graphical equalizer library.This is what I've done: I have an aux audio signal that I'm sampling at 96Khz with a DMA's interrupt transfer every 1 ms ( 1 ms == 96 samples). Then I am using "arm_fir_decimate_q15" in order to have a buffer of 48 samples. This buffer is the input of GrEq library's processing function. The GrEq library configuration is: nb_bands = GREQ_NB_BANDS_8;user_gain_per_band_dB = 0; /* For all 8 band */nb_bytes_per_Sample = 2; /* 16 bits in one sample */nb_channels = 2; /* stereo */buffer_size = 48; /* Samples for channel */mode = INTERLEAVED;During run time, thanks to a custom graphical interface , I can change the "user_gain_per_band_dB " and then call for "greq_setConfig" without any errors. This is my GrEq processing function's core: void audio_equalize_adc(uint16_t *in_out_buff, uint16_t size) {/* Create
I am using an STM32F767 with MQTT, and everything works without using TLS. But when I try to enable TLS, it fails to connect to the server because of a memory issue (calloc fails). I read other message boards that state that I need up to 60K of RAM to use TLS (this seems excessive). What are the correction options for configuring stm32F767 when using TLS? Thank you in advance. steps: 1. this works. mqtt_client_info.tls_config = altcp_tls_create_config_client((const uint8_t *)tls_root_ca_cert , strlen(tls_root_ca_cert) + 1); 2. this fails with -1, failed malloc err = mqtt_client_connect(mqtt_client, &pServerSetting->ip_pri, pServerSetting->priServerPort, mqtt_connection_cb, LWIP_CONST_CAST(void*, &mqtt_client_info), &mqtt_client_info); Other info. SRAM2 is used for ethernet buffer which is 16K. I have an external SDRAM (FMC interface) currently being used for a display buffer with plenty of space available is it possible to configure it to use
Hello everyone, I am integrating FreeRTOS into a project with an LCD16x2. The issue is when I initialize the LCD handle in the main function and use it in a task, it doesn't print the correct character. However, if I initialize the LCD handle in the task itself, it works fine. I suspect the issue is with the LCD_Write_4bit function. When using HAL_Delay(), I get a hard fault error. Can anyone help me with this?I'm using STM32F407 Discovery Board (STM32F407-DISC1) and STM32CubeIDE static LCD_HandleTypeDef lcd; int main(void) { /* USER CODE BEGIN 1 */ TaskHandle_t task1_handle; BaseType_t status; /* USER CODE END 1 */ /* MCU Configuration--------------------------------------------------------*/ /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* USER CODE BEGIN Init */ /* USER CODE END Init */ /* Configure the system clock */ SystemClock_Config(); /* USER CODE BEGIN SysInit */ /* USER CODE END SysIni
Hello everyone, I'm currently using Nucleo-H743ZI2 but this aim to go on a custum PCB. LWIP (2.1.2) is activated without FREERTOS and my TCP server is working. I'm also using HAL function with CubeIDE (1.16.1). And I'm using an Aruba 2530-8G switch to visualize the Speed and Duplex ModeBut I'm having issues with the LAN8742A. Especially with the Duplex Mode of the LAN8742. I can't manage to make the duplex mode to Full Duplex . I already manage the speed and autonegociation well, but the Full Duplex mode is not working without AutoNegociation. What I did in order to manually configure the LAN8742 ? - Writing in the SMR (Special Modes Register) of the LAN8742 which mode I wanted (Bit 5->7)- Writing in the BCR (Basic Control Register) of the LAN8742 the speed (Bit 13), the Auto-Negotiation (Bit 12), and the Duplex Mode (Bit 8)- Specify the Link State via lan8742.c function given by ST // Function that write the configuration for the LAN8742 void appM
Hi, i want use usart DMA to receive data, but i only get last data by HAL_UART_Receive_DMA. STM32U575VITXSTM32CUBEMX 6.8.0STM32CubeIDE 1.12.0 the transmit data is $$......##my code is in main functionwhen i use HAL_UART_Receive(), i can get correct data, but it has packet loss to some extend.when i use HAL_UART_Receive_DMA(), i only get last byte # . cubemx setting for DMA:cubemx setting for usart :usart.c file is attached below. i try this solution https://community.st.com/t5/stm32-mcus-embedded-software/stm32h750-dma-hal-uart-receive-dma-acting-oddly/m-p/569897 but, still can't solve it. it will be very helpful, if any one tell me something.thank you.
I have a bunch of debugMsg() calls throughout my code. Is there a way to automatically strip those out during a build?
Is there any example to flash firmware image to external flash memory over SPI and execute in place.Device - STM32H7S3L8
Hello,I found an interesting problem with the USB controller. Our device uses MCU STM32F756, with USB in FS Device mode.We have a total of three USB IN endpoints, controlled via Azure RTOS / USBX middleware. With a heavy load on USB endpoints, sometimes an endpoint gets stuck. By observing the registers of the USB controller, I found that the given endpoint is ready to send data, but the FIFO empty interrupt is not enabled. These interrupts are controlled using the OTG_DIEPEMPMSK register.The problem is that this register is shared by all endpoints and setting or clearing the relevant bit is not atomic. If the executive thread is preempted by the scheduler or the USB interrupt handler in the middle of a read-modify-write operation, the OTG_DIEPEMPMSK register may not be set correctly.I solved the problem by using ATOMIC_SET_BIT / ATOMIC_CLEAR_BIT macros around the OTG_DIEPEMPMSK register (in HAL_PCD_IRQHandler, PCD_WriteEmptyTxFifo and especially the USB_EPStartXfer functions). It look
Hi, i want the communication between stm32f411re board and raspberry pi 4. i tried to do with uart2 through USB cable it is working fine. but sometimes it is not able to communicate properly. there is a delay while communicating sometimes. will i2c or spi communication works with USB cable to communicate. which is better and i want the one efficient to work as i want both ways communication.
I am writing an embedded software project that includes BLE GATT protocol with stm32wb15 mcu.Based on the "BLE_HeartRate" example, to use stop1 and standby in the project;I activated "CFG_LPM_SUPPORTED 1" and "CFG_LPM_STANDBY_SUPPORTED 1".Question 1I closed all debugs in Cubemx. I am using Custom Template.I have not yet activated and added peripherals such as IO, UART, I2c to the project.I have a board that I designed with a processor and I am measuring with a multimeter that measures nA level.When I load "BLE_HeartRate" to the device, I see a consumption between 90uA and 450uA. After a certain period of time, this value drops to 90uA and 138uA. These are values much higher than the consumptions mentioned in the documents.What is the possibility of hardware losses? Or do I need to add to the "BLE_HeartRate" example?The problem in my project is as follows;Sample Project in this link;https://www.youtube.com/watch?v=CKYWy7LKL68&list=PLnMKNibPkDnG9JRe2fbOOpVpWY7E4WbJ-&index=16- "
Can STM32L431 configure the RX of the serial port to EXTI wake-up in STOP2 mode? Why can't I wake up? And idle interrupts cannot be used either. The manual states that the EXTI and RX pins have been connected together in hardware, but the STOP2 mode cannot wake up the serial port, so it seems that its method cannot be used. Only the most primitive way of configuring RX as EXTI can be used, but it still cannot wake upEnter STOP2, void EnterStop2ModeRTC(void) { __HAL_RCC_PWR_CLK_ENABLE(); __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU); __HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(&hrtc, RTC_FLAG_WUTF); __HAL_RTC_WAKEUPTIMER_EXTI_CLEAR_FLAG(); __HAL_RTC_TIMESTAMP_CLEAR_FLAG(&hrtc, RTC_FLAG_TSF); __HAL_RTC_TAMPER_TIMESTAMP_EXTI_CLEAR_FLAG(); while (__HAL_UART_GET_FLAG(&huart3, USART_ISR_BUSY) == SET) ; while (__HAL_UART_GET_FLAG(&huart3, USART_ISR_REACK) == RESET) ; setUca3RxToExti();//Configure RX for serial port 3 as EXTI HAL_SuspendTick(); //HAL_DBGMCU_EnableDBGStopMode(
Hello there! I'm trying to build a blinky program using make I'm using HAL, and the CMSIS V2 FreeRTOS ports/sources from https://github.com/STMicroelectronics/STM32CubeF3/tree/master My program compiles, but it doesn't blink, and I have no idea of how to debug it. I'm using GCC as my compiler, this is an example of the settings I configured. arm-none-eabi-gcc -c -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -DUSE_HAL_DRIVER -DSTM32F303xE -IrobotConfig/inc -I/opt/STM32CubeF3/Drivers/STM32F3xx_HAL_Driver/Inc -I/opt/STM32CubeF3/Drivers/STM32F3xx_HAL_Driver/Inc/Legacy -I/opt/STM32CubeF3/Drivers/CMSIS/Device/ST/STM32F3xx/Include -I/opt/STM32CubeF3/Drivers/CMSIS/Include -Iapp/inc -I/opt/STM32CubeF3/Middlewares/Third_Party/FreeRTOS/Source/include -I/opt/STM32CubeF3/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I/opt/STM32CubeF3/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -MMD -MP -MF"buil
Looking for an example for how to configure the NetxDuo and USBX HOST stack for using CDC-ECM class for interfacing an USB-Ethernet dongle.rtos-docs/rtos-docs/usbx/usbx-host-stack-6.md at main · eclipse-threadx/rtos-docs (github.com)The above link gives high level view but not enough details. Looks outdated too as can't find where this function is./* Find the CDC-ECM class. */ class_cdc_ecm_get(); I want to use a generic USB-Ethernet dongle The HW is STM32H743xiThreadx version 6.4.0
Hello,We are currently developing a device based on STM32L0 MCU. We would like to implement a USB device functionality in it. The problem we have is that we don't know what USB VID and PID to set for it, since we don't want to buy our own, since this is just a small, side functionality.My question is: does ST provide any specific PID/ VID values, that are available to be used legally (and commercially) by their customers when implemented with STM32 products?I would appreciate all help.
Hello community,I am having some problems getting USB to work on a STM32L496. Maybe you can help me or have some tips for me.I have designed a custom board that should provide access to some sensors and the CAN bus via USB as a COM interface.The board is powered via USB.As far as I could tell, the microcontroller was supposed to enable the internal pull-up resistor to D+, but this never happened. So no USB communication is established.The software is generated via the .ioc file. I used the USB_DEVICE package. And tested it with and without V_USB sensing.The settings: Device_Only, Full Speed and is configured as CDC.What have I tried so far?- I checked the voltages of D+ and D- with a logic analyser. Nothing...- After powering up the microcontroller there are 2 interrupts in the HAL_PCD_IRQHandler, first the ConnectCallback and then the ResetCallback. As far as I know, the ConnectCallback occurs when the V_USB is detected. (The ConnectCallback end up in "USBD_LL_DevConnected()" which is
fresult1 = f_mount(&myFATAFS, SDPath, 1) while(FR_OK != fresult1){If I remove and reinsert the SD card the f_mount return FR_DISK_ERR instead FR_OK.If I restart the project all is OK.I have the SD_CARD present pin, what can i do when the card is disconnect and i insert it.
Hello Together, I have an issue regarding my STM32 Project I tried different things and do not get any glue...I had an project with FATFS Lib and SDMMC2 in 4bit mode and it was working fine. After trying to merge the IOC - settings into my bigger project (ETH, FMC, LWIP) it is not working. The IOC settings are the same, only the system clock is different. The SDMMC2 is using PLL48CLK. The software stucks in "BSP_SD_WriteBlocks_DMA()" from "stm32f769i_discovery_sd.c" which ends in stm32f7xx_hal_sd.c. The bug with the configuration at the init was take into account: /** * @brief SDMMC2 Initialization Function * None * @retval None */ static void MX_SDMMC2_SD_Init(void) { /* USER CODE BEGIN SDMMC2_Init 0 */ /* USER CODE END SDMMC2_Init 0 */ /* USER CODE BEGIN SDMMC2_Init 1 */ /* USER CODE END SDMMC2_Init 1 */ hsd2.Instance = SDMMC2; hsd2.Init.ClockEdge = SDMMC_CLOCK_EDGE_RISING; hsd2.Init.ClockBypass = SDMMC_CLOCK_BYPASS_DISABLE; hsd2.Init.ClockPowerSave
Hey there!I've been playing around with the Ethernet HAL driver on the NUCLEO-H563ZI and I was able to make it work. I'm currently using the latest STM32CubeH5 package release. Here's the issue: whenever I receive an ethernet packet, the interrupt at HAL_ETH_IRQHandler always triggers HAL_ETH_RxCpltCallback and then HAL_ETH_ErrorCallback with the error 0x4480 or 0x4080. In short, an Abnormal Interrupt of either "Receive Buffer Unavailable" or "Transmit Buffer Unavailable". At first I thought it was due to the time the application was taken from the DMA, preventing it from getting the ownership of the descriptor. However, I can't really reason why or where this can happen. When the application owns the descriptor (HAL_ETH_RxLinkCallback) I only pass a pointer (minimal overhead) and right before the ownership of the descriptor is given to the DMA, the call of HAL_ETH_RxAllocateCallback is also fast enough.My HAL_ETH_RxLinkCallback:void HAL_ETH_RxLinkCallback(void** pStart,
Hello, i have a stm32wb15cci'm trying to make a hold button, that toggles a led on/off when pressed for 2 seconds. my HCLK1 is running at 4Mhz and my prescaler is at 3999, meaning it should count up every 1ms. I'm using TIM1 which is a 16bit timer, so the counter overflows every 65 seconds.the program works as intended for the first 65 seconds, but after that the timer is stuck at 0.static void MX_TIM1_Init(void) { /* USER CODE BEGIN TIM1_Init 0 */ /* USER CODE END TIM1_Init 0 */ TIM_MasterConfigTypeDef sMasterConfig = {0}; /* USER CODE BEGIN TIM1_Init 1 */ /* USER CODE END TIM1_Init 1 */ htim1.Instance = TIM1; htim1.Init.Prescaler = 3999; htim1.Init.CounterMode = TIM_COUNTERMODE_UP; htim1.Init.Period = 65535; htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; htim1.Init.RepetitionCounter = 0; htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; if (HAL_TIM_OnePulse_Init(&htim1, TIM_OPMODE_SINGLE) != HAL_OK) { Error_Handler(); } sMasterConfig.MasterO
Good evening, I would be interested in getting more information about the BLEMLC Firmware for the SensorTile.box PRO accessible at https://github.com/STMicroelectronics/fp-sns-stbox1/tree/main/Projects/STEVAL-MKBOXPRO/Applications/BLEMLC. In particular, I would like to know which machine learning model was used in the human activity recognition and where I can find the accuracy, precision and confusion matrix data for the following classes: Stationary, Walking, Jogging and Driving.
what does exactly happen here ? static void WriteCommand(uint8_t cmd) { HAL_SPI_Transmit(&hspi2, &cmd, sizeof(cmd), HAL_MAX_DELAY); } &cmd is address of the variable I wonder if HAL is actually transferring data at that address ?
HI there, i m using F410 Nucleo, and i keep getting these errors when using USART2, as I declare in 2 separe files i.e. main.c and buffer. could anyone advise how to resolve this?error: multiple definition of `huart2'; //main.c .. /* Private variables ---------------------------------------------------------*/ UART_HandleTypeDef huart2; .. /* USER CODE END USART2_Init 1 */ huart2.Instance = USART2; huart2.Init.BaudRate = 115200; huart2.Init.WordLength = UART_WORDLENGTH_8B; huart2.Init.StopBits = UART_STOPBITS_1; huart2.Init.Parity = UART_PARITY_NONE; huart2.Init.Mode = UART_MODE_TX_RX; huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE; huart2.Init.OverSampling = UART_OVERSAMPLING_16; // buffer.c #include "buffer.h" #include <string.h> /**** define the UART ****/ UART_HandleTypeDef huart2; // woldes #define uart &huart2 ..
I'm testing the STM32 USB MSC using FATFS. I'm using two different flash drives, one generic 128GB and one 8GB encrypted. When using the 128GB one, things work well. See picture to the right. However, with the encrypted one, I get fatal error. When the stack resets the USB port, then the device stops responding. See picture to the left This encrypted flash drive works well in any computer that I connect it to. I just enter the password via the hardware keypad and that's it. Does anyone know about the issue I could be facing? I would expect the encrypted flash to be more problematic obviously but I'd like to understand if I need to set up things differently on the STM32 end to make it work.
I am using STM32F105xx family, working with HAL_SPI API. I have discovered that the call to HAL_SPI_Receive_IT causes whatever data is in the provided buffer to be clocked out on MOSI. This issue is also discussed to some extent in this thread, but that thread is more focused on fixing the system behavior than discussing whether it's actually a bug in HAL. So...am I crazy or is this a bug? If I call a "Receive" method that only takes a receive buffer, I shouldn't expect it to transmit that data, should I?I'm working with TI's ADS1258 ADC which has a "direct read" mode meaning no command needs to be sent to read the next conversion result (technically, it watches the first three bits of MOSI; if they are all 1s or all 0s, it ignores the rest of MOSI and continues clocking out data on MISO for 32 bits). If there is stale data in the buffer provided to HAL_SPI_Receive_IT, and that data happens to have a first byte that the ADS1258 recognizes as a co
Hey folks.What I do is this: I get 14 ADC measurements on different channels, than use DMA to store them into an array. When this is ready an interrupt flag is raised, I make a copy of that array and send it via UART. There is a timer to control the ADC. At some point I do transfer back an UART message that I use to update my ARR register of the timer. This set up works from time to time, but most of the time, especially on higher values, DMA that I use with ADC stops rising the interrupt flag, and no new ADC values are produced. Does anyone have similar experience?THanks! I did try to disable the UART, ADC, and TImer before updating ARR, but to the same result.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.