This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

GPIO voltage problem

Hi,
I have written this code.Stm32F107

#include <stdio.h>
#include <string.h>
#include "stm32f10x_gpio.h"
#include "stm32f10x_rcc.h"
#include "stm32f10x_tim.h"

void delay(void){
                int i,j;
        for(i=0;i<10000;i++)
        for(j=0;j<250;j++);

}

int main(void){
                GPIO_InitTypeDef GPStructure;
                RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA,ENABLE);
                GPStructure.GPIO_Mode=GPIO_Mode_Out_PP;
                GPStructure.GPIO_Pin=GPIO_Pin_3;
                GPStructure.GPIO_Speed=GPIO_Speed_50MHz;
                GPIO_Init(GPIOA,&GPStructure);


while(1){
GPIO_SetBits(GPIOA,GPIO_Pin_3);
delay();delay();delay();delay();delay();delay();
GPIO_ResetBits(GPIOA,GPIO_Pin_3);
delay();delay();
}

}

I expect output voltage greater than 2.82 for output voltage level and 0 for low level but I get 1.3 for high output voltage level!!!!! However it works fine for other ports (PB , ...)