2012-12-17 02:17 AM
Hi All,
CNF1 and CNF0 bits at port configuration register. 11 is reserved , 10 makes it pull - up/ down.I think it connects pull up and down resistor at same time.Is it possible to select pull - up only.Thanks2012-12-17 02:47 AM
You can set it with ODR, just like GPIO output.
When the output bit is '1' you have pull-up, if '0' then pull-down.2012-12-17 05:05 AM
2012-12-18 12:35 AM
GPIO_InitTypeDef
GPIO_InitStructure;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC,
ENABLE
);
GPIO_InitStructure.
GPIO_Mode
=
GPIO_Mode_IPU
;
GPIO_InitStructure.GPIO_Pin
= GPIO_Pin_6; GPIO_Init(GPIOC, &GPIO_InitStructure
); this is an example show how to configure pin 6 in port C as input pull up .