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

nRF51 uart pin config

Hi everyone,

I pass few days to try to fix my issue whiteout success.

I'm working on UART example provide by SDK 10 and tried to set up a communication from my computer to the nRF51422 board. There is the code used:

#define RX_PIN_NUMBER 11
#define TX_PIN_NUMBER 9

void uart_error_handle(app_uart_evt_t * p_event) {
  uint8_t cr;
  switch(p_event->evt_type) {
    case APP_UART_DATA_READY:
      while(app_uart_get(&cr) != NRF_SUCCESS);
      SEGGER_RTT_printf(0, "%c", cr);
      break;
    default:
      break;
  }
}

int main(void) {
  uint32_t err_code;
  const app_uart_comm_params_t comm_params = 
  {
    RX_PIN_NUMBER,
    TX_PIN_NUMBER,
    RTS_PIN_NUMBER,
    CTS_PIN_NUMBER,
    APP_UART_FLOW_CONTROL_DISABLED,
    false,
    UART_BAUDRATE_BAUDRATE_Baud38400
  };

  APP_UART_FIFO_INIT(&comm_params,
    UART_RX_BUF_SIZE,
    UART_TX_BUF_SIZE,
    uart_error_handle,
    APP_IRQ_PRIORITY_LOW,
    err_code);
  APP_ERROR_CHECK(err_code);

  while (true);
  }
}

Everything works well with this settings and I can get the communication through the JTAG port, but is not what I want.

My problem happened when I modify :

#define RX_PIN_NUMBER 11
#define TX_PIN_NUMBER 9
/**** to ****/
#define RX_PIN_NUMBER 1
#define TX_PIN_NUMBER 2

Then I can't get anything else than an error. When I connect a wire to the pin P.01 the device restart again and again after APP_UART_FIFO_INIT. Even the TX from the Nordic device to my computer don't work with this configuration.

Thank for your help.

Parents Reply Children
No Data
Related