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

example software

HI,

my new BLE project is using nRF52810 chipset. Following is the requirements:

1. BLE nRF52810 will pair with iphone/android taplet

2. iphone/android table will send message to nRF52810 chipset

3. nRF52810 chipset will send the received data to main CPU through UART

Which example code on the  nRF5_SDK_15.3.0_59ac345 are good for startup for this project?

THanks

Parents
  • Hi!

    I don't think any single example will do those three things combined.

    The UART / Serial Port Emulation over BLE example found here let's you use the nRF Toolbox application to send messages from a device to the nRF52810, and the message gets sent via UART to the computer. I suggest using this example as the base and modifying the part of the code that handles the received data, to send it to the CPU via UART. 

    For UART you can check out the UART example under examples\peripheral\uart in the SDK. Here the pins are configured in the main function by defining comm_params and calling APP_UART_FIFO_INIT.

    const app_uart_comm_params_t comm_params =
    {
        RX_PIN_NUMBER,
        TX_PIN_NUMBER,
        RTS_PIN_NUMBER,
        CTS_PIN_NUMBER,
        UART_HWFC,
        false,
    #if defined (UART_PRESENT)
        NRF_UART_BAUDRATE_115200
    #else
       NRF_UARTE_BAUDRATE_115200
    #endif
    };
    
    APP_UART_FIFO_INIT(&comm_params,
                       UART_RX_BUF_SIZE,
                       UART_TX_BUF_SIZE,
                       uart_error_handle,
                       APP_IRQ_PRIORITY_LOWEST,
                       err_code);

    Best regards,

    Heidi

Reply
  • Hi!

    I don't think any single example will do those three things combined.

    The UART / Serial Port Emulation over BLE example found here let's you use the nRF Toolbox application to send messages from a device to the nRF52810, and the message gets sent via UART to the computer. I suggest using this example as the base and modifying the part of the code that handles the received data, to send it to the CPU via UART. 

    For UART you can check out the UART example under examples\peripheral\uart in the SDK. Here the pins are configured in the main function by defining comm_params and calling APP_UART_FIFO_INIT.

    const app_uart_comm_params_t comm_params =
    {
        RX_PIN_NUMBER,
        TX_PIN_NUMBER,
        RTS_PIN_NUMBER,
        CTS_PIN_NUMBER,
        UART_HWFC,
        false,
    #if defined (UART_PRESENT)
        NRF_UART_BAUDRATE_115200
    #else
       NRF_UARTE_BAUDRATE_115200
    #endif
    };
    
    APP_UART_FIFO_INIT(&comm_params,
                       UART_RX_BUF_SIZE,
                       UART_TX_BUF_SIZE,
                       uart_error_handle,
                       APP_IRQ_PRIORITY_LOWEST,
                       err_code);

    Best regards,

    Heidi

Children
Related