Can you please give more details on this. Which Software are you using with JLink etc.
The newest version V6.14C. Now have given up, seems it can not program the security byte.
The hex file created by PSoC Creator for a project cannot be used directly by J-Link to program,you have to make certain modification as mentioned in this Forum link also- http://forum.segger.com/index.php?page=Thread&threadID=2704 There it is clearly mentioned that- It seems to us that the .hex file created by Cypress IDE contains (at address 0x9030 0000) the Checksum of the flash section , which is most likely used by Cypress IDE to verify the that the contents of the flash area and the data file are identical. This address cannot be programmed, thus will J-Flash will fail to do so. According to the manual, this address is written to by the controller, and can be used for verification purposes. J-Flash should only be used with data files that solely contain (programmable) flash addresses. Erik from Segger has also mentioned as workaround that- For now, please use the -delrange command line (see example below) JFlash.exe -openprj"C:\Work\SampleProject.jflash" -open"C:\Work\PSocOutput.hex" -delrange0x90300000,0x90300001 -auto
First, the jlink seems can not connect when the chip SWD is set as GPIO mode, Second, I've tested the security byte in jlink exit steps, seems it can not work.
There is some sequence needed to program a chip having SWD in GPIO mode. And found a Segger forum where this is addressed - : http://forum.segger.com/index.php?page=Thread&threadID=2945
J-Link probe and software presently does not support "Power Toggle" reset type required for GPIO mode.
So once PSoC is programmed with the hex, which sets SWD pins into GPIO mode (by "System" tab in Creator), J-Link/J-Flash cannot program it again.
The only was to re-program in J-Flash - erase the chip in PSoC Programmer
set the SWD in SWD mode in systems tab.
And use the below code to modify the above selection in firmware.
CY_SET_REG32(0x40020000,CY_GET_REG32(0x40020000)&0x00FFFFFF); // manually changing the pins[0.6 and 0.7] to GPIO
Thanks,ANKS. Your link indicates this issue has been fixed in 5.10p, but you said "The only way to re-program in J-Flash - erase the chip in PSoC Programmer". OK, I have bought several sets miniprog3 and it is on the way. Thanks again.