sram_init_struct.address_data_mux = DISABLE; //禁用地址、数据总线多路复用 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_in...
GD32 dma_memory_address_config函数 GD单片机近几年越来越火了,既有他自身相比与ST的价格优势,也有支持国货的信仰加成。然而一个新的东西,或者说一个相对较新的东西,在使用的友好性和资料的完整性方面还有很长的路要走。 现将个人使用过程中碰到过的问题总结一下 1、jlink烧录和调试问题 这个问题非常坑!以致于...
dma_memory_to_memory_disable(DMA0, DMA_CH1);usart_dma_transmit_config(USART2, USART_DENT_ENABLE...
dma_init(DMA_CH2, &dma_init_struct); /* configure DMA mode */ 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, USA...
(PA3)=%4.0d,ADC_IN3=%1.4f\r\n",ADC0_3/10,ADC0_3/10*3.3f/4096);ADC0_Flag=0;adc_config();dma_memory_address_config(DMA0,DMA_CH0,(uint32_t)(&ADC0_Value));dma_transfer_number_config(DMA0,DMA_CH0,40);dma_channel_enable(DMA0,DMA_CH0);adc_software_trigger_enable(ADC0,...
dma_periph_address_config(DMA1, DMA_CH1, (uint32_t)&I2C0_STAT0(I2C0)); dma_memory_address_config(DMA1, DMA_CH1, (uint32_t)/your buffer address/); dma_transfer_direction_config(DMA1, DMA_CH1, DMA_MEMORY_TO_PERIPHERAL); dma_memory_width_config(DMA1, DMA_CH1, DMA_MEMORY_WIDTH_8...
(PA3)=%4.0d,ADC_IN3=%1.4f\\r\\n",ADC0_3/10,ADC0_3/10*3.3f/4096); ADC0_Flag=0; adc_config(); dma_memory_address_config(DMA0, DMA_CH0, (uint32_t)(&ADC0_Value)); dma_transfer_number_config(DMA0, DMA_CH0,40); dma_channel_enable(DMA0, DMA_CH0); adc_software_...
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...
(PA3)=%4.0d,ADC_IN3=%1.4f\r\n",ADC0_3/10,ADC0_3/10*3.3f/4096); ADC0_Flag=0; adc_config(); dma_memory_address_config(DMA0, DMA_CH0, (uint32_t)(&ADC0_Value)); dma_transfer_number_config(DMA0, DMA_CH0, 40); dma_channel_enable(DMA0, DMA_CH0); adc_software_...
dma_memory_address_config(DMA_CH1, (uint32)txbuffer); dma_transfer_number_config(DMA_CH1, (uint32_t)writeLen); /* enable DMA channel1 */ dma_channel_enable(DMA_CH1); /* USART DMA enable for transmission */ usart_dma_transmit_config(USART0, USART_DENT_ENABLE); } void DMA_Channel1...