3 Replies Latest reply on Apr 7, 2019 7:37 PM by XiaoweiZ_71

    Program lifecycle with custom app


      I want to develop a Windows app that does nothing but set the lifecycle to Secure.  I think I can use the PSoC Programmer example from Programmer\Examples\Programming\PSoC6\SWD\C_Sharp and this API:


      PSoC6_WriteProtection(byte IN lifeCycle, nvector IN secureRestrict, nvector IN deadRestrict, bool IN voltageVerification, string OUT strError)


      I tried first to read the protection with this code:


                  byte chipProtect;

                  hr = pp.PSoC6_ReadProtection(out chipProtect, out strError);

                  if (SUCCEEDED(hr))


                      Console.WriteLine(string.Format("Chip protection data: {0}", chipProtect));






      It gives the error "This PSoC device doesn't support PSoC6_ReadProtection() API".  In PSoC Programmer this is the chip info:

                                                                     | Automatically Detected Device: CY8C6136FTI-F42

                                                                    | Silicon: 0xE236, Family: 0x100, Rev.: 0x23 (*C)

                                                                    | SROM Firmware: 4.01, Flash Boot: (*C)

                                                                    | Protection state: 0x02 (NORMAL), Life Cycle stage: 0x01 (NORMAL)


      I don't want to destroy any boards testing the PSoC6_WriteProtection() function so I want to know why the PSoC6_ReadProtection() fails first.  Does anyone have a working app that sets lifecycle to Secure so I can test?