问答

汇集网友智慧,解决技术难题

zhouyu1528

TA的家园币:150  

  • GD32F103T8U6配置PWM输出,无输出。

    #defineM_G_UGPIOA#defineM_G_VGPIOA#defineM_G_WGPIOB#defineM_G_P_UGPIO_PIN_6#defineM_G_P_VGPIO_PIN_7#defineM_G_P_WGPIO_PIN_0#defineM_G_UNGPIOA#defineM_G_VNGPIOA#defineM_G_WNGPIOA#defineM_G_P_UNGPIO_PIN_3#defineM_G_P_VNGPIO_PIN_4#defineM_G_P_WNGPIO_PIN_5#defineM_G_FAULTGPIOB#defineM_G_P_FAULTGPIO_PIN_1#defineM_G_SLEEPGPIOB#defineM_G_P_SLEEPGPIO_PIN_2#defineH_G_AGPIOA#defineH_G_BGPIOA#defineH_G_CGPIOA#defineH_G_P_AGPIO_PIN_0#defineH_G_P_BGPIO_PIN_1#defineH_G_P_CGPIO_PIN_2rcu_periph_clock_enable(RCU_GPIOA);rcu_periph_clock_enable(RCU_AF);timer_parameter_structtimer_initpara;timer_oc_parameter_structtimer_ocintpara;gpio_init(M_G_U,GPIO_MODE_AF_PP,GPIO_OSPEED_50MHZ,M_G_P_U);gpio_init(M_G_V,GPIO_MODE_AF_PP,GPIO_OSPEED_50MHZ,M_G_P_V);gpio_init(M_G_W,GPIO_MODE_AF_PP,GPIO_OSPEED_50MHZ,M_G_P_W);gpio_init(M_G_UN,GPIO_MODE_OUT_PP,GPIO_OSPEED_50MHZ,M_G_P_UN);gpio_init(M_G_VN,GPIO_MODE_OUT_PP,GPIO_OSPEED_50MHZ,M_G_P_VN);gpio_init(M_G_WN,GPIO_MODE_OUT_PP,GPIO_OSPEED_50MHZ,M_G_P_WN);gpio_init(M_G_FAULT,GPIO_MODE_OUT_PP,GPIO_OSPEED_50MHZ,M_G_P_FAULT);gpio_init(M_G_SLEEP,GPIO_MODE_OUT_PP,GPIO_OSPEED_50MHZ,M_G_P_SLEEP);gpio_bit_reset(M_G_UN,M_G_P_UN);gpio_bit_reset(M_G_VN,M_G_P_VN);gpio_bit_reset(M_G_VN,M_G_P_WN);gpio_bit_set(M_G_FAULT,M_G_P_FAULT);gpio_bit_set(M_G_SLEEP,M_G_P_SLEEP);rcu_periph_clock_enable(RCU_TIMER2);timer_deinit(TIMER2);//timer_struct_para_init(&timer_initpara);timer_initpara.prescaler=1-1;timer_initpara.period=5000-1;timer_initpara.alignedmode=TIMER_COUNTER_EDGE;timer_initpara.counterdirection=TIMER_COUNTER_UP;timer_initpara.clockdivision=TIMER_CKDIV_DIV1;timer_initpara.re

    IO pi timer TI PWM输出 gd32F103

    2024-04-19 1
  • 为什么我安装的后编译会这样

    本帖最后由tyw于2024-4-1914:36编辑.\Objects\123.sct(7):error:L6236E:Nosectionmatchesselector-nosectiontobeFIRST/LAST.tyw注

    ST TI AC se 编译 安装

    2024-04-19 0
  • 如何解决keil5编译但lcd12864显示汉字时乱码?求求了

    这是部分代码:#include#defineucharunsignedchar//以后unsignedchar就可以用uchar代替#defineuintunsignedint//以后unsignedint就可以用uint代替sbitLcdRs_P=P2^0;//液晶的RS管脚sbitLcdRw_P=P2^1;//液晶的RW管脚sbitLcdEn_P=P2^2;//液晶的EN管脚//毫秒级的延时函数,time是要延时的毫秒数voidDelayMs(uinttime){uinti,j;for(i=0;i

  • 平时工作比较忙大家有什么比较好的减肥方式?

    平时工作比较忙导致运动不足,然后就有了“游泳圈”,胳膊和腿上倒是还好,不知道大家有什么比较好的运动减肥方式?

    2024-03-10 43