| 
 
| 请问有人知道gd32f130的PF0,PF1怎么设为普通io使用吗? 我看手册PF0,PF1默认是作为GPIO口使用,但是实际使用无法控制IO口电平。
 void pwr_ctr_init(void)
 {
 GPIO_InitPara  GPIO_InitStructure;
 RCC_AHBPeriphClock_Enable(RCC_AHBPERIPH_GPIOF, ENABLE);
 
 GPIO_InitStructure.GPIO_Pin = GPIO_PIN_1;
 GPIO_InitStructure.GPIO_Mode = GPIO_MODE_OUT;
 GPIO_InitStructure.GPIO_OType = GPIO_OTYPE_PP;
 GPIO_InitStructure.GPIO_PuPd = GPIO_PUPD_PULLUP;//GPIO_PUPD_NOPULL;
 GPIO_InitStructure.GPIO_Speed = GPIO_SPEED_2MHZ;
 GPIO_Init(GPIOF, &GPIO_InitStructure);
 GPIOF ->BOR = GPIO_PIN_1 ;//置H
 }
 这份代码不起作用,IO口有2.9V的电压(也可能是外部电路的电路分压)。
 | 
 |