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
Hi, I would like to use MDMA to get values from ADC. I have one adc set with 6 channels, starting conversion with timer (100µs). So I would like to save in memory adc values like that : val1, val2, val3, val4, val5, val6 -> val1(100µs),val1(200µs)...val1(1000µs),val2(100µs),val2(200µs)...val2(1000µs)...val6(1000µs) the destination memory is 60 values of 16 bits. That means I would like to be interrupted every 1ms by MDMA. So I use this configuration (at beginning I would like to test only 2 first values val1 and val2): this is the code to initialize MDMA MDMA_HandleTypeDef hmdma_mdma_channel0_dma1_stream2_tc_0; MDMA_LinkNodeTypeDef node_mdma_channel0_dma1_stream2_tc_1; /** * Enable MDMA controller clock * Configure MDMA for global transfers * hmdma_mdma_channel0_dma1_stream2_tc_0 * node_mdma_channel0_dma1_stream2_tc_1 */ void MX_MDMA_Init(void) { /* MDMA controller clock enable */ __HAL_RCC_MDMA_CLK_ENABLE(); /* Local variables */ MDMA_LinkNodeConfTypeDef nodeConfig; /*
I'm using an STM32G431 with FreeRTOS. I have a total of 5 tasks, including the default task, and all of them were set to osPriorityLow. With this configuration, the tasks did not run properly. When creating the tasks, NULL was not returned and no error occurred. After changing all task priorities to osPriorityNormal, the problem was fixed. I don't really understand why this happens. Each task has a reasonable osDelay(), so I don't think any specific task is blocking the others. Also, if a task were blocking, I would expect the same problem to happen even after changing the priority. I also tried changing the heap size and the stack size, but that did not seem to be the cause. Has anyone experienced a similar issue, or does anyone know why changing all tasks from osPriorityLow to osPriorityNormal would make a difference?
MCU STM32H503KBU internal clock 64 MHz During a UART restart,the HAL_UART_Init function callsHAL_RCCEx_PeriphCLKConfig, which results in a HardFault_Handler void UART_Set_BaudRate(UART_HandleTypeDef *huart, uint32_t BaudRate) { if (HAL_UART_DeInit(huart)!= HAL_OK) { Error_Handler(); } huart->Instance = USART1; huart->Init.BaudRate = BaudRate; huart->Init.WordLength = UART_WORDLENGTH_8B; huart->Init.StopBits = UART_STOPBITS_1; huart->Init.Parity = UART_PARITY_NONE; huart->Init.Mode = UART_MODE_TX_RX; huart->Init.HwFlowCtl = UART_HWCONTROL_NONE; huart->Init.OverSampling = UART_OVERSAMPLING_16; huart->Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; huart->Init.ClockPrescaler = UART_PRESCALER_DIV1; huart->AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; if (HAL_UART_Init(huart) != HAL_OK) { Error_Handler(); } if (HAL_UART_Receive_IT( OW.huart, &uart_temp, 1) != HAL_OK) Error_Handler(); } If y
I'm currently developing an external loader on STM32H563ZIT6 development board.I'm facing an issue on programming with cube programmer in the image belowThe problem I think might be linked to interrupt handler of systick. I've attached the Loader_src.c file where I had developed the functions used by Cube Programmer; also attached the linker used. The low level functions linked to XSPI communication are properly working, because I had tested in debug erasing and writing sectors. I need help to figure out the problem.
hello,I encountered a problem while developing for stm32u585. When the stm32 wakes up from standby mode, the HAL_RCC_OscConfig() function occasionally fails, "Wait till LSI is disabled" timeout in HAL_RCC_OscConfig() (this project uses IWDG)The specific process is as follows:1. start boot HAL_Init(); SystemClock_Config(); MX_GPIO_Init(); MX_ICACHE_Init(); MX_UART4_Init(); boot to other address(app) 2. app init HAL_Init(); SystemClock_Config(); RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI48|RCC_OSCILLATORTYPE_LSI |RCC_OSCILLATORTYPE_HSE|RCC_OSCILLATORTYPE_LSE; RCC_OscInitStruct.HSEState = RCC_HSE_ON; RCC_OscInitStruct.LSEState = RCC_LSE_ON_RTC_ONLY; RCC_OscInitStruct.HSI48State = RCC_HSI48_ON; RCC_OscInitStruct.LSIState = RCC_LSI_ON; RCC_OscInitStruct.LSIDiv = RCC_LSI_DIV128; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE; RCC_OscInitStruct.PLL.PLLMBOOST = RCC_PLLMBOOST_DIV1; RCC_OscInitStruct.PLL.PLLM = 1
If the user uses "-Wundef" the header "stm32u3xx_hal_def.h" creates a lot of warnings due to a missing check if a preprocessor macro is defined before evaluating it.The warning gets emmited by the following #ifs used in STM32Cube FW_U3 V1.3.0 inside "stm32u3xx_hal_def.h":#if defined ( __CC_ARM ) || ((__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) || defined ( __GNUC__ )e.g. in line 142This is how it was correctly checked in e.g. the STM32Cube FW_G0 V1.6.3 in the hal def header for the stm32g0 hal:#if defined ( __CC_ARM ) || (defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)) Best Regards
Environment:Board: STM32H7S78-DKMCU: STM32H7S7L8H6Stack: AzureRTOS USBX (PIMA MTP + CDC ACM) + FileX.Storage: microSD Card.Host OS: Windows 11 Preliminary Note:A significant portion of this code is adapted from the official ST example:stm32-usbx-examples/Projects/STM32H735G-DK/Applications/USBX/Ux_Device_PIMA_MTP at main · STMicroelectronics/stm32-usbx-examples Current Status:I have successfully implemented the MTP class. The device is correctly recognized by Windows, the storage is mounted, and I can view and modify files located in the root directory.To manage MTP objects, I use a custom function SD_Scan, which traverses the FileX filesystem and builds a local object handle table (ObjectHandleTypeDef).VOID SD_Scan(VOID) { /* Estructura estática para no usar el STACK */ static FolderList_t folder_list[SD_MAX_HANDLES]; /* Variables de control de la cola con nombres claros */ UINT NextFolderToScan = 0; UINT TotalFoldersInList = 0; /* Variables de es
Hello,I want to generate an arbitrary waveform by a timer using DMA. The waveform is using different pulse widths and also varying periods in multiples of 25µs.By reading AN4776 and HAL documentation I figured out it should be possible with HAL_TIM_DMABurst_MultiWriteStart() function. Unfortunately I don't get an output signal except after reset where a short pulse can be seen. I assume this pulse is due to port configuration during initialization. After that pulse, the signal stays high.My setup (CubeMX):Nucleo32-L432, core clock 80MHzUsed timer is Tim16Prescaler is set to 399 => 80 MHz / 400 = 5µs resolutionARR and CCR preload enabledARR and CCR set to 0 (initialized in source code)DMA enablednormal modememory to peripheralWord / Wordincrement address on memoryinterrupt enabledFor a first run I want to use fixed pulse widths and varying periods, so all my code does is the following:/* USER CODE BEGIN 2 */ htim16.Instance->ARR = 39; //40 * 5µs = 200µs period htim16.Instance
Here is the config:mcu stm32h743iit6flash 4 lines 1 bank 32mb W25Q256JVsdram 32mb W9825G6KHhere is the flow 1 read image background from qspi 2 decode image with axi sram at #define JPEG_WORKSPACE_BASE 0x24040000 // AXI SRAM (fast) #define JPEG_WORKSPACE_SIZE (256 * 1024) // 512KB (up from 256KB)3 copy buffer to external sdram4 dma2d copy and display image . scenario1 is ok LIBJPEG_DecodeToBuffer((uint32_t)IMG_NEW6, IMG_NEW6_SIZE, (uint32_t*)DECODE_BUFFER1); uint32_t decode_time = HAL_GetTick() - start; printf("✅ JPEG decode: %lu ms\n", decode_time); // Test 3: Display the image start = HAL_GetTick(); //Display_ImageAt_Fast((uint32_t*)DECODE_BUFFER1, 1024, 600, 0, 0); Display_ImageAt((uint32_t*)DECODE_BUFFER1, 1024, 600, 0, 0); HAL_Delay(4000); Clear_SDRAM(); LIBJPEG_DecodeToBuffer((uint32_t)IMG_NEW8, IMG_NEW8_SIZE, (uint32_t*)DECODE_BUFFER3); // uint32_t decode_time = HAL_GetTick() - start; printf("✅ JPEG decode: %lu ms\n", decode_tim
Hello,I am currently working on a simple USB Power Delivery test project using the STM32G071C8.The system has two USB Type-C ports.I need to detect PDO information and eMarker capabilities in order to determine the appropriate power delivery behavior. However, eMarker detection requires VDM-related functionality, and I could not find any relevant examples or documentation on the official website to continue development.The usbpd_vdm_user files generated by STM32CubeMX are essentially empty, and I could not find any useful reference information in either STM32CubeG0 v1.6.3 or X-CUBE-TCPP.Could you please provide any related example code, application notes, or documentation that demonstrates:VDM handlingDiscover Identity floweMarker cable detectionSOP'/cable communicationAny reference material would be greatly appreciated and would help me continue development.Thank you.
Hello. STM32H5I'm used to cache operations using memory barriers (ISB/DSB), but looking at a function like HAL_ICACHE_Invalidate() or HAL_DCACHE_Invalidate() I can't find any. Are memory barriers not needed with STM32 ICACHE/DCACHE?
I am a beginner in electronics. I recently designed a board using the STM32F407VGT6 and DP83848, but after assembly and testing, I encountered a problem. The board can be programmed and it runs, but the Ethernet section does not work properly. It does not obtain an IP address. When I ping any IP address in network range, the Ethernet LED(pin 26) turns on and off, but the Ethernet connection is not actually established. I would appreciate it if you could guide me regarding the schematic and circuit so I can solve this issue.I attach my pcb schematic and board
I am working with the STM32H723ZG and trying to implement Ethernet communication without using an RTOS using LWIP(TCP/IP) Setup Details: Board: NUCLEO-H723ZG IDE: STM32CubeIDE v1.19.0 Ethernet stack: LwIP PHY interface: RMII Flashing tool: ST-LINK (onboard) Test performed: Ping test from PC Observed behavior: The Ethernet port LEDs (orange and green) remain solid ON after connecting the Ethernet cable. Ping is failing continuously, I got (Destination host unreachable) error. Troubleshoot taken: Checked with multiple Ethernet cables to ensure cable isn't a problem. I'm using static Ip and checked the Ip is correct in lwip.c while flashing the board. Rebuilt and reflashed the project multiple times. After all this still I can't ping the board. Assistance required : is there is any problem in cache coherency in the code? Kindly check with the MPU unit configuration and let me know is there is any issue? I'm
Hi, I have an USBPD sink application created with CubeMX that can be found here:https://github.com/ThiRom/H563NucleoUSBPDSink The project can be build using cmake. If the project is build using Debug configuration, it works. But using Release it shows timeouts on requests. As you can see below during one millisecond the firmware sends 3 retries and a soft reset. This problem can be seen with -O2 and -O3 option. It seems that the file usbpd_timersserver.c is not working correctly. I found that function: uint32_t USBPD_TIM_IsExpired(TIM_identifier Id) { uint32_t _expired = 1u; switch (Id) { case TIM_PORT0_CRC: _expired = TIMX_CHANNEL1_GETFLAG(TIMX); break; case TIM_PORT0_RETRY: _expired = TIMX_CHANNEL2_GETFLAG(TIMX); break; case TIM_PORT1_CRC: _expired = TIMX_CHANNEL3_GETFLAG(TIMX); break; case TIM_PORT1_RETRY: _expired = TIMX_CHANNEL4_GETFLAG(TIMX); break; default: break; } return _expired; } When I change it to this: uint32_t USBPD_TIM_Is
The FSBL → Application jump is working fine, and the application is running properly from external flash.However, I am facing the following issues:Ethernet IssueEthernet initialization is successfulPHY link is UP, but speed is 10 Mbps (Full Duplex)Ping is not workingEthernet TX is failing continuouslyNo UDP data transmissionCamera IssueCamera (IMX335) is detected over I2CInitialization is successfulStreaming is startedBut no frame data is received (first frame timeout)Support RequiredHow to fix Ethernet bring-up (speed, ping, TX issue)Any example/project for Ethernet + UDP communicationGuidance for CSI/DCMIPP camera interface and how to read frame dataThe suggested VENC_RTSP_Server example contains only initialization; full configuration and setup details are not clear & .ioc also missingThese issues are blocking further progress. Kindly provide guidance or reference examples.
Hi all !I'm trying to write a driver for a LevelX system to talk to a QSPI chip over the OCTOSPI1 peripheral (STM32H563). I got the chip to respond to most commands, set it up in reading / protected mode.But, later, I've spotted an issue : I cannot sent over DMA two buffer, one after the other (as I did, two call to the Transmit_DMA function). Or, the LevelX API provide me two buffer, that may not be contigous. That's the issue, how to do ?I reminded that this chip has Linked List functionnality, which does match what I want (two DMA transfer from / to two different memory space, but, within one frame (Only one NCS being low).And, I cannot find a way to make them work...From a general perspective, the code is build like that : if (xfer_size > GD25_DMA_THRESHOLD) { /* * Clean the semaphore, to ensure we restart from 0. */ while (tx_semaphore_get(&
Hi everyone, I’d like to ask for your expertise. I’m working with a custom board based on the STM32H755ZIT, configured in LDO mode. My issue is that when I connect the board to my PC via USB to use the Virtual COM Port (VCP), the computer does not detect the device. I haven’t encountered this problem on other boards I’ve used, such as those with STM32L4 or STM32WB, where USB VCP works as expected. Is there a particular difference in the USB VCP implementation between the STM32H7 series and the STM32L4/WB series that I should be aware of? Here is the noteworthy configuration of my project in CubeMX RCC, HSE=Crystal/Ceramic Resonator SupplySource = PWR_LDO_Supply (This is in line with my hardware design) Power Regulator Voltage Scale = Scale 2 USB_OTG_FS,Mode=Device_Only USB_DEVICE_M7, Class For FS IP = Communication Device Class (Virtual Port Com) For the code: usbd_cdc_if.c /* USER CODE BEGIN PRIVATE_VARIABLES */ USBD_CDC_LineCodingTypeDef LineCoding = { 115200, /* baud
Hi,How do I serve request Get Source Capabilities Extended? I'm using STM32G0B1 with a port configured as SRC.When a SINK sends the Get Source Capabilities Extended the STM PD library responds with 'Not Supported' and my code is not aware that this even did happen. Is there way to intercept and serve this request? At least the callback structure does not appear to have direct support for this. USBPD_DPM_ExtendedMessageReceived is never called. /* CAD callback definition */ static const USBPD_PE_Callbacks dpmCallbacks = { USBPD_DPM_SetupNewPower, USBPD_DPM_HardReset, USBPD_DPM_EvaluatePowerRoleSwap, USBPD_DPM_Notification, USBPD_DPM_ExtendedMessageReceived, USBPD_DPM_GetDataInfo, USBPD_DPM_SetDataInfo, USBPD_DPM_EvaluateRequest, USBPD_DPM_SNK_EvaluateCapabilities, USBPD_DPM_PowerRoleSwap, USBPD_PE_TaskWakeUp, #if defined(_VCONN_SUPPORT) USBPD_DPM_EvaluateVconnSwap, USBPD_DPM_PE_VconnPwr, #else NULL, NULL, #endif /* _VCONN_SUPPORT */ USBPD_DPM_EnterErrorR
Hello all,There might be a possible bug in HAL_UART_DeInit(). When calling HAL_UART_DeInit() when it is already initialized could lead to CPU starvation. Assume that an interrupt fires after calling __HAL_UART_DISABLE(huart); and before huart->Instance->CR1 = 0x0U; the interrupt is going to keep firing provided that some conditions are met. I was able to run a debug session and saw that only the interrupt was firing.From the ref. manual -> Note: If TE bit is reset and no transmission is on going, the TC bit is immediately set.This means that the TC bit is always going to be set and the interrupt is constantly going to fire regardless of clearing the TCF in ICR. The reference manual also mentions to ensure TC bit is being set before calling __HAL_UART_DISABLE(huart).I am running into this issue when TE is reset and TXIE is set after calling __HAL_UART_DISABLE(huart). This happens extremely rarely but I am able to reproduc
is there a template for developing a custom bootloader that uses the lpuart?Has the application firmware the ability to trigger a bootloader state so I can upload the new application firmware into stm32g051g8?What are the changes that I have to do on the application firmware?Thank you all.
I’m working on STM32F405RGT6, receiving audio from ICS43432 (MSB First, 24bit on 32 bit frame).sing Circular DMA (double buffering) to read it in. After 3 days of debugging and millions of mem corruptions and stackoverflows later I finally managed to get the pipeline to work without MemCorruptions.Basically my implementation:I have a UItask, that handles button presses and changes the system states. The StartWriteAudioTask() starts the DMA and creates a .wav file. Also sets the systemState to STATE_RECORDING. DMA fills the buffer and gives semaphore to my MicTask, which basically does an endian conversion and writes a wav block. Just in case I also implemented a copy of the audiobuffer, because DMA might overwrite before I can manage to write it to a wav block. Using the debugger I see that my state machine logic and start/stop works fine, file initialization works as well and even the file appears and is playable. But the tim
Hi tech supoort reps, According to the documentation for the NUCLEO-563ZI (MB1404C), the board is expected to support I3C mode. However, during our evaluation, we were unable to successfully issue I3C shell and CCC (Common Command Code) commands.At this stage, it is unclear which configuration or setting does not meet the expected requirements. Could you please provide:The correct steps to enable and use the I3C interface on this boardAny required software, firmware, or device-tree configurationsA simple example or reference demonstrating successful I3C shell and CCC command execution Thank you for your support. [00:00:00.000,000] <inf> i3c_hub_init: I3C Hub I2C init start[00:00:00.004,000] <inf> i3c_hub_init: Hub I2C init done[00:00:00.104,000] <inf> i3c_bus_mgr: I3C bus re-enumeration start[00:00:00.104,000] <inf> i3c_bus_mgr: I3C CCC: RSTDAA[00:00:00.204,000] <err> i3c_bus_mgr: RSTDAA failed (-116)*** Booting Zephyr OS build v4.3.0-6019-gef798176ad4c
Greetings,I am working on testing a STM32H573 based HW design, which uses an external 4-port USB-2.0 Hub.I plan on using USB Flash drives, and read/write files to them as a diagnostic test.I will instantiate the STM32H573 USB interface as Host-mode, and have it discoverthe USB hub, and enumerate the downstream devices (flash drives/sticks).Our current SW base is using the FreeRTOS OS.Should I switch to Azure ThreadX? I have heard that the USBX ThreadX library isthe way to go?Can I run USBX under FreeRTOS, or does it require ThreadX?Thanks for any guidence!Ken CarlsonDraeger Medical Systems Inc.
Hello,On a STM32H7RS are using the USB_OTG_HS peripheral in PCD_SPEED_FULL mode using internal clock.After I was able to configure the clock so that the MCU is responding on enumeration requests. The responses however seem to be partially incorrect; the trace tool shows stalls.I did not found an example in current https://github.com/STMicroelectronics/STM32CubeH7RSThe following changes are applied to a CubeMX generated projectmain.c SystemClock_Config:LL3.PLLN was set to output 24 MHzRCC_OscInitStruct.PLL3.PLLState = RCC_PLL_ON; RCC_OscInitStruct.PLL3.PLLSource = RCC_PLLSOURCE_HSI; RCC_OscInitStruct.PLL3.PLLM = 4; RCC_OscInitStruct.PLL3.PLLN = 60; RCC_OscInitStruct.PLL3.PLLP = 2; RCC_OscInitStruct.PLL3.PLLQ = 40; RCC_OscInitStruct.PLL3.PLLR = 16; RCC_OscInitStruct.PLL3.PLLS = 2; RCC_OscInitStruct.PLL3.PLLT = 2;Configure CRS __HAL_RCC_CRS_CLK_ENABLE(); RCC_CRSInitTypeDef RCC_CRSInitStruct = {0}; RCC_CRSInitStruct.Prescaler = RCC_CRS_SYNC_DIV1; // default RCC_CRSInitSt
Hello, i am using F446 and i am contemplating using FreeRTOS CMSIS V2 software timer to generate PWM to control motors via motor drivers (IC chipset). Is this possible? Or must I use the hardware timer, TIM1~7 ?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.