What should I do to use JLINK to program the psoc4 ble?

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

cross mob
Anonymous
Not applicable

I want to use JLINK for production programming. But it seems the jlink can not even connect to it.

0 Likes
1 Solution
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

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

   

or  

   

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

View solution in original post

0 Likes
8 Replies
himam_31
Employee
Employee
50 likes received 25 likes received 10 likes received

Can you please give more details on this. Which Software are you using with JLink etc.

   

Thanks,

   

Hima

0 Likes
Anonymous
Not applicable
        The newest version V6.14C. Now have given up, seems it can not program the security byte.   
0 Likes
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received


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
 

Anonymous
Not applicable

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.

0 Likes
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

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

   

or  

   

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

0 Likes
Anonymous
Not applicable

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.

0 Likes
David_Zhang
Level 5
Level 5
Distributor - Arrow(GC)
First like received 50 sign-ins 25 sign-ins

hi Infineon:

   may i know  where can i find SampleProject.jflash,  i  can't find it in jlink  soft?

  JFlash.exe -openprj"C:\Work\SampleProject.jflash" -open"C:\Work\PSocOutput.hex" -delrange0x90300000,0x90300001 -auto

0 Likes
lock attach
Attachments are accessible only for community members.
David_Zhang
Level 5
Level 5
Distributor - Arrow(GC)
First like received 50 sign-ins 25 sign-ins

hi  Infineon:

    i  have same issue, i try to use JFlash.exe -openprj"C:\Work\SampleProject.jflash" -open"C:\Work\PSocOutput.hex" -delrange0x90300000,0x90300001 -auto , but it failed , can  you help to advice it ? i  had attached my steps in it , TKS

0 Likes