I am having trouble getting an encrypted flash image to boot on an iMX RT 1021 processor using XIP. I am trying to get firmware upgrade to work, so I copy the image into memory, erase the XIP flash (0x60000000 starting address) and write the image from memory to the flash using RAMFUNC functions. If I perform this operation using a non-encrypted image, it works perfectly. The encrypted image however is not working. My fuse settings are all the settings set by using the Burn DEK data button, except for Cfg0 which is 0x1, enable encrypted XIP. I did a binary diff between the image that I can copy to flash and it works, and the image that is encrypted, and what I get is a block of differences from 0x400-0x600 for what I assume are tables to get software to handle the encrypted image, and then everything starting at 0x2000 to the end of the file is changed. Additionally, I tried both AES modes (by setting the encryption type between 0,1 in the command to encrypt the file). How do I resolve this issue? Thanks!