Page 2 of 2

Re: Flashing NRF using pyOCD

Posted: Sun Jan 05, 2020 1:33 pm
by devnull
I also tried adding the port enable code here, and did a fresh clone of the entire build and re-built again, but still nothing at all:

Code: Select all

    // Main script is finished, so now go into REPL mode.
    // The REPL mode can change, or it can request a soft reset.
    int ret_code = 0;

//PAC P0.10 LED On
nrf_gpio_cfg_output(10);
nrf_gpio_pin_set(10);

#if MICROPY_PY_BLE_NUS
    ble_uart_init0();
#endif

Re: Flashing NRF using pyOCD

Posted: Sun Jan 05, 2020 5:02 pm
by c45713
Could you try with a different pin than P0.10? From the datasheet this is "Digital I/O NFC input". Unless you have explicitly disabled NFC, i guess this will not show much output.

Re: Flashing NRF using pyOCD

Posted: Sun Jan 05, 2020 11:00 pm
by devnull
How careless of me, the holyroot pdf and diagrams just show this as a digital IO, just checked a schematic of the NRF8240 and you are correct, will try that.

But is my last mod to the main.c file correct ? - if you do this does a LED come on and stay on during bootup ?

I have set it to p0.22:

Code: Select all

// ## PAC P0.22 LED On ##
nrf_gpio_cfg_output(22);
nrf_gpio_pin_set(22);
Thanks

Re: Flashing NRF using pyOCD

Posted: Mon Jan 06, 2020 12:57 am
by devnull
OK, success using pyocd, I will update my findings later.