sram_init_struct.memory_type = EXMC_MEMORY_TYPE_SRAM; //储存器类型为SRAM sram_init_struct.databus_width = EXMC_NOR_DATABUS_WIDTH_16B; //数据宽度16位 sram_init_struct.burst_mode = DISABLE; //禁用突发访问 sram_init_struct.nwait_config = EXMC_NWAIT_CONFIG_BEFORE; //等待输入配置 sram_ini...
dma_memory_to_memory_disable(DMA0, DMA_CH1);usart_dma_transmit_config(USART2, USART_DENT_ENABLE...
dma_circulation_disable(DMA_CH1); dma_memory_to_memory_disable(DMA_CH1); dma_circulation_disable(DMA_CH2); dma_memory_to_memory_disable(DMA_CH2); /* USART DMA enable for reception */ usart_dma_receive_config(USART0, USART_DENR_ENABLE); /* enable DMA channel2 */ dma_channel_enable(DMA...
(ADC0, ADC_REGULAR_CHANNEL, ADC0_1_2_EXTTRIG_REGULAR_NONE); adc_external_trigger_config(ADC0, ADC_REGULAR_CHANNEL, ENABLE); /* ADC DMA function enable */ adc_dma_mode_enable(ADC0); /* enable ADC interface */ adc_enable(ADC0); /* ADC校准和复位校准 */ adc_calibration_enable(ADC...
DMA0初始化 voiddma_config(void){/* ADC_DMA_channel configuration */dma_parameter_struct dma_data_parameter;/* ADC DMA0_0初始化 */dma_deinit(DMA0, DMA_CH0);/* initialize DMA single data mode */dma_data_parameter.periph_addr = (uint32_t)(&ADC_RDATA(ADC0));//外设基地址dma_data_...
内存到外设Memory To Peripheral 内存到内存Memory To Memory 外设到外设Peripheral To Peripheral Priority: 传输速度 最高优先级 Very Hight 高优先级 Hight 中等优先级 Medium 低优先级;Low 2DMA传输模式 Normal:正常模式 当一次DMA数据传输完后,停止DMA传送 ,也就是只传输一次 ...
DMA设置 ADC0初始化 voidrcu_config(void){/*使能GPIOA时钟 */rcu_periph_clock_enable(RCU_GPIOA);/* 使能ADC时钟 */rcu_periph_clock_enable(RCU_ADC0);/* 使能DMA0时钟 */rcu_periph_clock_enable(RCU_DMA0);/* 配置ADC速率 */rcu_adc_clock_config(RCU_CKADC_CKAPB2_DIV6);} ...
void dma_channel1_init(void)。 {。 / Enable DMA1 clock /。 rcu_periph_clock_enable(RCU_DMA1); / Configure DMA channel 1 /。 dma_deinit(DMA1, DMA_CH1); dma_periph_address_config(DMA1, DMA_CH1, (uint32_t)&I2C0_STAT0(I2C0)); dma_memory_address_config(DMA1, DMA_CH1, (uint32...
voidusart_dma_transmit(uint8_t*pData,uint32_tnum){usart_flag_clear(USART0, USART_FLAG_TC); dma_channel_disable(DMA1, DMA_CH7);dma_flag_clear(DMA1, DMA_CH7, DMA_FLAG_FTF);dma_memory_address_config(DMA1, DMA_CH7, DMA_MEMORY_0, (uint32_t)pData);dma_transfer_number_config(DMA...
void TxRx_DMA_Config(void)//DMA发送接收初始化 { dma_parameter_struct dma_init_struct; /* enable DMA clock */ rcu_periph_clock_enable(RCU_DMA); /* initialize DMA channel1 */ dma_deinit(DMA_CH1); dma_struct_para_init(&dma_init_struct); dma_init_struct.direction = DMA_MEMORY_TO_PERI...