cancel
Showing results for 
Search instead for 
Did you mean: 

LL Low Layer Driver DMA doesn't start not Interrupt

GIkar
Associate III

Hello,

I try a exable from ST documentation but the trasfer never happens.

##################### Init and Start DAC and DMA #########################

 LL_DAC_EnableDMAReq(DAC1, LL_DAC_CHANNEL_1); // enable DMA for Channel1

 LL_DAC_Enable(DAC1, LL_DAC_CHANNEL_1); //enable Channel on DAC

 LL_DMA_ConfigAddresses(DMA1, LL_DMA_STREAM_5 , (uint32_t)&DAC_Buff, LL_DAC_DMA_GetRegAddr(DAC1, LL_DAC_CHANNEL_1, LL_DAC_DMA_REG_DATA_12BITS_RIGHT_ALIGNED ), LL_DMA_DIRECTION_MEMORY_TO_PERIPH );

 LL_DMA_SetDataLength(DMA1, LL_DMA_STREAM_5, DACBUFSIZE );

 LL_DMA_EnableStream(DMA1, LL_DMA_STREAM_5); 

 LL_DMA_EnableIT_HT(DMA1, LL_DMA_STREAM_5);

 LL_DMA_EnableIT_TC(DMA1, LL_DMA_STREAM_5 );

###################################################################

In a function I start the timer6, config as trigger for DMA

......

 TIM6->CR1 |= TIM_CR1_CEN;                 // start timer to trigger DMA transfer 

 while(1)

 {

       volatile ITStatus it_st;  

       it_st = RESET;

// wait for the half trasfer flag -> NEVER happens :(

   while(it_st == RESET) {  

   it_st =   LL_DMA_IsActiveFlag_HT5(DMA1);       

   }

.....

Does anybody knows whats I forget ?

0 REPLIES 0