问答

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

21ic问答首页 - TAG - PE
  • GD32F30X timer8 timer 11初始化问题

    有哪位大佬知道,GD32F30X的 系统库函数timer_init()里没有对TIMER8/TIMER11的处理, 是什么原因?void timer_init(uint32_t timer_periph, timer_parameter_struct* initpara){ /* configure the counter prescaler value */ TIMER_PSC(timer_periph) = (uint16_t)initpara->prescaler; /* configure the counter direction and aligned mode */ if((TIMER0 == timer_periph) || (TIMER1 == timer_periph) || (TIMER2 == timer_periph) || (TIMER3 == timer_periph) || (TIMER4 == timer_periph) || (TIMER7 == timer_periph)){ TIMER_CTL0(timer_periph) &= ~(uint32_t)(TIMER_CTL0_DIR|TIMER_CTL0_CAM); TIMER_CTL0(timer_periph) |= (uint32_t)initpara->alignedmode; TIMER_CTL0(timer_periph) |= (uint32_t)initpara->counterdirection; } /* configure the autoreload value */ TIMER_CAR(timer_periph) = (uint32_t)initpara->period; if((TIMER5 != timer_periph) && (TIMER6 != timer_periph)){ /* reset the CKDIV bit */ TIMER_CTL0(timer_periph) &= ~(uint32_t)TIMER_CTL0_CKDIV; TIMER_CTL0(timer_periph) |= (uint32_t)initpara->clockdivision; } if((TIMER0 == timer_periph) || (TIMER7 == timer_periph)){ /* configure the repetition counter value */ TIMER_CREP(timer_periph) = (uint32_t)initpara->repetitioncounter; } /* generate an update event */ TIMER_SWEVG(timer_periph) |= (uint32_t)TIMER_SWEVG_UPG; }

    兆易创新 GD32 gd32f30x 11 timer PE

    410浏览量 8回复量 关注量
  • usb type c的信号母座公头对接的时候信号连接的疑问 sos

    [i=s] 本帖最后由 jsaw 于 2025-5-1 17:43 编辑 [/i] 1.图示分别是母座和公头的信号定义,都是从外向内看的视角 2.当要连接公头和母座的时候,就需要镜像一个其中;比如左右镜像公头的定义,这时候对接的时候,公头的A1和母座的A1连接,A2连接A2 ......; 这时候发现公头母座的TX1和母座的TX1 连接,而不是tx和rx连接,不明白为什么这样定义 [url=/data/attachment/album/202505/01/173448rbo9tt444am4ni4w.jpg][img]/data/attachment/album/202505/01/173448rbo9tt444am4ni4w.jpg[/img][/url]

    技术交流 USB 信号 疑问 PE 定义

    2154浏览量 0回复量 关注量