cancel
Showing results for 
Search instead for 
Did you mean: 

How to read the IDR of portc for STM32F103R4

Hani Ahmed
Associate II
Posted on March 26, 2018 at 20:32

Hi

I'm using STM32F103R4 and trying to read the IDR of portc but it only i get data for PC4 & PC5, so how i can figure it out

below my configuration

GPIO_InitTypeDef GPIO_InitStructure;

RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE);

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;

GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPD;

GPIO_Init(GPIOC, &GPIO_InitStructure);

while (1) {

GPIOA-> ODR = GPIO_ReadInputData(GPIOC);

}

#stm32f103r4

Note: this post was migrated and contained many threaded conversations, some content may be missing.
11 REPLIES 11
Posted on March 27, 2018 at 22:54

Unfortunately not, is Port C has special configuration or something?

Posted on March 27, 2018 at 23:00

'

i think there is some thing wrong with my configuration but i don't know it'

The data sheet has the answers.