AnsweredAssumed Answered

Refreshing DMA source address

Question asked by parlakf on Jun 17, 2013
Latest reply on Jun 19, 2013 by parlakf
Hello,

I want to put the data from buffer(RAM) to the GPIO port(transmit) and from another GPIO port to the buffer(RAM)(receive) with the 2MHz clock. So I'm using DMA with input capture mode of the timer. The timer input is 2MHz. 

I succeeded transmit and receive operations which are explained above. The sync clock is 8KHz in the system. The interrupt occurs in the falling edge of the sync clock.(EXTI pin) After that, I want to refresh the DMAs' source address to the beginning address. But, there is a 1 us delay occurs and this a big problem for me. 

How can I refresh DMA or how can I restart DMA in the external interrupt routine?

I'm waiting for your kindly helps.

void EXTI0_IRQHandler(void)//firat - 8 KHz Frame Sync
{  
//  if(EXTI_GetITStatus(EXTI_Line0) != RESET)
//   {
        //EXTI_ClearITPendingBit(EXTI_Line0);
        EXTI->PR = EXTI_Line0; 
//      DMA_InitStructure_.DMA_Memory0BaseAddr = (uint32_t)BPLDMATxBuff;
//      BPLTx_DMA_STREAM->M0AR = DMA_InitStructure_.DMA_Memory0BaseAddr;
//      DMA_InitStructure_.DMA_Memory0BaseAddr = (uint32_t)BPLDMARxBuff;
//      BPLRx_DMA_STREAM->M0AR = DMA_InitStructure_.DMA_Memory0BaseAddr;   
     
        DMA_Cmd(BPLTx_DMA_STREAM, ENABLE);
        DMA_Cmd(BPLRx_DMA_STREAM, ENABLE);
        TIM_DMACmd(TIM1,TIM_DMA_CC1 | TIM_DMA_CC2,ENABLE);
        TIM_Cmd(TIM1, ENABLE);
        TIM_ITConfig(TIM1, TIM_IT_CC1 | TIM_IT_CC2, ENABLE);
         
//  }
}

Outcomes