-
关于GD32H757 ADC定时器触发+DMA 配置后DMA的数据不更新
voidADC_rcu_config(void){/*enableGPIOclock*/rcu_periph_clock_enable(RCU_GPIOA);/*enableADCclock*/rcu_periph_clock_enable(RCU_ADC0);/*enableDMAclock*/rcu_periph_clock_enable(RCU_DMA0);rcu_periph_clock_enable(RCU_DMAMUX);/*enabletrigselclock*/rcu_periph_clock_enable(RCU_TRIGSEL);/*enabletimer1clock*/rcu_periph_clock_enable(RCU_TIMER1);rcu_timer_clock_prescaler_config(RCU_TIMER_PSC_MUL4);}/*!\briefconfiguretheGPIOperipheral\paramnone\param[out]none\retvalnone*/voidADC_GPIO_Config(void){/*configtheGPIOasanalogmode*//**/gpio_mode_set(GPIOA,GPIO_MODE_ANALOG,GPIO_PUPD_NONE,AirPress_PIN|IExpValve_PIN);}/*!\briefconfiguretheTIMERperipheral\paramnone\param[out]none\retvalnone*/voidtimer_config(void){timer_oc_parameter_structtimer_ocintpara;timer_parameter_structtimer_initpara;/*enabletrigselclock*/rcu_periph_clock_enable(RCU_TRIGSEL);/*enabletimer1clock*/rcu_periph_clock_enable(RCU_TIMER1);rcu_timer_clock_prescaler_config(RCU_TIMER_PSC_MUL4);/*TIMER1configuration*/timer_initpara.prescaler=300-1;timer_initpara.alignedmode=TIMER_COUNTER_EDGE;timer_initpara.counterdirection=TIMER_COUNTER_UP;timer_initpara.period=500-1;timer_initpara.clockdivision=TIMER_CKDIV_DIV1;timer_initpara.repetitioncounter=0;timer_init(TIMER1,&timer_initpara);/*CH0configurationinPWMmode1*/timer_ocintpara.ocpolarity=TIMER_OC_POLARITY_HIGH;timer_ocintpara.outputstate=TIMER_CCX_ENABLE;timer_channel_output_config(TIMER1,TIMER_CH_1,&timer_ocintpara);timer_channel_output_pulse_value_config(TIMER1,TIMER_CH_1,100);timer_channel_output_mode_config(TIMER1,TIMER_CH_1,TIMER_OC_MODE_PWM1);timer_channel_output_shadow_config(TIM
2024-05-06 0 -
有没有LKS32MC081 串口DMA的发送和接收的程序代码 麻烦发一份
如题有没有LKS32MC081串口DMA的发送和接收的程序代码麻烦发一份官网上没找到相关例程
2023-12-18 0 -
有没有LKS32MC081的串口 DMA 发送和接收的例程
如题有没有LKS32MC081的串口DMA发送和接收的例程能否发一份从官网没找到相关例程
2023-12-18 2