This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
I am looking for code samples to lock/ unlock MSP430FR2355 from the firmware.
According to the user manual
"Locking the device requires the programming of two signatures in FRAM.
JTAG Signature 1 (memory address 0FF80h) and JTAG Signature 2 (memory address 0FF82h) control the behavior of the device locking mechanism.
A device can be locked by writing any value other than 0000h or FFFFh to both JTAG Signature 1 and
JTAG Signature 2."
I suppose that putting 0000 or FFFF back into the signatures from the program would unlock the device.
Where can I see such code example in IAR?
Hello,
I wasn't able to locate any example software for locking the JTAG on MSP432FR2xx, but there is an example for MSP430FR5xx/6xx available that would be a good starting point. We have a MSP Code Protection Features App Note that covers the locking of JTAG on the different families and includes a download for FR5xx Software examples.
You are correct that clearing the JTAG signatures would unlock the device, but this can only be done via a password protected BSL or somehow in your application code. It cannot be done via JTAG or SBW.
I think the app note will answer most of your questions. Let me know if you have any more follow up questions.
Thanks,
JD
JD Crutchfield said:You are correct that clearing the JTAG signatures would unlock the device, but this can only be done via a password protected BSL or somehow in your application code. It cannot be done via JTAG or SBW.
FR2xx an FR4xx devices with locked JTAG access, can go back to factory (unlocked) state, by using SBW / JTAG mailbox system (user code erase).
Hello,
Thank you for your response but let me clarify.
We used MSP430F5340 before.
That MCU could be locked/ unlocked with the following code from within our code
Lock
while( ( FCTL3 & WAIT ) == 0 ); // ensure no FLASH write is in progress
SYSBSLC = 0; // enable and unlock BSL segment 3
FCTL4=FWKEY; // unlock INFO
FCTL3=FWKEY; // unlock FLASH and INFO A
FCTL1=(FWKEY+WRT);
( *(uint8_t*)0x17fc ) = 0x55;
while( ( FCTL3 & BUSY ) == BUSY );
FCTL1=FWKEY;
FCTL3=(FWKEY+LOCK);
Unlock
...
( *(uint8_t*)0x17fc ) = 0x00;
...
On the other hand MSP430FR2355 has these signatures in the main memory so would be just sufficient just to do the following in the code?:
Unlock:
( *(uint8_t*)FF80h) = 0x00;
( *(uint8_t*)FF81h) = 0x00;
( *(uint8_t*)FF82h) = 0x00;
( *(uint8_t*)FF83h) = 0x00;
Lock
( *(uint8_t*)FF80h) = 0x55;
( *(uint8_t*)FF81h) = 0x55;
( *(uint8_t*)FF82h) = 0x55;
( *(uint8_t*)FF83h) = 0x55;
Hello JD,
I am trying to implement signature altering but cannot get it working.
Can you sample some code which accomplishes a similar task for FRAM?
Thanks,
ferentes
**Attention** This is a public forum