Is unlocking the CSM through SCI_Boot possible? I reduced my code to only be a call to CsmUnlock() with the correct values hard coded there. I figured this would be small enough to run in M0 and M1. I also used #pragma CODE_SECTION(CsmUnlock, "ramfuncs"); to make sure it would be there. But this doesn't work, because I have to reset the device back into SCI_Boot to upload more code, which I assume gets rid of my unlock procedure.
So I tried just adding CsmUnlock to my normal code, at the point that FlashAPI document says (after setting the Flash_CPUScaleFactor). This also doesn't work.
Before I investigate further, is unlocking through SCI_Boot even possible? If so, does it stay unlocked if the XRS(reset) is pulled low and the device starts back up in SCI_Boot? As in, once unlocked, does it need a power cycle to re-enable the security (like when you set the password).