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

Simple UART program doesn't send data to another device

Hi all,

I am trying to send data from nrf52840 to Arduino. I have a simple UART program running on nrf52840 that is supposed to transmit a character to another device(Arduino in this case) through TX/RX. I just want it to send a character 'a' for now.I have tested the program with CoolTerm , and it works fine but whenever I connect to another device ,nothing is received in another device.I am suspecting it might be GPIO issue, I am currently using the default RX_PIN_NUMBER 8, TX_PIN_NUMBER 6.I have tried to change Rx Tx to 26 and 27 respectively but no luck. What I am doing wrong? Below is the slightly modified  Uart program

int main(void) {
    ...
    while (true)
    {
       while (app_uart_put('a') != NRF_SUCCESS);
       
       while (app_uart_get(&cr) != NRF_SUCCESS);
       if (cr=='q'    || cr=='Q'){
            printf("\r\nExit \r\n");
            while(true){
               // Do nothing
            }
       }
	}
}

Parents Reply Children
No Data
Related