- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
We are trying to program a PSOC4 with our chip by using the SWD protocol, similar to this:
We are reusing the same code as AN84858.zip . We just modified the gpio related code as per our environment.
We are getting a wrong acknowledgement 0x7 from the PSOC. Attached is the waveform of the start condition. Can you please let us know what is wrong ?
Thanks,
Chaitanya
- Labels:
-
PSoC 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which Host programmer do you have?
You need to modify the values of the timeout parameters defined in the Timeout.h file according to the host programmer used as mentioned at page#10 of the AN84858
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi anks,
Thanks for your answer. We are using an external micro-controller( its actually a SOM from some other vendor) to program the PSOC4. The other micro controller is interfaced to PSOC4 and wants to program the PSOC4.
I referred page 10. Can you elaborate how should I relate the timeout values on that page with the SOM that I have ? Because I see only PSOC chips mentioned there.
Please explain.
Thanks,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Host programmer can be other than PSoC and that is what mentioned at page#10:
A separate test project, “C_Hssp_TimeoutCalc,” is provided with the application note. This project illustrates the procedure to calculate the timeout parameters for a PSoC 5LP host programmer. Create a similar test project for any other host programmer to calculate those timeout values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi anks,
Thank you anks. I will have a look at this specific test project and get back to you on this.
Thanks,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi anks,
During the test also I was getting the wrong acknowledgement 0x7.
Apart from that I obtained the values as per the comments mentioned. The timeouts which we had by default were more than the one's that were calculated. I changed those, but the issue still remains the same. Do we have any specific pin configuration requirements on the data and the clock gpio pins for SWD protocol ?
Thanks,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From our analysis till now we see that, we are sending 0xA5 but getting a wrong acknowledgement in 0x7 !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What GPIO related code have you changed.Please mention
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi anks,
We have Linux running on the external controller. The document mentions that you have to change the gpio code as per your host controller software. Therefore we have changed the gpio code similar to this:
Your code: Linux equivalent
SetSwdioCmosOutput () Code for writing "out" to /sys/class/gpio/<gpio_number>/direction
SetSwdioHiZInput () Code for writing "in" to /sys/class/gpio/<gpio_number>/direction
SetSwdckHigh() Code for writing "1" to /sys/class/gpio/<gpio_number>/value
And so on !!!
Let me know if you want to know more !
Thanks,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This appears as a issue in conversion of program for Linux running on the external controller.But, presently I am not familiar with Linux based coding, so can't help in that.
For eg: please check the definition of these function SetSwdioCmosOutput () & SetSwdckHigh() , they are writing to the bits of register.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi anks,
Thanks. Can you tell me the exact reset condition ? That is the pin transitions and timing requirements during reset ?
Thanks,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please check the Programming Spec given at this link:
http://www.cypress.com/file/409516/download
Please check the topic "Hardware Access Commands" at page#11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Anks,
Thank you for your reply. We have bought the PCOS4 Pioneer dev kit. We want to view the SWD data and clock signals on the devkit. What is the best way to view them ? Do you at Cypress have a code example which will help us in capturing successful SWD communication on the PSOC4 Pioneer dev kit ?
Looing forward for your reply.
Thanks,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Chaitanya,
I think you need to probe the SWD lines while programming in order to view the SWD data and clock signals.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Anks,
Thanks I did probe the SWD lines.
The chip we are programming is CY8C20496A . Can you confirm that if we sent the command 0xA5 to this controller, we can read the chip id correctly ? Or we have to send something else ?
Thanks,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Chaitanya,
CY8C20496A is a PSoC1 device as evident from product landing page at this link:
http://www.cypress.com/part/cy8c20496a-24lqxi
And as mentioned in this Programming spec for PSoC1, PSoC1 can be programmed in-system using the in-system serial programming protocol (ISSP):
AN84858 is meant for programming PSoC4 and PSoC Analog Coprocessor, not for PSoC1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Anks,
Thanks for your reply. We sorted out the confusion.
We are also trying to flash the device using I2C using our custom controller as a host.
Currently we are getting a NACK on writes when we try to write a command in CyBtldr_CreateEnterBootLoaderCmd()
Are there any pre conditions required to do this ?
Thanks,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Chaitanya,
The preconditions are that the connection must be successfully open after g_comm->OpenConnection() call.
Do kindly let me know if you are trying to program PSoC4 using your custom controller. If you can let me know the full part number, it would be better.
Thanks,
Sampath