2025-03-21 3:45 PM
Hello.
I am trying to add simplest project, that sends PWM (TIM3 through DMA)
I am using Nucleo F411 board. Firmware pack for STM32F4 is v1.28.0
PWM output is assigned to PC8 (TIM3_CH3).
Clocks (HSI):
Timer Settings:
DMA Settings:
All is seems simple. In code I just call:
uint32_t tdata[4] = {500,500,500,500};
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
MX_DMA_Init();
MX_TIM3_Init();
/* USER CODE BEGIN 2 */
stat = HAL_TIM_PWM_Start_DMA(&htim3, TIM_CHANNEL_3, tdata, 4);
/* USER CODE END 2 */
stat returns HAL_OK. But I don't have any PWM signal. When I tried to check what is going on, I found that
Transfer Error Interrupt Flag (TEIF) fires in SR register (HISR for Stream7) in DMA (and Error callback is also calling).
What is the wrong? How will can I fix this ?
Thanks.
2025-03-21 6:05 PM
Show the DMA1 stream 7 registers. Is the data somewhere DMA can access?