AnsweredAssumed Answered

STM32F0- Serial communication problem (USART 1)

Question asked by aruns06 on Jul 29, 2014
Latest reply on Jul 30, 2014 by aruns06
I am trying to sent some data to the controller (STM32F051) via pl2303 connector. Data is sent from an application. The problem is, I'm not able to receive the data sent by the application properly. The data received in the buffer is always a '\0'. I closed the application and opened Hyper Terminal and sent a character ('1') to the controller. The controller is able to receive the data properly.
To check the data sent from application,  I  connect my PL2303 connector to another FTDI chip and received the data using Hyper terminal. This time data is received properly. So I confirmed that the application is sending data properly. The baud rate of the application is 2400. Don't know whether the issue is with the configuration of usart. I am using both usart1(2400) and 2 (9600).

The receiver section is as follows

int port_app(unsigned char rx_port [])
  int i =0;
  unsigned char rx[6];
   if((USART1->ISR & USART_ISR_RXNE) >0)
    rx_port[i]  = USART_ReceiveData(EVAL_COM1);
  if(i >= 3)
    return 1;
    return 0;