Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
NXTY_Suzuki
Level 2
Level 2
Distributor - NEXTY (Japan)
10 likes given 5 likes given 25 sign-ins

I have posted this sample code as one of the protection control example using the Firmware API.

[Overview]
You can confirm the followings using this sample code :
   1, You can easily enable/disable D-Flash read/write protection parmanently by key=0 and key=1 commands.
   2, You can confirm temporary protection/un-protection usage by key=2 and key=3 commands.
   3, You can check that you can’t write D-Flash data while D-Flash R/W protection is enabled using #4 and #5 commands.
   4, You can show the current protection status by key=7 command.

[Environment]
Confirmed evaluation boards :
   1) TLE984x Evalboard
   2) TLE9844-2QX Application Kit
IDE :
   1)uVision V5.38.0.0
Software :
   1) TLE984x_FW_API_Protection_v0.zip

[Usage of this software]
   1, Program this software into the TLE984x of the evaluation board
   2, Connect your PC and an evaluation board by USB cable
   3, Lunch a terminal software and set 115200bps
   4, Push RESET-SW of your evaluation board, then terminal software shows the following menu. Please follow the menu.

       NXTY_Suzuki_0-1676273149561.png

If you want to try Mass-erase function using a wrong password, please comment out line 85 of main.c of the below.
   Line 85 //#define MASS_ERASE_ENABLE;
Caution : If you perform the mass-erase (Key=b) function, you need uIO Stick for full recovery.

[TEST example]
// You can confirm that your TLE984x will be protected and can’t connect with your debugger like a uVISION.
   step 01 Press Key= 7 : Show protect status. (unlock status)
   step 02 Press Key= 0 : Set permanent D-Flash read and write protection.
   step 03 --- push RESET-switch on your evaluation board. ---
   step 04 Press Key= 7 : Show protect status. (lock status)

// You can confirm that R/W protected D-Flash can’t write by FW-API.
   step 05 Press Key= 8 : Show D-Flash memory data.
   step 06 Press Key= 4 : Write D-Flash, but you can’t. (data pattern 0x30,0x31,0x32,0x33... )
   step 07 Press Key= 8 : Show D-Flash memory data.

// You can write to the protected D-Flash memory with pre-temporary clear protection (unlock status).
   step 08 Press Key= 3 : Clear D-Flash read and write protection temporary.
   step 09 Press Key= 7 : Show protect status. (unlock)
   step 10 Press Key= 4 : Write D-Flash. (data pattern 0x30,0x31,0x32,0x33... )
// You can confirm the temporary unlock status will be canceled by RESET.
   step 11 --- push RESET-switch on your evaluation board. ---
   step 12 Press Key= 7 : Show protect status. (lock status)

// You can clear permanent D-Flash read and write protection after RESET. And you can write D-Flash.
   step 13 Press Key= 1 : Clear D-Flash read and write protection permanently.
   step 14 --- push RESET-switch on your evaluation board. ---
   step 15 Press Key= 7 : Show protect status. (unlock status)
   step 16 Press Key= 5 : Write D-Flash. (data pattern 0x00,0x01,0x02,0x03... )

For step 13, Key=9 or Key=a can be used inserted of Key=1. The result is the same.

0 Replies