2013-02-28 12:31 AM
Good day,
I configure PortB PB2, PB3 and PB4 as inputs, pull-up, no ext int. These pins work 100% no problem. I also configure PortC, PC0 and PC1 precisely the same as the above pins but the pull-ups is not connected. Can anybody tell me what to do to get the pull-ups activated. See my configuration code below. #define ADDR_GPIO_PORT GPIOB #define ADDR1_GPIO_PIN GPIO_Pin_2 #define ADDR2_GPIO_PIN GPIO_Pin_3 #define ADDR3_GPIO_PIN GPIO_Pin_4 #define ADDRn_GPIO_PORT GPIOC #define ADDR4_GPIO_PIN GPIO_Pin_0 #define ADDR5_GPIO_PIN GPIO_Pin_1 GPIO_Init( ADDR_GPIO_PORT, ADDR1_GPIO_PIN, GPIO_Mode_In_PU_No_IT); GPIO_Init( ADDR_GPIO_PORT, ADDR2_GPIO_PIN, GPIO_Mode_In_PU_No_IT); GPIO_Init( ADDR_GPIO_PORT, ADDR3_GPIO_PIN, GPIO_Mode_In_PU_No_IT); GPIO_Init( ADDRn_GPIO_PORT, ADDR4_GPIO_PIN, GPIO_Mode_In_PU_No_IT); GPIO_Init( ADDRn_GPIO_PORT, ADDR5_GPIO_PIN, GPIO_Mode_In_PU_No_IT); Kind regards Wynand2013-02-28 03:57 AM
Got he problem, PC0 and PC1 does not have pull-ups.
2013-02-28 08:28 PM