Hi,
It is impossible to encrypt the firmware using MMCAU and and decrypt the firmware on the fly, at the same time execute it.
If you want to on the fly decrypt /execute the firmware, you have to consider the K8x or LPC546xx.
For the KM34, the on-chip flash provides the protection by writing the Flash Configuration Field
For detailed inf, pls refer to section 27.3.1 Flash Configuration Field Description in the RM of KM34.
After the flash is in security mode, the JTAG port is blocked, user can not access the code in flash via JTAG.
Hope it can help you
BR
XiangJun Rong