This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

UART nRF51422 receiving problem

Hi All,

I am trying to use the HRM_RX sample code with my Linux PC side application. but i am not able to receive any UART RXD interrupt on nRf51422. I checked PC is sending command to the nRF51422 but no interrupt from RX..

I am able to receive all the data from the nRF51422 to linux pc side apps. but reverse is not working.

My PC side apps setting is like this:

=============================================================== struct termios tp;

fd = open(devname, O_RDWR); if (fd < 0) { perror(devname); return 0; }

S(tcgetattr(fd, &tp)); tp.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON|IXOFF|IXANY|INPCK|IUCLC); tp.c_oflag &= ~OPOST; tp.c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN|ECHOE); tp.c_cflag &= ~(CSIZE|PARENB); tp.c_cflag |= CS8 | CLOCAL | CREAD| CRTSCTS;

//S(cfsetispeed(&tp, B115200)); //S(cfsetospeed(&tp, B115200));

S(cfsetispeed(&tp, B38400)); S(cfsetospeed(&tp, B38400));

tp.c_cc[VMIN] = 1; tp.c_cc[VTIME] = 0; S(tcsetattr(fd, TCSANOW, &tp));

Any pointer ?

Thanks Robin Singh

Parents
  • I've been personally successfully both reading and writing data over the UART to the nRF51822 Evaluation Kit from Linux, so I'm quite confident that this actually does work. What device name are your kit appearing with?

    I'm not familiar with the programming language used here, but have you tried using an existing terminal emulator? I've previously been using minicom, and that worked nicely. Also remember that you must have flow control enabled between the PC and the Segger chip for it chip to handle things correctly.

Reply
  • I've been personally successfully both reading and writing data over the UART to the nRF51822 Evaluation Kit from Linux, so I'm quite confident that this actually does work. What device name are your kit appearing with?

    I'm not familiar with the programming language used here, but have you tried using an existing terminal emulator? I've previously been using minicom, and that worked nicely. Also remember that you must have flow control enabled between the PC and the Segger chip for it chip to handle things correctly.

Children
Related