AnsweredAssumed Answered

GPIO inactive

Question asked by blazevic.nicolas on Mar 2, 2016
Latest reply on Mar 16, 2016 by blazevic.nicolas
Hello after trying myself and researching eventual similar problems I'm still facing a wall.

I'm using a Nucleo F401RE and can't seem to get anymore GPIO functioning. I'm out of clues now. Here is my set up:

-Connected and ILI9341 on SPI1 (SCK-->D13; MISO-->D12; MOSI-->D11; CS-->D13; D/C--> D9) Working fine with baud rate prescaler 0;

-Using ADC1(the only one actually) on channel 1 (GPIOA Pin 1) seems fine with me

I'm now trying to drive a 4wire resistive screen but I can't get any GPIO(PortAor B) working on top of what I already have.
So first step set current across an axis=> Put PA0 High and an other one low.

I'm checking PA0 with the ADC (Zin=50k so I doubt it's because i'm drawing too much current since limit is 25ma for any I/O) and all I get is noise oscillating around 450mV  (Vref=VDD=3.3  and ADC 12b reading around 560).

Here is the chunk of code I'm using ( right after System init or in a separate function called in the main loop later doesn't seem to change anything)

 RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE);
         GPIO_InitTypeDef GPIOstruct1;
         GPIOstruct1.GPIO_Pin=0;
         GPIOstruct1.GPIO_Mode=GPIO_Mode_OUT;
         GPIOstruct1.GPIO_OType=GPIO_OType_PP;
         GPIOstruct1.GPIO_Speed=GPIO_Speed_25MHz;
         GPIOstruct1.GPIO_PuPd=GPIO_PuPd_NOPULL;
         GPIO_Init(GPIOA,&GPIOstruct1);
         GPIO_SetBits(GPIOA,GPIO_PIN_0);

I've also checked my clocks and although it seems to think it's using HSE (with no X3) and get sysclk running at 168MHz) I can get GPIOs alone working with the same config on a separate simple example.

My question being: Is it because i'm already using the PORT A for SPI and ADC and B for SPI only? 

If anyone has an answer or even just a hint for investigation I'll be grateful! 

Thank you

Outcomes