FX2LP based SWD programmer

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

cross mob
Anonymous
Not applicable

I have read http://www.cypress.com/?app=forum&id=2232&rID=84336 and http://dangerousprototypes.com/forum/viewtopic.php?t=3105&p=57759 andhttp://dangerousprototypes.com/forum/viewtopic.php?f=56&t=2823&start=30#p30169 but one thing that has not been clearly documented is WHERE this information came from. 

   

I've also read the HSSP app note (AN73054) at http://www.cypress.com/?rID=57435 but this is a more generic document, not a specific document for the FX2LP based programmers.

   

The CY8CKIT-003 documentation shows the FX2LP connections (PD0 = SWDIO, PD1 = SWDCLK, PB2 = XRES#), but does not document which hex file to load. The CY8CKIT-050 has the same FX2LP schematic.

   

I'm using one of the LCSoft FX2LP devkits inexpensively available on eBay such as http://www.ebay.com/itm/EZ-USB-FX2LP-CY7C68013A-USB-EEPROM-Develope-Board-Module-Logic-Analyzer-/271.... I've used this board in other projects and it works great, the hardware is not broken.

   

In the PSoC Programmer Service directory I see a number of firmware files:

   
        
  • DVKProg_5_simfw
  •     
  • DVKProg_fw
  •     
  • ftk_3_simfw
  •     
  • ftk_5_simfw
  •     
  • fx2lp_fw
  •     
  • rv2_miniprog3fw
  •     
  • rv5_miniprog3fw
  •    
   

What is the difference between all of these files? What does _simfw signify? Is DVK the on-board development kit programmer firmware? Is FTK for the first touch kits for PSoC3 and PSoC5? What is the generically-named fx2lp_fw for? The .txt file gives the versions of these files but not what they are intended for.

   

Is the source for any of these available and if so, where?

   

Some schematics I've seen have a secondary pair of SWDIO/SWDCK lines at PB0/PB1 and they seem intended for the USB SWD pins on PSoC5. Is this true? Can either pair (PD0/PD1 and PB0/PB1) be used or is the USB SWD connection protocol different?

   

If I want to program a PSoC5LP with the FX2LP dev kit, which should I use? How about a PSoC42xx?

0 Likes
6 Replies
Anonymous
Not applicable

 To partially answer my own question:

   
        
  • it seems that the DVK or FTK (fw or simfw) or genfx2lp firmwares all work fine with the FX2LP devkit board available on eBay, and work fine for the PSoC5LP devices.
  •     
  • I don't have any PSoC3 devices so I can't verify that they work with the same firmware.
  •     
  • NONE of the firmware files in that directory appear to work with PSoC42xx.
  •    
   

Now the PSoC4 SWD protocol seems at first glance to be identical to the PSoC5LP SWD protocol so it's probably just a matter of the firmware simply not recognizing the PSoC4 signatures. I don't think the source for the FX2LP based USB-SWD bridge is available and thus can't be extended to support PSoC4 at this time.

   

The PSoC4 pioneer board uses a PSoC5LP as the USB-SWD bridge. This is like using a Pinto to tow a Cadillac, I'm not sure why they did this except perhaps to demonstrate the ability to do so. The source for the PSoC5LP USB-SWD bridge does appear to be available (as part of AN84858 at http://www.cypress.com/?rID=81013).

0 Likes
Anonymous
Not applicable

 "but one thing that has not been clearly documented is WHERE this information came from. "

   

 

   

it came from a few sleepless nights, several fingers burned when building prototypes and curious explorations all driven by the need to have cheap programmer/debugger tools for starving students from our uni 

   

I'm sorry if I didn't document the process more clearly 

   

 

   

"I've also read the HSSP app note (AN73054) at http://www.cypress.com/?rID=57435 but this is a more generic document, not a specific document for the FX2LP based programmers."

   

 

   

The FX2LP hardware is not supposed to be a generic programmer or even have the ability to program external devices. it is just an onboard programmer. Therefore, you don't need to know the protocol, you just buy the board and use PsocProgrammer. Why would you even need the protocol? are you planning on hacking their hardware? 

   

why would cypress put resources documenting something to help you do that?

   

 

   

"In the PSoC Programmer Service directory I see a number of firmware files:

   
        
  • ...
  •     
  • ...
  •     
  • What is the difference between all of these files? What does _simfw signify? Is DVK the on-board development kit programmer firmware? Is FTK for the first touch kits for PSoC3 and PSoC5? What is the generically-named fx2lp_fw for? The .txt file gives the versions of these files but not what they are intended for."
  •     
  •  
  •    
   

Those different files are firmware for each cypress development tool. Look in the driver files to find out which file is loaded for each development tool.

   

 

   

Is the source for any of these available and if so, where?

   

 

   

You are probably kidding aren't you?

   

 

   

Some schematics I've seen have a secondary pair of SWDIO/SWDCK lines at PB0/PB1 and they seem intended for the USB SWD pins on PSoC5. Is this true? Can either pair (PD0/PD1 and PB0/PB1) be used or is the USB SWD connection protocol different?

   

 

   

PSOC5s can be programmed using either the dedicated swd pins or the USB pins. This is an awesome feature. this way You don't need a dedicated firmware update port exposed. You just need to build a miniprog -  usb adapter and can update the firmware using very the same pins you are already using to have your psoc as a usb device. allows great cost savings great flexibility. The Protocol is the same you just need certain conditions on the usb lines at power-on to signal firmware update. Read the Datasheet

   

 

   

If I want to program a PSoC5LP with the FX2LP dev kit, which should I use? How about a PSoC42xx?

   

 

   

Most work well with psoc5 and psoc3. Support for new psoc devices might not be available. You can check device support in psocprogrammer by connecting the programmer without a target device attached. I have not tried with psoc4.

0 Likes
Anonymous
Not applicable

 Thank you for your reply. No, I was not kidding with any of my questions. My reasons are all legitimate and above-board. I'm certainly not trying to damage Cypress or "hack the device".

   

 

   

You don't happen to know offhand why the PSoC4 seems to be the red-headed stepchild of the PSoC family, do you? All the programmers either support PSoC3/5 or PSoC4, but nothing (except MiniProg3) supports both. I've read the datasheets and there are some minor differences in how the SWD responses come back but certainly nothing that a programmer couldn't work with and support PSoC3/4/5 with a single firmware.

0 Likes
Anonymous
Not applicable

the PSOC4 is a new device and actually all the programmers that support psoc4 support psoc3/5lp. instead, If you are talking about the DVK programmers, well ...  they where never intended to work as external programmers . You are actually lucky that they support other devices instead of only the one already installed in the board.

   

I doubt there will be a -040 psoc4 kit so do not expec to have a firmware 

0 Likes
Anonymous
Not applicable

I'm in the same boat as you. I have a few chinise FX2LP devices laying around and don't feel like springing $90 on miniprog3.

   

I'm working on a firmware for FX2LP that would allow you to program PSOC4 based devices. I'm using AN84858 as baseline.

   

You will need custom software on the PC side to upload firmware as the interface for the Cypress programmer is not public. I'll post the project on github once it's functional.

   

It will use the same hw interface PD0 - SWDIO, PD1 - SWDCL, PB2 - XRES.

   

~V

   

PS: I only have 4100 and 4200 to test with. I don't have 4000 based device.

0 Likes
Anonymous
Not applicable

Here is a link to the project files. Tested on CY8CKIT-049-41xx.

   

https://github.com/ghent360/PSOC4_swd_programmer

   

I included the compiled FX2LP binary in case you don't have access to the Keil toolchain. You will need to compile the PC software with Visual Studio.

0 Likes