winIDEA enables an alternate debug session initialization if issues with downloading occur. This only affects download operations.
1. Add the custom initialization script to Hardware | CPU Options | Reset | Initialization before programming | Connect.
2. Select Yes in the altProgInit parameter.