2015-12-08 05:24 AM
I am using SPC560D MCU along with SPC5Studio. I am using PLS UDE for flash programming and debugging. I want to protect the device flash memory - code and data both from read and writing once final version is programmed. Has anyone tried this? Whether PLS UDE supports such kind of protections?
I read about the Censorship topic (section 5.1.3/ page #75) in reference manual. Can this feature serve my purpose? Has anyone used this? How this works for code and data flash? Can someone explain this elaborately?Thanks in advance.Mike2015-12-09 02:53 AM
Hello Mike ,
yes you have to read carrefully the chapter 5.1.3 you have to update :NVPWD0 = 0xFEED_FACE
NVPWD1 = 0xCAFE_BEEF you have to change : BootPasswd0=0xFEEDFACE BootPasswd1=0xCAFEBEEF in cfg file, UDE Directory. without the good password, it is not possible to flash. Best Regards Erwan2015-12-09 04:07 AM
Thanks Erwan for your reply.
Can this protect the flash from reading as well as for writing? I want to protect my device from reverse engineering point of view i.e. I want to protect my device from reading the flash and also want to protect for false writing. Can this be achieved using the 'Censorship' feature? Can you please provide more details in this regard? Any app note will be useful.Thanks in advance.Mike2015-12-09 08:26 AM
Hello Mike ,
Did you Flash memory boot ? if yes , The best mode for your case is to use the censored mode. Private Flash Memory Password and censored 1) Set NVSCC0(CW) , NVSCC1(CW) different to 0x55AA. Set NVSCC0(SC) , NVSCC1(SC) equals 0x55AA.IMPORTANT : NVSCC0(CW,SC) must be equal to NVSCC1(CW,SC) otherwise your chip will be completely locked.
2) Define NVPWD1,NVPWD2- Your 64 bit passwords (keep them secret). it will not possible anymore to use PLS UDE except with the good defined password. BootPasswd0=NVPWD0 (your pass) BootPasswd1=NVPWD1 (your pass) Best regards Erwan ________________ Attachments : 2015-12-09_154413.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I02m&d=%2Fa%2F0X0000000bZe%2F4fk_7ytBbK_gTmz7ZjdzplvrR7jIEHYwuOvJNLR9E_g&asPdf=false2015-12-09 08:59 PM
Thanks Erwan for nice clarifications. I will refer the reference manual for using the Censorship feature. Just couple of more queries.
1. Currently I am using PLS UDE for flash programming and this feature is available with it. How about another tool which I may use during production? Whether all the tools supporting SPC560D series provide this Censorship feature to use?2. Whether this censorship feature works for both code as well as data flash? Whether seperate passwords can be used for code and data memories?Thanks in advance.Mike2015-12-10 12:51 AM
Hello Mike ,
1) For the tool you can use ''GangProgrammer.exe'' in PLS Directory. you can flash 8 Boards in parallel. I am checking with experts what is the best way to flash a software on SPC560D it is not a mass market question ;) to enable the censorship feature, you should do by software. 2) Yes , it is worked in the same way for DFLASH. the DFLASH will be censured too. it is the same password defined in NVPWD1,NVPWD2. CFLASH & DFLASH will be censured. Best Regards Erwan2016-01-21 03:21 AM
Hello Erwan,
For one of the posts, you mentioned about setting following registers. Can you please explain the underlined statement in detail? If both CW and SC registers should match for values, how the statement 1) can be true?The best mode for your case is to use the censored mode.
Private Flash Memory Password and censored
1) Set NVSCC0(CW) , NVSCC1(CW) different to 0x55AA.
Set NVSCC0(SC) , NVSCC1(SC) equals 0x55AA.
IMPORTANT : NVSCC0(CW,SC) must be equal to NVSCC1(CW,SC) otherwise your chip will be completely locked.
Thanks in advance.Mike