-
E103虚拟串口bug
开发板是GD32E103R-START,板载25MHz时钟。下载的Firmware_Library_V1.2.1使用cdc_acm例子,PC机win10,已安装官方虚拟串口驱动,但识别不到usb串口。-----------------------------------------------------------------------------------------------------------------------------------------------------------如果使用GD32103E_EVAL的开发板,下载F103的USB虚拟串口例子,PC机可以识别到虚拟串口,测试收发都无问题。F1降频到96MHz,USB时钟才能是48MHz。
2021-09-13 2 -
GD32E230使用高级定时器的比较输出
初始化的时候就死机了,不知道怎么使用高级定时器的比较输出模式voidb_timer_config(uint16_t__pres,uint16_t__period,uint16_t__pulse){//timer_oc_parameter_structtimer_ocinitpara;timer_parameter_structtimer_initpara;timer_break_parameter_structtimer_breakpara;rcu_periph_clock_enable(RCU_TIMER0);timer_deinit(TIMER0);timer_struct_para_init(&timer_initpara);timer_initpara.prescaler=__pres;timer_initpara.alignedmode=TIMER_COUNTER_EDGE;timer_initpara.counterdirection=TIMER_COUNTER_UP;timer_initpara.period=__period;//10KHztimer_initpara.clockdivision=TIMER_CKDIV_DIV1;timer_initpara.repetitioncounter=0;timer_init(TIMER0,&timer_initpara);//timer_channel_output_struct_para_init(&timer_ocinitpara);//timer_ocinitpara.outputstate=TIMER_CCX_ENABLE;//timer_ocinitpara.outputnstate=TIMER_CCXN_DISABLE;//timer_ocinitpara.ocpolarity=TIMER_OC_POLARITY_HIGH;//timer_ocinitpara.ocnpolarity=TIMER_OCN_POLARITY_HIGH;//timer_ocinitpara.ocidlestate=TIMER_OC_IDLE_STATE_LOW;//timer_ocinitpara.ocnidlestate=TIMER_OCN_IDLE_STATE_LOW;//timer_channel_output_config(TIMER0,TIMER_CH_0,&timer_ocinitpara);timer_break_struct_para_init(&timer_breakpara);timer_breakpara.runoffstate=TIMER_ROS_STATE_ENABLE;timer_breakpara.ideloffstate=TIMER_IOS_STATE_ENABLE;timer_breakpara.deadtime=164;timer_breakpara.breakpolarity=TIMER_BREAK_POLARITY_LOW;timer_breakpara.outputautostate=TIMER_OUTAUTO_ENABLE;timer_breakpara.protectmode=TIMER_CCHP_PROT_OFF;timer_breakpara.breakstate=TIMER_BREAK_ENABLE;timer_break_config(TIMER0,&timer_breakpara);timer_channel_output_pulse_value_config(TIMER0,TIMER_CH_0,__pulse);timer_channel_output_mode_config
2021-04-08 10