S32K142 disable debug

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

S32K142 disable debug

205 Views
minsky
Contributor I

你好,我将FSEC中的SEC置为11:

/* Flash Configuration */
.section .FlashConfig, "a"
.long 0xFFFFFFFF /* 8 bytes backdoor comparison key */
.long 0xFFFFFFFF /* */
.long 0xFFFFFFFF /* 4 bytes program flash protection bytes */
.long 0xFFFF7FFF /* FDPROT:FEPROT:FOPT:FSEC(0xFE = unsecured) */

使用J-Flash,选择S32K142(allow security),将程序烧录至芯片后,可以再次与芯片连接和烧录程序(一开始无法连接,尝试2至3次后可以正常连接),但无法debug和读取flash内容,请问这是否为成功失能调试端口?

0 Kudos
Reply
1 Reply

162 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @minsky,

Yes, once secured, JTAG cannot read flash or halt/inspect the core. Changes to the flash configuration will take effect at the next reset:

Snag_56e136.png

Also, when allow security is selected, J-Flash reads MDM-AP register, and if security is set to 1, it tries a mass erase in order to unsecure the chip and connect.

Best regards,
Julián

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2195009%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3ES32K142%20disable%20debug%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2195009%22%20slang%3D%22zh-CN%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%20I%20set%20the%20SEC%20in%20FSEC%20to%2011%3A%3C%2FP%3E%3CP%3E%3CSPAN%3E%2F*%20Flash%20Configuration%20*%2F%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%20.section%20.FlashConfig%2C%20%22a%20%22%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%20.long%200xFFFFFFFF%20%2F*%208%20bytes%20backdoor%20comparison%20key%20*%2F%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%20.long%200xFFFFFFFF%20%2F*%20*%2F%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%20.long%200xFFFFFFFF%20%2F*%204%20bytes%20program%20flash%20protection%20bytes%20*%2F%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%20.long%200xFFFF7FFF%20%2F*%20FDPROT%3AFEPROT%3AFOPT%3AFSEC(0xFE%20%3D%20unsecured)%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EUsing%20J-Flash%20and%20selecting%20S32K142%20(allow%20security)%2C%20after%20burning%20the%20program%20to%20the%20chip%2C%20I%20can%20connect%20to%20the%20chip%20again%20and%20burn%20the%20program%20(I%20can't%20connect%20at%20first%2C%20but%20after%202%20to%203%20attempts%2C%20I%20can%20connect%20normally)%2C%20but%20I%20can't%20debug%20and%20read%20the%20flash%20content%2C%20is%20it%20a%20successful%20disablement%20of%20the%20debugging%20port%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2196024%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K142%20disable%20debug%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2196024%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F254381%22%20target%3D%22_blank%22%3E%40minsky%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EYes%2C%20once%20secured%2C%20JTAG%26nbsp%3Bcannot%20read%20flash%20or%20halt%2Finspect%20the%20core.%20Changes%20to%20the%20flash%20configuration%20will%20take%20effect%20at%20the%20next%20reset%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Snag_56e136.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Snag_56e136.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F363306i9C10AB12B964F68E%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Snag_56e136.png%22%20alt%3D%22Snag_56e136.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EAlso%2C%20when%20allow%20security%20is%20selected%2C%20J-Flash%20reads%20MDM-AP%20register%2C%20and%20if%20security%20is%20set%20to%201%2C%20it%20tries%20a%20mass%20erase%20in%20order%20to%20unsecure%20the%20chip%20and%20connect.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3CBR%20%2F%3EJuli%C3%A1n%3C%2FP%3E%3C%2FLINGO-BODY%3E