initialize pin before booting device.

Hi ,

      I want to use a pin on board, which is not used or initialized in dts file . my requirement is that I want to initialize that pin before booting process. ( that pin act as power supply for my external flash device). so kindly suggest on that. why before booting process is, while performing dfu from external flash after booting it is directly checking the flash related thing so before that i need to set that pin as high .

note - I have tried with SYS_INIT(); but it is not working . 

E: Device id 00 00 00 does not match config 9d 40 13
*** Booting Zephyr OS build v2.7.99-ncs1-1  ***
I: Starting bootloader


 inside boot_read_sectors fun


*** inside flash_map_layout file inside flash area get sector


*** inside flash_map_layout file inside flash area get sector
W: Failed reading sectors; BOOT_MAX_IMG_SECTORS=128 - too small?

*************** inside loader.c file ***************


********inside flash map.c crashing due to get bind **


*** inside flash map.c file inside the flash area read **
E: ***** BUS FAULT *****
E:   Instruction bus error
E: r0/a1:  0x00000000  r1/a2:  0x00000000  r2/a3:  0x200002cc
E: r3/a4:  0x00000020 r12/ip:  0x0af7fbb5 r14/lr:  0x000010cf
E:  xpsr:  0x61000000
E: Faulting instruction address (r15/pc): 0x0af7fbb4
E: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
E: Current thread: 0x20000210 (unknown)
E: Resetting system
E: Device id 00 00 00 does not match config 9d 40 13
*** Booting Zephyr OS build v2.7.99-ncs1-1  ***
I: Starting bootloader

Error is - E: Device id 00 00 00 does not match config 9d 40 13

Related