DMA_SetCurrDataCounter(DMA1_Channel3, buffersize);
DMA_Cmd(DMA1_Channel3, ENABLE);
TIM_Cmd(TIM1, ENABLE); //??TIM1
TIM_CtrlPWMOutputs(TIM1, ENABLE);//??PMW???
while(!DMA_GetFlagStatus(DMA1_FLAG_TC3)) ;
TIM_Cmd(TIM1, DISABLE); //??TIM1
TIM_CtrlPWMOutputs(TIM1, DISABLE);//??PMW???
DMA_Cmd(DMA1_Channel3, DISABLE);
DMA_ClearFlag(DMA1_FLAG_TC3);
一直死在 while(!DMA_GetFlagStatus(DMA1_FLAG_TC3)) ; 出不来。
|