cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_TIM_PWM_Start_DMA fires a TEIF flag in DMA (transfer error)

SFrol.1
Associate

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):

SFrol1_0-1742596277977.png

Timer Settings:

SFrol1_1-1742596360271.png

DMA Settings:

SFrol1_2-1742596407519.png

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).

SFrol1_3-1742596830017.png
What is the wrong? How will can I fix this ?
Thanks.

 

1 REPLY 1
TDK
Guru

Show the DMA1 stream 7 registers. Is the data somewhere DMA can access?

 

If you feel a post has answered your question, please click "Accept as Solution".