AnsweredAssumed Answered

STM32F205VET PortC(PC13) PGIO problem

Question asked by veikkolainen.kari on Aug 14, 2012
Latest reply on Aug 16, 2012 by veikkolainen.kari
I have faced a problem with pin GPIO pin PC13. I'm trying to use PC13 as output. Seems like after I initialize USART3 the PC13 pin does not work anymore in Push-Pull-mode. Anyhow If I enable the PC13 pull-up resistor, the PC13 works as output(in OC-mode, with pull-up).

The PC13 should not have anything to do with USART3. (PC10 and PC11 are user by the USART3). Actually in my case only PC10, because I'm using only USART3 TX.

PC13 initialization:
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;
GPIO_Init (GPIOC, &GPIO_InitStructure);

USART3 pin initialization:
  /* Configure USART3 as input floating */
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
  GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
  GPIO_Init (GPIOC, &GPIO_InitStructure);

  /* Configure USART3 as alternate function push-pull */
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
  GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10;
  GPIO_Init (GPIOC, &GPIO_InitStructure);

If don't initialize USART3, the PC13 works fine in Push-Pull mode.
I have not found anything special about this from data-sheet or err-data. Also CMSIS defines etc seems to be ok.