From the KL17 RM I can see below pins are used for pinmuxing by the Kinetis bootloader.
But calling the bootloader from the application, I'm experiencing some pins that are not in the above list (ex PTB17) lose their modes and become floating while some other pins keep their modes (output on/off). Since the bootloader resides in the ROM section, is there anything I should do in the application before calling the bootloader to keep the state of the GPIO pins? Is the bootloader (at offset 0x1C00_0000) de/re initializes all the pins or just the enabled peripherals? Could you give more details?