DMA_FLAG_TC1 是传输完成标志位。确保这个标志位在您的DMA配置中是正确的。
DMA_SetCurrDataCounter(ADC1_DMA_CHANNLE,ADC1_DMA_BUFFER_SIZE); DMA_Cmd(DMA1_Channel1,ENABLE); DMA_ClearFlag(DMA1_FLAG_TC1);// ADC_SoftwareStartConvCmd(ADC1,ENABLE); } 同时也可以ADC1、ADC3同时使用,ADC3利用PF6-9,可复用为Channel4-7,页要为扫描模式,非连续模式;代码如下: ADC_InitStructure...
//通道6使能 LL_DMA_EnableChannel(DMA2, LL_DMA_CHANNEL_6); //使能发送DMA传输请求 LL_LPUART_EnableDMAReq_TX(LPUART1);}void LPUSART_DMA_SEND(uint32_t data,uint32_t len){ //等待上次传输完成 while(LL_LPUART_IsActiveFlag_TC(LPUART1) == RESET); if(LL_LPUART_IsActiveFlag_TXE(LPUART1...
Hi, Thank you for your effort. I used your code in my project. But the DMA circular mode is not for me. I want to use the DMA in Normal Mode. But the DMA is filling the buffer only once in normal mode. I'm clearing the TC1 flag after transfer completed. But DMA is not restar...
/* Enable DMA1 channel6 IRQ Channel */ NVIC_InitStructure.NVIC_IRQChannel = DMA1_Channel1_IRQn;...
flag_ADC = 1; //被main函数调用判断 } /*清除DMA中断标志位*/ DMA_ClearITPendingBit(DMA1_IT_TC1); } 采用同步模式,ADC1和ADC2的DMA传送,高16位位ADC2,低16位位ADC1的值。 代码2: __IO u32 ADC_ConvertedValue[8]; float adc_buf[16]; ...
{DMA_Cmd(DMA1_Channel1,DISABLE);//关闭DMA_SetCurrDataCounter(DMA1_Channel1,MyDMA_Size);//给传输计数器赋值DMA_Cmd(DMA1_Channel1,ENABLE);//开启while(DMA_GetFlagStatus(DMA1_FLAG_TC1)==RESET);//检查DMA1的通道1转运完成标志位,转运完成,标志位置1DMA_ClearFlag(DMA1_FLAG_TC1);//清除标志...