AnsweredAssumed Answered

USART1 Very Low Output Signal

Question asked by clark.david.001 on Jun 13, 2012
Latest reply on Jun 25, 2012 by clark.david.001
Hi,

I am doing what on paper should be one of the simplest tasks possible with a USART - namely configuring it and then getting it to output a pattern using USART_SendData();

When I send this command it is definitely doing something but I get a tiny drop of less than a volt that looks like it might not even be a signal. Does anyone have any ideas why this is happenning?

Am using an STM32F107VCT6

Init code is as follows :-

RCC_APB2PeriphClockCmd(RCC_APB2Periph_USART1 | RCC_APB2Periph_GPIOA | RCC_APB2Periph_AFIO, ENABLE);

  /* Configure HDSR TX as alternate function push-pull */
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
  GPIO_Init(GPIOA, &GPIO_InitStructure);

  USART_InitStructure.USART_BaudRate = 9600;
  USART_InitStructure.USART_WordLength = USART_WordLength_8b;
  USART_InitStructure.USART_StopBits = USART_StopBits_1;
  USART_InitStructure.USART_Parity = USART_Parity_No;
  USART_InitStructure.USART_HardwareFlowControl =     USART_HardwareFlowControl_None;
  USART_InitStructure.USART_Mode = USART_Mode_Tx;

  USART_Init(USART1, &USART_InitStructure);
  /* Enable the HDSRUSART */
  USART_Cmd(USART1, ENABLE) ;

while(1)
{
USART_SendData(USART1 , 0x55);
}

Outcomes