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

How to send data with 52840Dongle

Hi,

I want to know how to send data with 52840Dongle with ble to the mobile, I tried to use the "ble_uart" program of 52840DK, I followed a tutorial, performed a full erase, then follow the steps, after successfully downloading with SES, LED1 is not lit? Why is that? What should I do to complete this function? (I saw someone saying that you can't perform a full erase, because of UICR. Is it related to this?)

Thanks a lot.

Parents
  • Hi,

    You need an application that communicates over the USB interface instead of UART if you want to use the dongle. I'd suggest to try the USBD BLE UART Example. The programmer app in nRF connect Desktop can be used to upload application code to the dongle through the USB interface as long as the original pre-programmed bootloader is intact. If not you need to program it through the debug interface.

    Important: the VDD voltage defaults to 1.8 V after a full erase, please refer to this thread for more details: https://devzone.nordicsemi.com/f/nordic-q-a/38205/flashing-pca10059/ 

  • First of all, thank you for your answer.
    I still failed. I found in the specific details of the USBD BLE UART Example that I need to use the nRF UART application when I want to send data. I would like to ask where this application can be found. And I have a Jlink, so I can program Dongle, I downloaded Softdevice and downloaded the USBD BLE UART, but my LED light still didn't respond. (However,Softdevice,I use the Keil5,and the program,I use the SES,it’s OK?)I found this example to be only PCA10056, not 10059, so I tried to rewrite the previous definition, i change the number of LED,0,1,2,3 become 0,0,1,1,but it still didn't respond after completion. Where is my problem?
    thank you very much.

     

  • VDD must be >3V for the LEDs to work properly. The following code change will ensure that UICR.REGOUT0 gets set:

    diff --git a/examples/peripheral/usbd_ble_uart/main.c b/examples/peripheral/usbd_ble_uart/main.c
    index 57396f2..91018f1 100644
    --- a/examples/peripheral/usbd_ble_uart/main.c
    +++ b/examples/peripheral/usbd_ble_uart/main.c
    @@ -613,8 +613,10 @@ static void advertising_init(void)
     /** @brief Function for initializing buttons and LEDs. */
     static void buttons_leds_init(void)
     {
    -    uint32_t err_code = bsp_init(BSP_INIT_LEDS, bsp_event_handler);
    +    uint32_t err_code = bsp_init(BSP_INIT_BUTTONS, bsp_event_handler);
         APP_ERROR_CHECK(err_code);
    +
    +    bsp_board_init(BSP_INIT_LEDS); // Sets UICR.REGOUT to 3V
     }

    Also, to get the correct pinout, replace the BOARD_PCA10056 flag with BOARD_PCA10059 before you build. You can use Keil, SES or GCC.

    usb uart example with softdevice compiled for the dongle (SDK v.15.2.0):

    usbd_ble_uart_w_sd.hex

Reply
  • VDD must be >3V for the LEDs to work properly. The following code change will ensure that UICR.REGOUT0 gets set:

    diff --git a/examples/peripheral/usbd_ble_uart/main.c b/examples/peripheral/usbd_ble_uart/main.c
    index 57396f2..91018f1 100644
    --- a/examples/peripheral/usbd_ble_uart/main.c
    +++ b/examples/peripheral/usbd_ble_uart/main.c
    @@ -613,8 +613,10 @@ static void advertising_init(void)
     /** @brief Function for initializing buttons and LEDs. */
     static void buttons_leds_init(void)
     {
    -    uint32_t err_code = bsp_init(BSP_INIT_LEDS, bsp_event_handler);
    +    uint32_t err_code = bsp_init(BSP_INIT_BUTTONS, bsp_event_handler);
         APP_ERROR_CHECK(err_code);
    +
    +    bsp_board_init(BSP_INIT_LEDS); // Sets UICR.REGOUT to 3V
     }

    Also, to get the correct pinout, replace the BOARD_PCA10056 flag with BOARD_PCA10059 before you build. You can use Keil, SES or GCC.

    usb uart example with softdevice compiled for the dongle (SDK v.15.2.0):

    usbd_ble_uart_w_sd.hex

Children
No Data
Related