LPC43S20 - How can my application check if JTAG is disabled?

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

LPC43S20 - How can my application check if JTAG is disabled?

789 Views
delbertson
Contributor I

I have been working on an application using LPC43S20 for several years.  The application uses the secure boot functionality. It is a flashless part so the JTAG is disabled by writting our board unique random AES key to OTP1.  This all works fine and is well established.

There are a number of builds that can be issued to our manufacturing facility, not all of which disable the JTAG.  The special builds are used when manufacuring hardware that is going to be used by myself and the rest of the sotware developers.

We would like to add some functionality to our application so that it can double check that the JTAG has been disabled.

UM10503 states "On flashless parts, JTAG access is disabled automatically once the key is
programmed in OTP memory bank 1." which is what we are doing.

Is there a way of confirming if this has actually happened?

I could call aes_ProgramKey1() and see if I get  /*0x00030003*/ ERR_SEC_AES_KEY_ALREADY_PROGRAMMED,  but If I do this, and the AES key is not written, then it will get written.   I don't want this to happen so this is not a good solution.

OTP memory bank 3, word 0 but 31 is the JTAG_DISABLE bit.  If I Disable the JTAG by calling aes_ProgramKey1() goes the JTAG_DISABLE bit get set?  Or do I also need to explicitly call otp_ProgJTAGDis()?  The user manual is not clear and for me to test out my assumptions I would need to start start disabling JTAG on my dev PCBs which seems wasteful.

On a related note, I've always been curious about this - what happens if you write all zeros into OTP1, is it the act of writting to OPT1 that disables the JTAG, or is it the setting of bits in OTP1 that disables the JTAG?

Thanks in Advance.

Labels (2)
0 Kudos
2 Replies

690 Views
derekrobertson
Contributor I

Hi Alexis,

Thanks for your reply. In my OP then I have explained that this is not a good solution for me.  I just want to identify if this operation has already happened, I don't nesesarily want to write the AES key to OTP at this time as this also disables the JTAG.

Thanks

Derek

0 Kudos

690 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello delbertson‌,

What the APIs provided do is to write in this memory section write in this register and we only provide it to ensure these bits are written correctly if you call the aes_ProgramKey1 and after that, you call the otp_ProgJTAGDis the latest should return the following error code:

 /*0x00070002*/ ERR_OTP_SOME_BITS_ALREADY_PROGRAMMED

I will suggest using the APIs provided to write to these bits.

I hope this helps you.

Best Regards,

Alexis Andalon

0 Kudos