S32K322: protect code/data flash read/write from host debugger

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K322: protect code/data flash read/write from host debugger

250 Views
AbdNxp
Contributor II

Hello Danial,

I was going through thread Solved: How to set S32K3_Host debug permanently disabled? - NXP Community

I wanted to understand this and achieve and implement for my project(MCU S32K322, pFlash0 - bootloader, pFlash1-app, Core1-not used but DTCM1 is used), how/where can | start, guide me with some document, sample code.

 

Thanks & regards

Abdullah A

0 Kudos
Reply
1 Reply

215 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Abdullah,

There are two ways to debug‑protect an S32K3xx MCU:

With HSE: Install the HSE firmware, configure Secure Debug using an Application Debug Key/Password (ADKP), and advance the device lifecycle to enforce debug protection. For further details, please create a support ticket, as the HSE firmware and documentation are available under NDA only.

Without HSE: Program a customer debug password into OTP (UTEST) and then advance the lifecycle to restrict or disable debug access.

The non‑HSE debug protection mechanism is explained in detail here:
https://community.nxp.com/t5/S32K-Knowledge-Base/S32K3-Restrict-the-debug-access-with-a-password-whe...

DTCM1 backdoor access can be used by CM7_0 even if CM7_1 is not used; a simple example is available here:
https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K314-DTCM1-Backdoor-RTD201-DS34-v3/ta-p/...

 

Regards,

Daniel

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2356886%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K322%3A%20protect%20code%2Fdata%20flash%20read%2Fwrite%20from%20host%20debugger%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2356886%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Danial%2C%3C%2FP%3E%3CP%3EI%20was%20going%20through%20thread%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K%2FHow-to-set-S32K3-Host-debug-permanently-disabled%2Fm-p%2F1564980%22%20target%3D%22_blank%22%3ESolved%3A%20How%20to%20set%20S32K3_Host%20debug%20permanently%20disabled%3F%20-%20NXP%20Community%3C%2FA%3E%3C%2FP%3E%3CP%3EI%20wanted%20to%20understand%20this%20and%20achieve%20and%20implement%20for%20my%20project(MCU%20S32K322%2C%20pFlash0%20-%20bootloader%2C%20pFlash1-app%2C%20Core1-not%20used%20but%20DTCM1%20is%20used)%2C%20how%2Fwhere%20can%20%7C%20start%2C%20guide%20me%20with%20some%20document%2C%20sample%20code.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThanks%20%26amp%3B%20regards%3C%2FP%3E%3CP%3EAbdullah%20A%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2357720%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K322%3A%20protect%20code%2Fdata%20flash%20read%2Fwrite%20from%20host%20debugger%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2357720%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3BAbdullah%2C%3C%2FP%3E%0A%3CP%3EThere%20are%20two%20ways%20to%20debug%E2%80%91protect%20an%20S32K3xx%20MCU%3A%3C%2FP%3E%0A%3CP%3EWith%20HSE%3A%20Install%20the%20HSE%20firmware%2C%20configure%20Secure%20Debug%20using%20an%20Application%20Debug%20Key%2FPassword%20(ADKP)%2C%20and%20advance%20the%20device%20lifecycle%20to%20enforce%20debug%20protection.%20For%20further%20details%2C%20please%20create%20a%20support%20ticket%2C%20as%20the%20HSE%20firmware%20and%20documentation%20are%20available%20under%20NDA%20only.%3C%2FP%3E%0A%3CP%3EWithout%20HSE%3A%20Program%20a%20customer%20debug%20password%20into%20OTP%20(UTEST)%20and%20then%20advance%20the%20lifecycle%20to%20restrict%20or%20disable%20debug%20access.%3C%2FP%3E%0A%3CP%3EThe%20non%E2%80%91HSE%20debug%20protection%20mechanism%20is%20explained%20in%20detail%20here%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FS32K3-Restrict-the-debug-access-with-a-password-when-HSE-is-not%2Fta-p%2F1735073%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FS32K3-Restrict-the-debug-access-with-a-password-when-HSE-is-not%2Fta-p%2F1735073%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EDTCM1%20backdoor%20access%20can%20be%20used%20by%20CM7_0%20even%20if%20CM7_1%20is%20not%20used%3B%20a%20simple%20example%20is%20available%20here%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FExample-S32K314-DTCM1-Backdoor-RTD201-DS34-v3%2Fta-p%2F1689350%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FExample-S32K314-DTCM1-Backdoor-RTD201-DS34-v3%2Fta-p%2F1689350%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3EDaniel%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E