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

NRF52480 Dongle and communication over serial

Experts,

I'm trying to use NRF52480 Dongle to communicate over UART serial port. On the forum I found that pins 1.10 & 1.13 are used for TX/RX. I learned that flow control may be disabled and default speed is 115200 bps. Having this information I compiled and flashed few examples to talk to terminal running in my PC. Unfortunately, all the data sent from NRF52480 Dongle to PC is a garbage. Looks like total misalignment of serial port parameters. 

The only correct result was achieved with examples\ble_central_and_peripheral\experimental\ble_app_interactive, following advices shared here: https://devzone.nordicsemi.com/f/nordic-q-a/43871/ble_app_interactive-code-for-nrf52840-dongle After migration from pce10056 to pce10059 Dongle started reporting to PC terminal (over serial) problem with memory settings. This is the only moment when Dongle correctly transmits data over UART; after fixing memory settings, the program again started transmitting only garbage.

What am I doing wrong?

Could you share exemplary code which writes "Hello world!" to serial port over pins 1.10 & 1.13 to be read by terminal running on PC?

Thanks,
Ryszard

Parents
  • For me the examples\peripheral\usbd_cdc_acm demo works on my PCA10056 board.  I can use the UART (on pins 6 and 8) and the USB port, and the CLI works (on the uart interface) and the USB demo also works at the same time. See:

    https://imgur.com/gallery/c4ZbCeZ

    I think you should be able to change main.c, line 227 to match your hardware and test it out:

    static void init_cli(void)
    {
      ret_code_t ret;
      ret = bsp_cli_init(bsp_event_callback);
      APP_ERROR_CHECK(ret);
      nrf_drv_uart_config_t uart_config = NRF_DRV_UART_DEFAULT_CONFIG;
      uart_config.pseltxd = TX_PIN_NUMBER;  // Change this to NRF_GPIO_PIN_MAP(1,10) ?
      uart_config.pselrxd = RX_PIN_NUMBER; // Change this to NRF_GPIO_PIN_MAP(1, 3)  ?
      uart_config.hwfc = NRF_UART_HWFC_DISABLED;
      ret = nrf_cli_init(&m_cli_uart, &uart_config, true, true, NRF_LOG_SEVERITY_INFO);
      APP_ERROR_CHECK(ret);
      ret = nrf_cli_start(&m_cli_uart);
      APP_ERROR_CHECK(ret);
    }

Reply
  • For me the examples\peripheral\usbd_cdc_acm demo works on my PCA10056 board.  I can use the UART (on pins 6 and 8) and the USB port, and the CLI works (on the uart interface) and the USB demo also works at the same time. See:

    https://imgur.com/gallery/c4ZbCeZ

    I think you should be able to change main.c, line 227 to match your hardware and test it out:

    static void init_cli(void)
    {
      ret_code_t ret;
      ret = bsp_cli_init(bsp_event_callback);
      APP_ERROR_CHECK(ret);
      nrf_drv_uart_config_t uart_config = NRF_DRV_UART_DEFAULT_CONFIG;
      uart_config.pseltxd = TX_PIN_NUMBER;  // Change this to NRF_GPIO_PIN_MAP(1,10) ?
      uart_config.pselrxd = RX_PIN_NUMBER; // Change this to NRF_GPIO_PIN_MAP(1, 3)  ?
      uart_config.hwfc = NRF_UART_HWFC_DISABLED;
      ret = nrf_cli_init(&m_cli_uart, &uart_config, true, true, NRF_LOG_SEVERITY_INFO);
      APP_ERROR_CHECK(ret);
      ret = nrf_cli_start(&m_cli_uart);
      APP_ERROR_CHECK(ret);
    }

Children
Related