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 trying to read multiple channels of ADC (like Temperature sensor channel, Vbat channel, Vrefint ...) using the interrupt method, but I am not able to read all the Channel readings , only the readings of first channel is being reflected for all the channels. I have configured the ranks for each channel and the end of conversion is set to End of Sequence Conversion. If anyone has any Idea on how to read multiple channels of ADC using interrupt, do answer and help.
Hello everyone,I have setup my stm32 to use interrupts and have enabled them to work on spi1 and all 4 i2c ports. The relevance of the i2c ports is that they run continuously and may call the interrupt service routine while the spi one is being called. To isolate this possibility I have disabled interrupts for the spi callback. At the start of the main of the stm32 slave I call HAL_SPI_TransmitReceive_IT(&hspi1, tx_buff, rx_buff, size); From a Raspberry Pi I am sending from 0 to 95 in a single transaction while simultaneously reading the bus. The stm32 receives the data as expected (which I have checked in debug mode) but sends nothing in response. I have checked the miso port with a logic analyzer and you can see in the photos. This is the SPI callback #define BYTES_PER_BUS (8*3) #define BYTES_I2C4 ((6-2)*(3)) #define RPI_PACKET_LEN ((8*3)+((2)*3)) uint8_t spi_rx_buffer[RPI_PACKET_LEN] = {}; uint8_t spi_tx_buffer[RPI
Hi guysI am using TrueStudio and trying the Nucleo 64 STM32F446RE.when I try to debug, the console always shows Starting server with the following options: Persistent Mode : Disabled Logging Level : 1 Listen Port Number : 61234 Status Refresh Delay : 15s Verbose Mode : Disabled SWD Debug : EnabledTarget USB comms errorError in initializing ST-LINK device.Reason: USB communication error. Please reconnect the ST-LINK USB cable and try again.I checked to use the STM32-LINK Utility. There is a communication error.Tried to execute dpsint_amd64 using the path C:\Keil_v50\ARM\STLink\USBDriverchanged the USB cable
Hello ST Community,I’m working on a project where I initially developed software on the STM32H735 evaluation board. Now, I need to port this project to a custom board using the STM32H730 microcontroller. The external flash memory is the same as the one on the H735 (MX25LM51245GXDI00), with the only difference being three pins: DIO2, DIO4, and DIO6.In my project, I use FATFS to load a .bin file into the external memory and then jump to execute it. I’ve also tested the external flash memory and confirmed that it works correctly on the custom STM32H730 board. This gives me confidence that the external memory is correctly wired and functional.I’ve followed several tutorials, meticulously implementing all steps to create an external loader, including adding the required .c and .h files, linker scripts, and StorageInfo. However, I’m still stuck, and the loader does not work. Along the way, I’ve solved several compilation issues, such as:Adding #define KeepInCompilation __attribute__((used))I
The ADC buffer is not being written to I would like it to zero all values less than 5 to eliminate noise. My project is a DTMF detector. I need it to pass through audio when no DTMF tone is detected and execute a command when there is one found. Also please assist with the pass-through function that is not working either #include "main.h" #include <math.h> #include <stdio.h>/* Private function prototypes -----------------------------------------------*/ void SystemClock_Config(void); char message5[40] = {'\0'}; static void MX_GPIO_Init(void); static void MX_DMA_Init(void); static void MX_USART2_UART_Init(void); static void MX_TIM6_Init(void); static void MX_ADC_Init(void); static void MX_DAC_Init(void); int main(void) { SystemClock_Config(); MX_GPIO_Init(); MX_DMA_Init(); MX_USART2_UART_Init(); MX_TIM6_Init(); MX_ADC_Init(); MX_DAC_Init(); /* USER CODE BEGIN 2 */ memset(adc_buffer, 0, sizeof(adc_buffer)); HAL_ADC_Start_DMA(&hadc, (uint3
Good afternoon, We use ThreadX in conjunction with TouchGFX.As debugger we use ST-Link/V2 and GDB as debugger.If a simple new project is started with several threads and TouchGFX, all threads (active and inactive) are displayed in the debug view.All threads can also be output directly from gdb via “info threads”.Here is the problem:In our project, however, this no longer works, instead only the active thread is displayed. Also “info threads” only shows the active thread.We have already tried the following things without success:Transferring the settings and project files from the new project to the old project.Transferring the code files from the old project to the new project. If the active thread here is the idle thread, at least the last active thread is also displayed.Since we need to see all threads, do you have any idea where we can start to make progress here? With best regards
Hello, trying to port Miro Samek's example: https://github.com/QuantumLeaps/FreeACT - into my nucleo-F429ZI board.As a reference there is project running on nucleo-h743zi what i did:changed all configs to be STM32F429zi valid, changed ld file, makefile, etc etc. When running software (via debugger), unfortunatelly i got hardfault in this piece of code (rtos-port-part: port.c) static void prvPortStartFirstTask( void ) { /* Start the first task. This also clears the bit that indicates the FPU is * in use in case the FPU was used before the scheduler was started - which * would otherwise result in the unnecessary leaving of space in the SVC stack * for lazy saving of FPU registers. */ __asm volatile ( " ldr r0, =0xE000ED08 \n"/* Use the NVIC offset register to locate the stack. */ " ldr r0, [r0] \n" " ldr r0, [r0] \n" " msr msp, r0 \n"/* Set the msp back to the start of the stack. */ " mov r0, #0 \n"/* Clear the bit that indicates the FPU
Using python I have written small app to convert SVD V1.4 into assembly include. Then I started to write assemby code using RM0492 Rev2 .For the peripherals I use (RCC,ADC,GPIO,GPDMA,TIM,USART) I have found that there are few errors in the SVD file, some typos etc.Namely:RCC_CCIPR5 register has only 2 fields described, no info about FDCANSEL, DACSEL & ADCDACSELRCC_CFGR regsiter shall be named RCC_CFGR1For RCC_PLL1CFGR & RCC_PLL2CFGR there are DIVMx while should be PLLxM
Hello,I'm having some issue with audio playback using SAI(with DMA configured as circular) as soon as DCache is enabled.I'm using cache clean on half/full interrupt but this doesn't help. I'm suspecting that whenever I got half/full complete interrupt, DMA is allowed to use already another part of the buffer(before I manage to perform a cache clean on that portion of the buffer).Is there a way around it or there only option is to exclude this buffer from caching(or maybe not use circular DMA)?
Hi, my goal was to play some .wav audio files from an external SD card using the onboard DAC and an Audio Booster XL Board from Texas instruments( BOOSTXL-AUDIO ). I was able to interface with the SD Card and read the audio files, but the problem came in when i tried to play the audio. What i got when playing the file is a loud repetitive static noise coupled together with the original audio signal. My first thought as to the cause of the problem which was later confirmed with a couple internet searches, was that the DAC buffer is not being updated fast enough for the audio signal to be played smoothly, so I tried to implement the double buffering approach to deal with the that static noise but still no luck. Information about the audio file, source code and configurations is listed below. Any help as to how to get rid of the noise is greatly appreciated, Thanks in advance. micro-controller: NUCLEO-L476RGWAV Audio File:sample rate = 48000, format = 16-bit PC
Hi, i'm using STM32U575ZI-Q (in NUCLEO-U575), I want to write and read Fat32 files on SD using SDMMC interface, with FileX middleware. When I set the bus width in 1-bit the app work OK but when I switch the setting to 4-bit buswidth mode the app crashes, the debuging halt in the first reading command after SD initialization (in the HAL_SD_ReadBlocks function, it calls to SDMMC_CmdReadSingleBlock function and when it executes SDMMC_SendCommand the SDMMC bit transfer complete doesn't set)I'm setting MCU CLK @ 160MHz (AHB & APB at 160MHz too), SDMMC CLK @ 6MHz (source PLL in 96MHz / (2* DIV) with DIV=8).I repeat, in 1-bit buswidth the code working correctly ! But not in 4-bit modeOn the osciloscope I can see signals on pins D0-D3, so I can verify the 4-bit buswidth is set correctly.I used a SDHC Standar and a SDHC UHS-1 and the result was the same. The code includes fx_stm32_sd_driver_glue files.int main(void){ HAL_Init(); SystemClock_Config(); SystemPower_Config();&nbs
Hello,I am working with [STM32 MCU model, e.g., STM32U5G9ZJT6Q], and I downloaded code from GitHub (link:https://github.com/STMicroelectronics/STM32CubeU5/tree/main/Projects/STM32U5G9J-DK2/Applications/USBX/Ux_Device_CDC_ACM ).While running the project, the code gets stuck in the tx_application_define() function, specifically in the while(1) loop after the USB initialization MX_USBX_Device_Init().Here is the relevant portion of the function:VOID tx_application_define (VOID *first_unused_memory){ UINT status = TX_SUCCESS; VOID *memory_ptr; if (tx_byte_pool_create( &tx_app_byte_pool, "Tx App memory pool", tx_byte_pool_buffer, TX_APP_MEM_POOL_SIZE) != TX_SUCCESS) { while(1); } memory_ptr = (VOID *)&tx_app_byte_pool; status = App_ThreadX_Init(memory_ptr); if (status != TX_SUCCESS) { whil
HeyWe have consider following part# for our induction cooker application and we have few queries for PWM duty cycle update as per below1) STM32F302 and STM32F3032) STM32G491Can I update frequency and duty cycle on the fly from software/code written by me, without stopping PWM module? I don't want any gap/delay when I update frequency or duty cycle. If we can do, than please answer my following queries: PWM is running and I am updating the frequency or duty cycle on the fly, now I want to clarify the following points? 1)when the newly updated frequency or duty cycle actually applies? - At immediately when I update it?- After the end of the current running cycle means applicable with a new cycle?- Can you please point out the reference related to this in the datasheet or user manual?- May I have any reference example with images? My requirement is that it must be applied at the end of the current cycle(applicable with the new cycle, the current cycle must n
Hello ST Team, Currently i am using STM32H523RCT6 mcu for one of my application. Some times mcu goes into "hardfault handler/nmi handler". Can you suggest what will be reasons behind that problem. Thanks with Regards DEEPAK
PDM mic will be set up as 8 or 16 kHz sps. icm will be set up as 4kHz sps.data is received in sync and then stored in a buffer then sent to pc.How do i sync up a pdm microphone and a icm IMU using stm32?What communication to use with the PDM mic, thats easy to sync up with icm IMU 4kHz data ready interrupt?What methode would be the best to sync up the two sensors mic and imu?
Hello, On the ST wiki for NetX Duo [ Introduction to NETXDUO - stm32mcu ], there is the following info tag:"Information - NetX requires that Zero-copy feature that is currently supported only in the STM32H7 HAL Ethernet driver. "I have run the NetXDuo example application on the STM32H563ZI eval board and it's functioning as expected. I'm trying to understand what the limitation is for running NetX Duo on the H5 vs the H7, as this comment implies that I have to upgrade to the H7 to use the feature all together. If I choose to run NetX Duo on the H5, is there a subset of features that won't work? Is zero-copy just not available? Thanks
Hello, Is there any example code for the STM32H563ZI eval board that has an application using FreeRTOS-Plus-TCP? I've checked ST's Github for the STM32CubeH5. Is there a similar chip's repo that could be a good reference?Thanks
Hello ST Community, for the STM32H5, STM32U5 and STM32U0 series, it is already possible to use USBX without ThreadX using CubeMX. After my research, I have a few questions:Why was this limited to these STM32 series only? Are there plans to support the other series in the future?Is it possible to generate a CubeMX project for the STM32H5 with standalone USBX and simply port the USB part for STM32F7 projects?Will there be support for MTP Device USBX projects in the future?Why is it not possible to configure an MTP device project with the ST own USB stack in CubeMX and why is there not a single example for a simple MTP USB device project?Are there plans for ST's USB stack to receive safety certificates such as IEC 61508 SIL4, IEC 62304 Class C etc. similar to USBX?Thank you very much
Hi. I am working in a project which involves the use of an STM32L443 microcontroller. I am using the IAR for ARM v 9.30.1 and the CMSIS and ST drivers package (STM32CubeL4 Firmware Package V1.17.1). I am using LL drivers (HAL is not suitable for our needs). I have configured several timers to interrupt when the counter reaches the compare registers (basically, to have different timeouts to do different tasks). The problem comes when I use a LPTIMx timer. It works as expected, triggering an interruption when the counter register value matches the compare register value programmed. But sometimes, it triggers an interrupt in moments in which the counter register are not close to the compare value.In order to simplify, I create a simple project to show the problem clearer. It consists in an infinite loop which just have two timers (TIM1 and LPTIM1) running in sleep mode with compare interruptions active. The idea is to initialize the LPTIM1 compare register CMP to make LPTIM1 to interrupt
Problem:I'm working with an STM32H743 and trying to generate a PWM signal (Center Aligned) on PE9 using Timer1 (TIM1). Although the PWM output is functioning, the frequency is not what I expect. I’m trying to generate a 1 kHz signal, but instead, I’m getting around 833 Hz, and I’ve confirmed that the period is incorrect.This is for driving a stepper motor.What I have done so far:Clock Configuration: The system clocks (HCLK, PCLK2, SYSCLK) are verified and appear to be configured correctly.Timer Configuration: I'm using Timer1 in PWM Mode 1 with a prescaler of 199 and ARR of 999 to generate a 1 kHz PWM signal (expected 1 MHz timer clock). However, I’m getting an incorrect frequency (around 833 Hz).GPIO Configuration: I’ve configured PE9 for TIM1 CH1 (PWM output). - My Code#include <Arduino.h> HardwareSerial SerialDebug(PA3, PA2); const uint8_t PIN_STEP = PE9; const uint8_t PIN_DIR = PE10; const uint8_t PIN_ENA = PE7; void setupTimer1() { // Enable clock
Debug Logs:Tue Nov 19, 2024 10:46:36: IAR Embedded Workbench 9.50.2 (C:\Program Files\IAR Systems\Embedded Workbench 9.2\arm\bin\armPROC.dll)Tue Nov 19, 2024 10:46:36: Loaded macro file: C:\Program Files\IAR Systems\Embedded Workbench 9.2\arm/config/debugger/ST/STM32H7xx.dmacTue Nov 19, 2024 10:46:36: Loaded macro file: C:\Program Files\IAR Systems\Embedded Workbench 9.2\arm/config/debugger/ST/STM32H7x5_M7.dmacTue Nov 19, 2024 10:46:36: Loaded macro file: C:\Program Files\IAR Systems\Embedded Workbench 9.2\arm/config/debugger/ST/STM32H7x5_DBG.dmacTue Nov 19, 2024 10:46:36: Loaded macro file: C:\Program Files\IAR Systems\Embedded Workbench 9.2\arm/config/debugger/ST/STM32H7xx_OB.dmacTue Nov 19, 2024 10:46:36: Loaded macro file: C:\Program Files\IAR Systems\Embedded Workbench 9.2\arm/config/debugger/ST/STM32H7xx_TRACE.dmacTue Nov 19, 2024 10:46:37: Loaded macro file: C:\Program Files\IAR Systems\Embedded Workbench 9.2\arm/config/flashloader/ST/FlashSTM32H7x5.macTue Nov 19, 2024 10:46:37:
Hi Team,I am using STM32H523RCT6 USBX+FileX+SD card to simulate a USB flash drive, but MSC writing speed is slow and cannot be formatted by PC,The writing speed is only 250KB/S. Can you help me figure out the problem?
I want to make some modifications to the STM32H747I_DISCO_USB_Webcam example embedded in the FP-AI-VISION1 package, however I cannot find a way to open it in STM32CubeMX. I also checked the repository on GitHub for this example and no success. Any idea about how to open the settings of this example in STM32CubeMX? Thanks!
Hi everyone,I'm trying to support a 2TB SDXC using the STM32F407 microchip as a data logger. However, I encountered an issue where only around 220GB of memory can be formatted properly, instead of the full 2TB capacity.I suspected there might be a limitation in the file system(might be the lenth of a pointer or something) that restricts the addressable memory size. I've tried to trace back through the file system code but haven't been able to access the low-level implementation that might be causing this problem,Has anyone encountered similar issues or could provide some insights on:1. How to properly implement SDXC card support for large capacities?2. Any specific modifications needed in the file system to handle >1TB storage?Any help or guidance would be greatly appreciated.
Hello MembersI am facing an issue while using standard library functions such as sprintf() on STM32H7 & Free RTOS platform (newlib)IDE- Atollic true studio 9.3.0RTOS: Free RTOS + heap_5Controller : STM32H743XXI have configured FreeRTOS to enable newlib re-entrant functionality (configUSE_NEWLIB_REENTRANT == 1) and configured atollic true studio project setting to use newlib standard library. I have created 8 tasks one after another with each stack size set to 2048. Only simple sprintf functionality is executed in all tasks.Task codevoid Task1(void const * argument){ volatile float TestVar = 2.5; volatile char TestBuffer[25]; while(1) { memset(TestBuffer, 0x00, sizeof(TestBuffer)); sprintf(TestBuffer, "%6.2f", TestVar); osDelay(1000); }}Issuesprintf functionality with float option works on every alternate task. other tasks it simply fails and
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.