STM32407FZGT6探索者开发板在设计GPIOF9为上拉时,这个对应LED0居然是亮的

2019-07-20 07:35发布

        GPIO_InitTypeDef  GPIO_InitStructure;
        RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOF,ENABLE); //ê1ÄüGPIOFê±Öó
        GPIO_InitStructure.GPIO_Pin         = GPIO_Pin_9 | GPIO_Pin_10 ;
        GPIO_InitStructure.GPIO_Mode         = GPIO_Mode_OUT;
        GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
        GPIO_InitStructure.GPIO_PuPd         = GPIO_PuPd_UP;  //这里设置上拉,应该在上电之后就自动配置成高了,那么LED0和LED1应该是灭的,可为何却都是亮的?
        GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
        GPIO_Init(GPIOF,&GPIO_InitStructure);


说明:       
     GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;  //这里设置上拉,应该在上电之后就自动配置成高了,那么LED0和LED1应该是灭的,可为何却是亮的?

友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。