UART problems

Asked by 5 months ago
I have enabled UART2 on my Beaglebone Black using the device tree overlay method. I am able to communicate with minicom but not in C. I used termios to setup UART2, I have no issues writing data but I do when I try to read. I don't understand why in minicom reading works and not in my C program. What could be the reason? ps- I've attached my code just in case. Best Regards, Marco Vazquez

Your Answer

Name:
Reply:

All Answers

Answer by 5 months ago
I found out what I had wrong I was setting the new termios "newt" to zero. I then used the previous contents of ttyO1 on newt instead. That worked great, also I had to remove ICANON from the c_lflag to work.