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

Test program not working in Custom Board

Hi Nordic Forum!

I've been trying to run a test program (pin toggle) on a custom nRF52832 board.

First, I tried the same program on the HDK to toggle pin P0.17 (LED1) and verified that it worked.

But then, when I tried on my custom board (but on pin P0.13) nothing happens. Later I tried to flash the same program but toggling pin P0.10 and measure it directly with a tester on the MCU contact, and again, I got a toggling pin on my HDK and nothing on my custom board.

Since I had some problems flashing my board in the beginning, I did a memory dump of my board, using nrfjprog --readcode after flashing the same program with a small difference (the pin number) and verified that both files were different, so my custom board seems to be flashing.

Our hardware designer seems to be sure the design is fine. Does anyone has experienced similar problems? Is there any code or base firmware I have to load first before my application?

Here's a sample code of the test program:

#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "nordic_common.h"
#include "nrf.h"
#include "app_error.h"
#include "nrf_delay.h"
#include "SEGGER_RTT.h"
#include "nrf_gpio.h"

/**@brief Function for application main entry.
 */

int main(void) {

    nrf_gpio_cfg_output(10);
    nrf_gpio_pin_clear(10);

    for (;;) {
        nrf_gpio_pin_toggle(10);
        SEGGER_RTT_printf(0, "Hello World! \n");
        nrf_delay_ms(1000);
    }
}

As an additional comment, the SEGGER_RTT_printf doesn't work either. When I run it on the HDK, it works, but not on the custom board. This caught my attention because if my board is flashing, the SWDIO and SWDCLK are working, and the RTT runs on that.

Related