2014-07-28 11:36 PM
Hi,
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 2 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 followsint
port_app(unsigned
char
rx_port [])
{
int
i =0;
unsigned
char
rx[6];
if
((USART1->ISR & USART_ISR_RXNE) >0)
{
for
(i=0;i<3;i++)
{
rx_port[i] = USART_ReceiveData(EVAL_COM1);
}
}
if
(i >= 3)
{
return
1;
}
else
return
0;
}
Regards,
Arun.S
#stm32f0 #serial
2014-07-29 05:28 AM
Need to wait for RXNE before each byte
2014-07-29 10:14 PM
Thank you . I applied some delay and the issue is resolved. :)
Regards. Arun.S