Hi @anton_hrabko
Thank you for your patience, as I have been checking internal documentation and doing tests on my side.
Regarding the issue , of having the MCU bricked.
I think that , that what is causing you problems ifsthe following configuration (1/1) for all of PIN/DFLT bits in the cmpa and cfpa files that you shared me, below an example:

Unfortunately, the 1/1 in this file will brick the MCU. The best is to leave the PIN/DFLT as 0/0 , as my example in the above image.
That should not brick the MCU, and let the debug access enabled.
*For further reference on enable secure boot, you may look to the AN12283 , and the elftosb gui .
Regarding the SOCU_PIN/SOCU_DFLT = FF 20 00 00 instead FF 30 00 00
FF 20 00 00 is correct. Let me explain.
1 First the endianness, I think you are using Little endian (LSB at the left ) to express the value of the PIN/DFLT registers.
2. The LSB corresponds to NIDEN and the MSB to MCM33_NIDEN. Below the bit position for every PIN/DFLT bit.

3. So , if all of the bits above are set to one, we will obtain 0xFF2 , (or x2FF ) . Bit 8 , which could give us 0xFF3 , is not used. Since ME and FA are shared in the bit 7.
I hope this could help, let me know any other question you may have.
Thank you for your patience,
Diego.