*When using Default Debug Keys*
Running from IAR, all goes well. We can debug the code and when rebooting the board, the program is started from flash and working.
Security headers are enabled.
EccGen has run.
Problem occurs when trying to update Secure Debug Default Keys to our own user keys.
1. change the key in adi_ecc.h.
2. ran ECC gen.exe (adi_ecc.h was changed with new values for some defines)
3. Edit JLinkScript file with the changed key
4. re-build code
5. erased the flash (using UART)
6. Download & Debug (In IAR using JTAG)
Step 6 gives a JTAG error:
"Bad JTAG communication: Write to IR: Expected 0x1, got 0x0 (TAP Command: 10)......
TotalIRLen = ?, IPRrint = 0x0000...
Can not find TAPC. Power-cycle required? "
If, instead of using IAR to download and debug, I use UART to program the flash, it works fine.
So in my opinion, there is something with the security key part.
If the program is flashed with the new key, I also can't connect with my J-Link probe (after manually changing the .jlinkscript to the new key).
As soon as I revert the key back to the default, I am able to flash using the JTAG again.