cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ Creator & Designer

GiLi
New Contributor II

Hi Cypress,

I recently looking into the 4700S series, but i found that there are not much code example for this series, only 8 of them. 

GiLi_0-1638318853108.png

I tried to follow those examples from PSoC4 such as 4200 series etc. but they are significantly different now.

Is there any resources you can share?

The way Cypress update or extend your component library is quite hard to do the sustaining process. All the functions and components are part specific, which is not quite user friendly, just my opinion.

Anyway, please see if you can share any helpful tips. Thanks!

 

0 Likes
1 Solution
Hari
Moderator
Moderator

Hi @GiLi 

PFA the Code examples for UART, ADC, and WDT. Also, the UART_PutChar is available as a macro in UART_SPI_UART.h header file. In the application code, you can use these directly and the right APIs will be fetched by the IDE. 

 

Please let me know if you face any issues with these codes. 


Best regards, 
Hari

View solution in original post

0 Likes
16 Replies
Hari
Moderator
Moderator

Hello @GiLi 

 

Can you please let us know the functionality that you are looking for? You can create the code example for other devices (such as the 4200) and change the device to the 4700S. 

You can also take a look at the 4000S, 4100S, and 4100S Plus code examples as they are architecturally very similar to 4700S and the port of CEs should be straightforward. 

 

Best regards, 
Hari

0 Likes
GiLi
New Contributor II

Hi Hari,

Yes, you are correct that I used the same approach that based on previous 4200 series project and change the device. Unfortunately, most the components are changed, such as UART, I2C, Watch dog, ADC are more critical to me (flip flop and logic gates, these are minor). Pretty much all previous generated sources cannot be re-use. 

Also i took a look from other series like you said, but they are referencing to those previous component library, which are not applicable to this 4700S device. This is why i post my feedback here and hope to get more resources to speed me up.

This is the major problem that with PSoC devices and Creator, often the examples are out of date, which are the device first released, then new device and component library that has function name changes, or component change, which is not backward compatible and not quite user friendly. Anyway, just my opinion. 

Please advise if you have any tips or updated code examples. Thanks!

0 Likes
GiLi
New Contributor II

Hi Hari,

While I am trying the 4700S with the approach you mentioned, which started from my 4200 and change the device. Here is the problem about the watch dog that i am facing.

From my 4200 previous project, I found the following:

GiLi_0-1638385402203.png

After device changed to 4700S, see the difference below

GiLi_1-1638385475239.png

See lines 176 and 186, developer changed, they work differently now.

I don't think we can change this easily from one device to another device.

Any tips or recommendation would be appreciated!

Many thanks!

 

0 Likes
Hari
Moderator
Moderator

Hi @GiLi 

 

There are architectural changes from 4200 to 4700S device, hence, the internal implementation might be different. Please let me know if you are facing any issues in implementing the watchdog timer at the application level.

Also, this difference would not be present when porting an example from 4000S or 4100S Plus to 4700S device. 

Please let me know the issue that you are facing. Can you attach a sample project showcasing the issue so that we can take a look?

 

Best regards, 
Hari

0 Likes
GiLi
New Contributor II

Hi Hari,

We were using the 4200 and currently evaluating this 4700S.

It would be nice if you can provide the code examples for Watch dog, ADC, UART and I2C. then I can quickly verify them for the porting.

Thanks!

0 Likes
GiLi
New Contributor II

Hi Hari,

I have new found while i am working on the UART portion.

After i generated the application, i was trying to location a few specific APIs, for instance, SCB_UartPutChar(), which specified in the "PSoC 4 Serial Communication Block (SCB)" document, FYI, it is the right 4.0 version for the UART block, see image below.

GiLi_0-1638497595336.png

Unfortunately, I couldn't find those APIs in the generated source, see my code explorer window below.

GiLi_1-1638497671052.png

Please advise if there is missing API in the library or let me know where to locate those APIs.

Thanks!

 

0 Likes
Hari
Moderator
Moderator

Hi @GiLi 

PFA the Code examples for UART, ADC, and WDT. Also, the UART_PutChar is available as a macro in UART_SPI_UART.h header file. In the application code, you can use these directly and the right APIs will be fetched by the IDE. 

 

Please let me know if you face any issues with these codes. 


Best regards, 
Hari

View solution in original post

0 Likes
GiLi
New Contributor II

Hi Hari,

This seems the previous UART API breaks down into several files, this may not quite user friendly when using different series of your PSoC.

Anyway, i appreciated all the tips and info from you.

Thank you!

0 Likes
GiLi
New Contributor II

Hi Hari,

I am having some problem when i am working on my UART function.

I was using the UART interrupt, so i am checking how can i convert to this 4700S, but i noticed the UART_INT.c is not showing up in the generated source folder. is there any problem with it? see image below.

GiLi_0-1638814832545.png

Then i located the UART_INT.c in the generated source folder, no matter how i define in this file, the UART_RXISR and UART_TXISR still couldn't enable them, see image below.

GiLi_1-1638815035691.png

Please advise. Thanks!

 

0 Likes
GiLi
New Contributor II

Hi Hari,

BTW, the examples you provided were outdated and those components are in different version now. They were what i was using with the 4200 series. They are not compatible with the components available for 4700S.

0 Likes
Hari
Moderator
Moderator

Hi @GiLi 

 

You can update the components by right-clicking the project and choosing Update components (or navigate to Project -> Update Components). 

I tried this in the 4700S kit CY8CKIT-148 and these are working. Please let me know the component that you are facing issues with. 

What is the exact MPN that you are using? Please check if the particular resource is available for the MPN that is chosen. 

 

Thanks, 
Hari

0 Likes
GiLi
New Contributor II

Hi Hari,

I am using the latest component library on the 4700S, there is no need to update.

Can you be more specific, like which/what example is/are working?

if you don't mind, can you upload those example project(s) here please.

MPN is CY8C4745AZI-S403.

Thanks again for your help!

0 Likes
GiLi
New Contributor II

Hi Hari,

With those samples you provided, I tried the ADC and watchdog examples and they are good reference for me to do the conversion. Unfortunately, the UART example is not quite applicable because I will need to use the interrupt. It would be nice if you have some example to show me how to use the interrupt service routine in this CY8C4745AZI-S403 device. 

Thanks for your help again!

0 Likes
GiLi
New Contributor II

Hi Hari,

Are you still supporting this thread?

I have an issue on the ADC example you provided, I tried to read the ADC value, but the pin P0[0] couldn't read any value, all 0xFFFF. 

Please let me know if you are still supporting these multiple issues, otherwise, i can split this into other thread.

Thanks! 

0 Likes
GiLi
New Contributor II

Hi Hari,

Here is the updates for my evaluation progress.

So far, the UART and ADC are working fine and I found that what made my UART not working correctly.

In fact, it was one of the ADC API causing the problem, the API is "ADC_SAR_Seq_1_ReadResult_mVolts(uint8 chId)". I found that my ADC input pin pulled up high when I used this function. So i changed it back to your example, which separates the conversion and get value as "ADC_SAR_Seq_1_StartConvert(uint8 chId)" following with "ADC_SAR_Seq_1_GetResult_mVolts(uint8 chId)". This probably my watchdog counter has some problem.

Anyway, I will continue the watchdog tomorrow and i have another last function to finish my evaluation.

Thanks again!

0 Likes
Hari
Moderator
Moderator

Hi @GiLi 

 

Thanks for the update. Please let me know if there are any other issues with these examples. 

 

Best regards, 
Hari

0 Likes