cancel
Showing results for 
Search instead for 
Did you mean: 

making DMA buffer in auto type will cause MDMA to switching from looplisting(circular) to linear(one time run).

SeyyedMohammad
Senior III

In the code:

adcbuf[1]=1;
  noise_buf[1]=4;
  uint32_t hal_status = HAL_OK;
  static uint32_t buftransit = 125;
 
  buftransit=2;
  noise_buf[2]=buftransit;
  HAL_LPTIM_PWM_Start(&hlptim3, 0XFFFF, 0X7FFF);
  HAL_DMAEx_EnableMuxRequestGenerator(&hdma_dma_generator0);
  HAL_DMA_Start(&hdma_dma_generator0, (uint32_t)&adcbuf[1], (uint32_t)&buftransit, 1);
  hal_status = HAL_MDMA_Start(&hmdma_mdma_channel41_dma1_stream0_tc_0, &adcbuf[1],
		  	  	  	  	  	  	  	  	  	  	  	  	  	  &noise_buf[0],
															  2,
															  3);

By removing the word 'static' from line 4 causes to MDMA stop woring after 3 buffer transfer. Full code is appended on STM32cubeIDE 1.10.1 STM32F743vit6

0 REPLIES 0