Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > Timeout of SPC Polling

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Timeout of SPC Polling
Moderator:
ANCY

Post Reply
Follow this topic



Timeout of SPC Polling

jcmrex posted on 14 Nov 2012 3:09 PM PST
Member
2 Forum Posts

Hello.

I am working with a CY8C5568LTI-114 PSoC5 core, and am attempting to program the firmware into it on a c# program using the PP_COM_Wrapper.dll supplied in Cypress' Programmer software.

Settings are:

3.3V
SWD protocol
10 pin header
3.0MHz clock

MiniProg3 Rev. A

Every time I get to the flash programming, the program always faults with:

"Error: Timeout of SPC polling. Lost communication with chip (Status = 0x82)"

Looking at the the same issue here, I tried the suggestion of zeroing out the write-once latch data. Neither of them worked, and I can find no further mention of this issue anywhere.
I also get this error using Cypress' example unmodified (which is what a lot of my code is based on anyhow) save for changing the firmware file.

I attached a picture, it seems to write only a single block of flash/config data before stopping.

If I program the firmware directly in PSoC Creator 2.1, or with the PSoC Programmer tool, then the firmware is uploaded correctly. Strangely, after doing so, all program operations with my C# program work perfectly.

Then, if I disconnect the USB cables for the MiniProg3 and the board I'm working on (USB is power source), and close all Cypress programs and my Visual Studio project, and then reconnect the cables and open up my project (but not Cypress' programs), then it does not work again. This hinted that maybe it was a wrapper/driver issue, so I reinstalled PSoC Programmer with the Update Manager tool and used the latest dll file in my project, but it did not fix this.

In the thread linked above, a Cypress employee posted the workaround of opening PSoC programmer software and executing a command. However, the program I'm working on is intended to be run at a manufacturing facility to test boards as they come off of production, I need this to be fully automatic and reliable.

The OS is x86 Windows 7.

Any help will be appreciated.




Re: Timeout of SPC Polling

jcmrex posted on 19 Nov 2012 04:32 PM PST
Member
2 Forum Posts

Updating with more information.

 

In the previous post, I wrote this:
"Then, if I disconnect the USB cables for the MiniProg3 and the board I'm working on (USB is power source), and close all Cypress programs and my Visual Studio project, and then reconnect the cables and open up my project (but not Cypress' programs), then it does not work again."

 

This is half true. Disconnecting the board power will start the failures once again. However, disconnecting the MiniProg3 from the PC has no effect. I can connect both the board and Miniprog3, issue an "Erase All" command from PSoC Programmer, then program the device with my application successfully, then disconnect the MiniProg3, attach a different MiniProg3, and program again. But disconnecting the power from the board will cause it to start failing again even with the same MiniProg3.

 

I suspect that maybe I am not initializing all settings in the programming chain correctly, but at the same time, the program works without modification, just AFTER running PSoC Programmer.

I will list the programming process below, if I am missing anything or doing something wrong, please let me know.

 


 Start up COM

OpenPort();

pp.SetPowerVoltage("3.3");

pp.PowerOn();

pp.SetProtocol(enumInterfaces.SWD);

pp.SetProtocolConnector(1); // 10 pin connector

pp.SetProtocolClock(enumFrequencies.FREQ_03_0); // 3.0MHz

pp.HEX_ReadFile(filePath);

pp.SetAcquireMode("Reset");

pp.DAP_AcquireChip();

pp.PSoC3_EraseAll();

//Write flash arrays

pp.PSoC3_GetSonosArrays(enumSonosArrays.ARRAY_FLASH)

loop for each flash array

{

pp.PSoC3_GetFlashArrayInfo(arrayID);

loop for each row

{

array1 = pp.HEX_ReadData(flashProgrammed, rowSize, out raw, out m_sLastError);

array2 = pp.HEX_ReadConfig(configProgrammed, 32, out raw, out m_sLastError);

if(array1 and array2 are all zero)

skip programming

else

pp.PSoC3_ProgramRowFromHex(arrayID, rowID);

}

}

and then programming-unrelated checksum stuff, release chip, power off, close port


I error check after each call to the PP_COM.



Re: Timeout of SPC Polling

rolf posted on 20 Nov 2012 02:19 AM PST
Top Contributor
81 Forum Posts

 Hi,

 

I see you use powering from USB. This may be an issue as the connected board consumes some current. A short USB cable (not the thin USB retractable!) can help.

 

For production programming it may be better to use an external power supply and to place some caps near the programming connector.

 

Try replacing your Miniprog3 with the latest Rev*B: http://www.cypress.com/?app=kitupgrade

 

Sometimes placing "Thread.Wait(100)" in between API operations may help.

 

Regards,

Rolf



Re: Timeout of SPC Polling

PSoC Rocks posted on 24 Nov 2012 11:55 PM PST
Top Contributor
128 Forum Posts

 I have heard that this is a known issue and will be fixed in the next release of PSoC Programmer.






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20