Migrating from PSoC3 to PSoC5

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

cross mob
Anonymous
Not applicable

Hi

Greetings of the day!!!

We are using  CY8C3866AXI-039 from PSoC 3 family in one of our product. But due to limitation of code memory we have to move to another chip (CY8C5867AXI-LP024) from PSoC5 family.  

The application code written for PSoC 3 family chip is working fine. And we are using same application code for PSoC5 famiy chip.

We have created new project with CY8C5867AXI-LP024 chip and added peripherals like ADC,LCD and I2C and used same application code written for PSoC 3.

With this we are able to get LCD display working,but ADC and I2C is not working. We have tested I2C waveform on oscilloscope as well and found that there is no response from I2C slave (DS1307 and EEPROM).

Are there any modificatons we need to in existing application code of PSoC 3 to get it work on PSoC5 chip.

Kindly advice how to proceed ahead.

Thanks & Regards,

Purushottam

0 Likes
1 Solution

I can see that you set up your own delay functions to wait for some time. Because the PSoC5 is executing faster than the PSoC3 the timing might be different now. I would suggest you to use the provided APIs CyDelay() and CyDelayUs() both documented in "System Reference Guide" from Creator help menu. Imho it is always better (when possible) to check using a status API for completion of an I2C transfer.

I used the latest Creator version (4.2 beta) and there had been a bunch of component updates from your version.

Happy coding

Bob

View solution in original post

0 Likes
8 Replies
RyanZhao
Moderator
Moderator
Moderator
250 sign-ins First question asked 750 replies posted

Hi Purushottam,

Kindly refer to PSoC® 3 to PSoC 5LP Migration Guide:

http://www.cypress.com/documentation/application-notes/an77835-psoc-3-psoc-5lp-migration-guide

Thanks,

Ryan

Anonymous
Not applicable

Hi Ryan,

Thanks for your reply. I have gone through the suggested application note and it is mentioned that "C code written for the Keil 8051 compiler for PSoC 3 will port directly to the gcc and MDK compilers used with PSoC 5LP ARM Cortex-M3" and we are following the same.

In PSoC 3 I2C bus is working but in PSoC5 it's not. Rest of the hardware is same. We have only changed the PSoC5 chip in same hardware.

So it seems the problem is in software only. Kindly suggest to troubleshot this problem.

Thanks & Regards,

Purushottam Pawar

0 Likes

The underlying hardware of I2C is the same for PSoC 3 and 5. So something with your settings or I/O pins must have gone wrong. Can you please post your complete project or a shortened version that shows the error so that we all can have a look at all of your settings. To do so, use

Creator->File->Create Workspace Bundle (minimal)

and attach the resulting file. Are you using a Cypress development or prototyping board? Which one??

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi Bob,

Greetings,

Please find attached projects created for PSoC3 and PSoC5. RTC (DS1307) working fine on PSoC3 whereas on PSoC5 it is not working and we are getting only constant value (may be garbage value) all the time.

Also we are not using development board for this testing. We have tested it on prototype board.

One thing we have observed is that we have set master clock frequency to 24Mhz for both PSoC 3 and PSoC 5 and incrementing one variable. But the speed of increment is much higher in PSoC5 as compared to PSoC3. I would request you to check clock settings done in attached projects.

Thanks

Purushottam

0 Likes

Hi Purushottam,

Can you please use

Creator->File->Create Workspace Bundle (minimal)

and attach the resulting file(s).

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi Bob,

Please find attached file and let me know if it is okay.

Thanks

Purushottam

0 Likes

I can see that you set up your own delay functions to wait for some time. Because the PSoC5 is executing faster than the PSoC3 the timing might be different now. I would suggest you to use the provided APIs CyDelay() and CyDelayUs() both documented in "System Reference Guide" from Creator help menu. Imho it is always better (when possible) to check using a status API for completion of an I2C transfer.

I used the latest Creator version (4.2 beta) and there had been a bunch of component updates from your version.

Happy coding

Bob

0 Likes
Anonymous
Not applicable

Hi Bob,

Thanks for your advice.

I have used CyDelay() API and tested the same code. Now we are getting some values (though these values are not as expected).

I will test it with latest Creator version with points suggested by you.

Thanks,

Purushottam

0 Likes