This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF51822 UART not work

Hi all My hardware is nRF51822 PCA0000 and PCA0001, I just want to compile/load any UART example to test my UART workable or not. So I have tried example project button_radio_exampleled_radio_example and uart_example, I got no signal on hypetrm with any example project. I set break point on Keil with any example project and got the same result, the processing hang on :

PCA0000 :


void simple_uart_put(uint8_t cr)
{
  NRF_UART0->TXD = (uint8_t)cr;

  while (NRF_UART0->EVENTS_TXDRDY!=1)   // HANG ON THIS LINE !!!!!!
  {
    // Wait for TXD data to be sent
  }

  NRF_UART0->EVENTS_TXDRDY=0;
}

PCA0001 :


uint8_t simple_uart_get(void)
{
  while (NRF_UART0->EVENTS_RXDRDY != 1)   // HANG ON THIS LINE !!!!!!
  {
    // Wait for RXD data to be received
  }
  
  NRF_UART0->EVENTS_RXDRDY = 0;
  return (uint8_t)NRF_UART0->RXD;
}

any idea ?

Parents
  • I update my issue. Now I can run the UART example project on PCA0001 hypertrm. So when I load "uart_example" example project, I can see "Start:" message in hypertrm.

    But I can not run any UART example on PCA0000 hypertrm. For example, when I complie/load the example project: "button_radio_example" and "led_radio_example", I can not see any message on PCA0000 hypertrm, even if I press BUTTON0/1 with PAC0001 board on "button_radio_example", or press 0/1 button with keyboard on "led_radio_example",

    any idea?

Reply
  • I update my issue. Now I can run the UART example project on PCA0001 hypertrm. So when I load "uart_example" example project, I can see "Start:" message in hypertrm.

    But I can not run any UART example on PCA0000 hypertrm. For example, when I complie/load the example project: "button_radio_example" and "led_radio_example", I can not see any message on PCA0000 hypertrm, even if I press BUTTON0/1 with PAC0001 board on "button_radio_example", or press 0/1 button with keyboard on "led_radio_example",

    any idea?

Children
No Data
Related