Steps to program nRF52840 Dongle with Mesh Serial Example

I have

Hardware:
nRF52840 DK - 1
nRF52840 Dongle - 1

Software:
nRF5 SDK Mesh - v5.0.0
nRF5 SDK - v17.0.2


I want to program Mesh Serial example on nRF52840 Dongle.When I try to cocnvert the program for PCA10059 chipset , it gives me an error
as UART pins are not defined.
Then I defined the UART pins for PCA10059 in pca10059.h file as follows:

#define RX_PIN_NUMBER  13
#define TX_PIN_NUMBER  15
#define CTS_PIN_NUMBER 17
#define RTS_PIN_NUMBER 21
#define HWFC           true


After defining and flashing the program to the Dongle using DK , I did'nt get any output.Then, I try to connect that Dongle using my DK , SWD pins
, it won't detect it.In nRF Connect for Desktop , it shows only the J-Link is connected and gives the following error:

12:49:44.939	Unsupported device. The detected device could not be recognized as neither JLink device nor Nordic USB device.
12:49:46.946	Target device closed
12:49:54.784	Unsupported device. The detected device could not be recognized as neither JLink device nor Nordic USB device.


I think I damaged the chip , by flashing that program.Can you tell me , what is wrong in these steps?
If you know any other methods to flash Mesh Serial program to Dongle, please explain..

Thankyou.

-Vicky

Parents Reply Children
  • Hi,
    I have modified my Dongle to work with External power supply by cutting SB2 and soldering SB1.As the new versions of SDK have
    REGOUT0 set for 3V for PCA10059 boards, I don't have to change it manually.The below code explains that.

    Code location : C:\Nordic_Semi\nRF5_SDK_17.0.2_d674dde\components\boards\boards.c

    #if defined(BOARD_PCA10059)
    /**
     * Function for configuring UICR_REGOUT0 register
     * to set GPIO output voltage to 3.0V.
     */
    static void gpio_output_voltage_setup(void)
    {
        // Configure UICR_REGOUT0 register only if it is set to default value.
        if ((NRF_UICR->REGOUT0 & UICR_REGOUT0_VOUT_Msk) ==
            (UICR_REGOUT0_VOUT_DEFAULT << UICR_REGOUT0_VOUT_Pos))
        {
            NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen;
            while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
    
            NRF_UICR->REGOUT0 = (NRF_UICR->REGOUT0 & ~((uint32_t)UICR_REGOUT0_VOUT_Msk)) |
                                (UICR_REGOUT0_VOUT_3V0 << UICR_REGOUT0_VOUT_Pos);
    
            NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren;
            while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
    
            // System reset is needed to update UICR registers.
            NVIC_SystemReset();
        }
    }
    #endif

    After following the above steps also, I won't be able to program my Dongle using my DK through SWD.I don't know what will be the problem.

    My Questions:
    1)Is my board permanently gets damaged?
    2)In the definition of UART pins for PCA10059

    #define RTS_PIN_NUMBER 21 // Mistakekenly defined PIN 21 instead of PIN 21


    But, PIN 21 is not given as an GPIO pin for Dongle board.PIN 20 is the GPIO pin.I mistakenly changed the PIN 20 to PIN 21.
    Does, this crashed my Dongle?
    3)I have another Dongle which works perfectly.If I try to configure UART pins for that Dongle, which PINs I have to use
    to make the board work perfectly without any defect?

    Please reply as soon as possible.
    Thankyou.

    -Vicky

Related