@jaredwolff I’ve recently run into this exact issue.
Repro:
I have a previous project running on nrf-sdk 1.7.1. I had built the software from CLI using west and flashed using newtMgr.
Once flashing my software, I experience the same behavior of the device turning off once disconnected from USB. No modifications to the jumper.

I was able to resolve this by flashing the hex you linked above. Can you clarify what modifications are needed to be done to a stock Zephyr project bootloader to be compatible with the v4 feather? Is there a patch file / script that can be run to make these changes?

It looks like modifications where made here https://github.com/zephyrproject-rtos/zephyr/commit/d7405647dfc15f8b04fc1e2a49ac33474a066330 which enable ps_en

@colemurray if you’d don’t want to update JMP2 then you’ll need to set gpio0 pin 31 high.

Overlay

/ {
	zephyr,user {
		ps-en-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
	};
}

C code

	const struct gpio_dt_spec ps_en =
		GPIO_DT_SPEC_GET(DT_PATH(zephyr_user), ps_en_gpios);

	/* Configure the pin */
	gpio_pin_configure_dt(& ps_en, GPIO_OUTPUT_ACTIVE);

    jaredwolff
    Thank you for the follow-up.

    Ideally, I’d like this to be integrated into the bootloader with the same modifications that are done to the provided hex. Can you,

    a) Provide clarification on why the above hex fixes the issue. My understanding is that when flashing the .bin file, it would not be overriding the bootloader, and the above bootloader hex has some modified code that drives PS_EN high
    b) Provide a patch file and/or links of where to modify the bootloader

    @colemurray zephyr/boards/arm/circuitdojo_feather_nrf9160/board.c does all the heavy lifting. As long as you build the bootloader with the correct board target, it will import the call to the SYS_INIT macro.

    @jaredwolff Are you able to open source the bootloader used in the v2 bootloader hex? This would greatly simplify the process of getting the device functional when flashing via JTAG and avoid reinventing the (already well functioning!) wheel.

    Flashing via bootloader mode is a bit more effort for development as it requires toggling the device into bootloader mode each time to update.

      colemurray it’s already open source within NCS. You an either build it individually in bootloader/mcuboot/zephyr or with your nRF9160 code itself when this is defined in your project conf:

      # Bootloader
      CONFIG_BOOTLOADER_MCUBOOT=y

      If you’re using a different board you can easily change/copy the overlay and configs to whatever your board is named.

      Terms and Conditions | Privacy Policy