ISSP: Why Doesn’t It Program | Cypress Semiconductor
ISSP: Why Doesn’t It Program
“Can’t Acquire Device”, “Verify Failed”, “Checksum Error”, “Device not in database”. These are some of the errors the PSoC Programmer throws at users when programming a PSoC In System. When you dedicate the P1 and P1 pins exclusively for ISSP, there usually is no problem in programming the chip on board. But the trouble begins when you share P1 and P1 for other functions.
The most commonly encountered problem in ISSP is when P1 and P1 are used for I2C. In programming mode, both SCLK and SDATA pins of the PSoC are configured in Pull Down mode with an internal 5.6K pull down resistor. There is no issue with the SCLK line as the programmer always drives the SCLK line. But things are different with the SDATA line. When the programmer is reading information (like device ID, verify, checksum etc), the PSoC has to drive the SDATA line. The external I2C pull up resistor forms a potential divider with the internal pull down resistor and does not allow the PSoC to drive LOW on the SDATA line. This results in a plethora of errors mentioned before.
There are various approaches to solve this problem.
- The first and the best “DO NOT USE THE ISSP PINS AS I2C”. Use P1 and P1 instead.
- If you are compelled to use the ISSP lines for I2C as well - like when you use a CY3240 I2C USB bridge on the ISSP header for debugging - try isolating the I2C pull up resistors from the SDATA line using a jumper when programming.
- If you cannot implement the above because of board space problem, add an external load resistor on SDATA line to GND on the ISSP Programmer. This resistor will apply in parallel with the internal pull down resistor of the PSoC and will reduce the effective resistance and reduce the potential divider effect. The value of this external resistor will depend on the value of the I2C pull up resistors. The criteria is that when PSoC drives a LOW on the pin, the potential divider should drive a voltage less than VIL level of the programmer (less than 0.6V should be fine). Usually a value of 500 ohms to 1K should solve the problem. Below is a picture on a hack on MiniProg to add the 1K pull down resistor based on a post in psocdeveloper forums a few years back. As I could not locate the post, I had to risk one of my own programmers.
If the SDATA or SCLK line is configured as an input pin and is driven by a low impedance source, this will load the programmer. So, always use the SDATA and SCLK pins as output pins driving a high impedance load. This will prevent the programmer getting loaded.
Do not use direct capacitive loads on the ISSP lines as this will affect the rise and fall times of the programming signals and will affect programming.
AN2014. This application note provides some details about the ISSP programming, pin loading etc.
Happy ISSP Programming!!