We made a version of bootloader_secure for our own purposes. The problem is now that application must be uploaded twice into the device (nRF52) before it really gets updated. I guess it is because of dual banking and for some reason, the bank is not changed when application is uploaded.
So I am asking if somebody knows where in the bootloader_secure is the code fragment that makes the bank changing, and what possibly goes wrong there? On the other hand, I don't find mentions of dual banking from the code (quickly peeking), so could there be some other reason for that behavior?