Hi! I'm trying to activate the JTAG security from my LPC29xx and I found here: https://www.nxp.com/docs/en/user-guide/UM10316.pdf in page 481 an example but I doesn't work :/
Could someone help me or provide the sample code to activate the JTAG protection?
I have this part in my startup code:
SEC_DIS EQU 0xE0001B00
SEC_Value EQU 0x00
LDR R0, =SEC_DIS
LDR R1, =SEC_Value
STR R1, [R0, #0]
I read that I have to write 0x7FFFFFFF in some part of the flash but I cannot do it :smileysad:
Thanks,
Fernando
Solved! Go to Solution.
Hi Fernando,
correct, Argentina might be too far away for sending boards.
Regards,
Bernhard.
Hi Fernando,
in a first step, please look into the attached appnote, maybe it provides the missing piece of information.
If not, just come back and I'll look for more details. I'm missing the sample code the appnote is referring to.
>> I read that I have to write 0x7FFFFFFF in some part of the flash but I cannot do it
"Writing to flash" of course means that you need to program specific memory locations, I think in the index sector.
Btw, if you have a need for LPC2900 boards (from Keil or Hitex) I have many of them in my office in Munich, more or less to be trashed.
Regards,
Bernhard.
Update: found some code for the LPC2900 and attached it.
Hi Bernhard,
Thanks once again to answer my question and thank you very much for the LPC boards but I'm living in Argentina and I think that the shipping cost will be really high :smileysad:
I read the PDF file and look at the examples (specially the one under FMC folder) but I'm still having some problems with the flash writing. I couldn't find the method FMC_WriteIndexPage, so I took FMC_WritePage and I removed the part that completes the full page with 0xFF. I also changed TestPage[15] = 0x7f; (example value was 0xFF).
I ran first FMC_Init(); and then the part of the code that is under JTAG_SECURITY. However, the JTAG is never disabled :smileysad: I checked SEC_DIS and it's always in zero, so the part that is written in the startup is setting the right value.
Do you have any idea? Do I require any special consideration to write only the 128bit for JTAG security?
Thanks for your help and ideas :smileygrin:
Hi Fernando,
correct, Argentina might be too far away for sending boards.
Regards,
Bernhard.
Hi,
Thanks!! I made it work! I've just compared the FMC_WirteIndexPage and the code that I modified and it's the same. I needed to add FS_ISS to FCTR. Otherwise, the flash sector is hidden.
I will mark this as solved!!
Best regards,
Fernando