Hi,
I expect that you are talking about code encryption.
Unfortunately micro you have chosen does not support HW protection like HSM (hardware security module) or CSE (cryptographic service engine).
On the other hand you can use Flash array integrity check to prevent any unintended code change. But one with source code can easily find and modify the code to skip this check.
It is common that customers use external cryptographic tools to encrypt generated binary output files. This is based on polynomial encrypting and it's quite hard to break these encryption tools.
Peter