This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Question about uart of Dm816x

Hi:

 I use dvr_rdk 3.5 as  our paltform.

Recently,when i use kernel driver of its uart,I meet a problem of its ttyO0 and ttyO1.

The Linux console port (/dev/ttyO2) works fine in both directions. It connect as debug uart. And i use uart0/uart1 control other serial devices, I found i can write only(can send data out from uart0), If i want to get data from uart0(ttyO0),it run to dead.

The effective test code as follows:

 

if ((gpioCtrlFile = open("/dev/ttyO0",O_RDWR)) < 0)


  printf("open device ttyO0  failure\n");
  return 0;
}
else

{

  printf("open device ttyO0 ok\n");

}

while(1)
{
sleep(1);
write(gpioCtrlFile,string,6);
printf("read in user\n");
/*i=12;
while(i--)
{
printf("sleep\n");
sleep(60);
}*/
write(gpioCtrlFile,string,13); //send ok!


printf("read in user0000\n");
count = 5;

read(gpioCtrlFile,string1, count); // run to dead

}

Did i have a mistake when use it,and how to do when i get some data from uart0 ?