AnsweredAssumed Answered

How to read the IDR of portc for STM32F103R4

Question asked by Hani Ahmed on Mar 26, 2018
Latest reply on Mar 28, 2018 by Clive One


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);