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

PSoC™ 5, 3 & 1

adamelli
Level 2
10 replies posted 10 likes given 10 sign-ins
Level 2

I changed the device to the new chip, CY8C4125PVS-482:

community.infineon.com/t5/Knowledge-Base-Articles/Changing-the-Target-Device-PSoC-3-PSoC-5LP-in-PSoC...

I was previously using  CY8C4245PVI-482. Then, I built the project. Errors resulted.

The first error to fix is the clock speed 48→24 MHz (see imo.png). 
The remaining errors are:

  • fit.M0049: Pin guidance unavailable: Resource limit: Maximum number of Macrocells exceeded
  • mpr.M0014: Resource limit: Maximum number of Macrocells exceeded

What does "fit" and "mpr" mean? Is there reference documentation explaining these errors? I never heard of a macrocell before. Is there a generic solution to these errors?

 

0 Likes
1 Solution
BiBi_1928986
Level 7
250 replies posted 250 sign-ins 100 solutions authored
Level 7

Hi.

Try this.
I don't normally show the UART pins.  You can delete the GPIO's on schematic, change UART Pins config tab to no show.  From cydwr window, pins tab, you'll see the outline of the 4125 and a list of pin signals (at the right) for assigning to pins.  You can dlick on a pin name, RX, and once it's high-lighted, drag it to the pin with a SCB RX name.  Do the same for the TX pin.

Doing the TX/RX pin assignments using this method, Creator takes care of sorting out the GPIO pad configuration.  That's the way I've always done it.

View solution in original post

18 Replies
BiBi_1928986
Level 7
250 replies posted 250 sign-ins 100 solutions authored
Level 7

Hello.

The 4245 contains Universal Digital Blocks (UDB).  Each block contains macrocells.  You can read the datasheet to see what a macrocell is.  The 4245 project appears to use UDBs.

The 4125 does not contain any UDB's.  Therefore, 4125 is not compatible to 4245 projects that use UDBs.

You'll need to go through the design to figure out what is using UBD's and then figure out a way to not use them with the new target device.  Or, go back to using 4245.

Sorry for the bad news, but that's the issue.

BTW, in Creator, you can double click on the error message and a window will pop up with a bit more explanation about the error.  the extra info is sometimes useful, sometimes not.  I don't know what 'fit and 'mpr' stand for.  I suspect 'fit' is abbreviated for the 'fitter' function in Creator that tries to fit the schematic into the target device resources.

BiBi_1928986
Level 7
250 replies posted 250 sign-ins 100 solutions authored
Level 7

Hello.

Yes, that is the reference document for UDB.  However, it is simpler to read the PSoC 4245 datasheet to see a quick description of UDB.

In Creator, you have a schematic for the project.  It is here that you would see logic gates, or UART or SPI or I2C or some digital design like shift register or status registers, etc.  These logic components use UDBs to help keep the design process simple.  Have a look at the schematic of 4245 and let us know what you see.

adamelli
Level 2
10 replies posted 10 likes given 10 sign-ins
Level 2

I think the UDB are used as PWM blocks (see pwm.png). I see in the PWM documentation, they can be implemented with FF blocks instead: cypress.com/file/131726/download

I am still reading the documentation on how to change the PWM blocks to fixed-function blocks. Or maybe it's not possible because cy8c4125pvs-482 uses PSoC 4?

 

 

0 Likes
BiBi_1928986
Level 7
250 replies posted 250 sign-ins 100 solutions authored
Level 7

Hi.

From the pwm.png image, I'd say those are fixed function blocks.  You can verify this by opening the project in Creator, view the schematic, double click the mouse over the PWM_RED component shown in schematic (you can check both of them).  In the window that opens, double click the Datasheet tab at bottom left corner of that window.  On the first page of the PWM component datasheet, it will say, 16-bit Fixed-Function Implementation (or something like that).  This means, that particular PWM component is built into the PSoC and not implemented using UDB's.

Both 4245 and 4125 have the same 4 fixed-function PWM components.  So, you're in luck here.

So, there must be some other digital logic on the schematic that is used in 4245 design.  It could be something as simple as a single AND gate.

Keep looking.  You're on the right path.

adamelli
Level 2
10 replies posted 10 likes given 10 sign-ins
Level 2

UART block (see image attached).

Would the "PSoC 4 Serial Communication Block (SCB)" work instead? Any help is appreciated. 

0 Likes
BiBi_1928986
Level 7
250 replies posted 250 sign-ins 100 solutions authored
Level 7

Hello.

This UART image is also likely a fixed function component of SCB (doesn't use UDB) of 4245 and available in 4125.  You can check the component datasheet using the same method described earlier.

BTW, CY8C4125PVS-482 has been manufacturer discontinued for a few years now.  You should consider using an alternate device.  I'd be surprised if you could purchase any of them today.

0 Likes
adamelli
Level 2
10 replies posted 10 likes given 10 sign-ins
Level 2

It's not my call, but I agree.

There are no other blocks. See the whole picture attached. 

0 Likes
BiBi_1928986
Level 7
250 replies posted 250 sign-ins 100 solutions authored
Level 7

Hello.

Okay.  The problem could be (but I don't really think so since it simply uses Systick, available in 4245 and 4125) the SysTimers component.  It is a custom component that was imported into the 4245 project.  Here's a link that describes how to import it and issues other users had.

https://community.infineon.com/t5/PSoC-Creator-Designer/SysTimers-component/m-p/173966

I have no experience with SysTimers component.  I don't know if it uses UDBs in 4245 or not but I don't think so.

When building the project, have you tried Clean and Build?

At this point, I'd suggest making a brand new project for 4125 and copy/paste the relevant file contents from the 4245 project into it.   It could be that when you changed the target processor, there were still parameters related to 4245 that didn't get deleted.  You literally have to copypaste and not just copy the file name to a new file that.

You could also make a backup copy of the project folder.  Then delete the folders/files generated by Creator except: main.c, TopDesign folder (contains schematic), xxx.cycdw, xxx.cyprj.  You'll then need to import the SysTimers component (I suspect).  Then Build and see what happens.

BTW, I discovered CY8C4125PVS-482 has been replaced with:
CY8C4125PVS-482Z and CY8C4125PVS-482ZT.

Let us know how it goes.

adamelli
Level 2
10 replies posted 10 likes given 10 sign-ins
Level 2

Extract the archive to your disk. Open your project, in the workspace explorer select the 'components' tab.

   

On your project node, right click and then 'import componment item'. Select the saved project from above as source project, the you can select the component to import in your project.

   

It should show up under 'community component' in the component list...


community.infineon.com/t5/PSoC-Creator-Designer/SysTimers-component/m-p/173966

I then dragged and dropped a new SysTimer as System Software Timer from the Community tab in Component Catalog. (I tried copy/pasting the SysTimer from the previous project, but it was not allowed.) Last I changed the default parameters to match the previous project. 

---

I think the problem, instead, has to do with the UART block. I cut out each block, and the errors only resulted with that block. The datasheet says, "The UART is implemented in the UDB blocks as shown in the following diagram."

In a footnote, "The maximum UART configuration doesn’t fit in to PSoC 4 device because of maximum number or UDB macrocells exceeded (max=32, need=59)."

All the errors are about the macrocells. 

 



 

0 Likes
BiBi_1928986
Level 7
250 replies posted 250 sign-ins 100 solutions authored
Level 7

Hello.

Aha!  As I previously mentioned, to check the UART if it was a fixed component or built from UDB's.  Looks like you found it is made from UDB's since the errors went away when you deleted this component.

4125 has 2 serial blocks called SCB, either one can be used as a UART.

You'll need to open the 4245 design, double click on UART in schematic and write down all the configuration information from each of the tabs.

Now, open the 4125 design and add the SCB component.  Then double click on the SCB component to configure it.  You'll put a checkmark in the UART option box.  Now, you'll have to configure the rest of the features based on what you wrote down from the 4245 UART.  Be aware, not all the options will be available for SCB UART since 4245 UDB UART has more features.

And, some of the API calls are different for the SCB UART vs UDB based UART.  So, read the datasheet for the SCB component and make appropriate changes in software.

I think you're heading down the right path here.

adamelli
Level 2
10 replies posted 10 likes given 10 sign-ins
Level 2

Thanks for helping me along the way. Any idea on what I should put for the interrupt sources? Attached picture has the layout. 

"RX - On Byte Received" and "RX - On Break" are check marked. 

"Break detected" seems to fit the latter. 

---

(The buffer sizes could not be lowered to 4 bytes each.)

0 Likes
adamelli
Level 2
10 replies posted 10 likes given 10 sign-ins
Level 2

For "RX - On Byte Received" I used "RX FIFO full". Wrong?

For "Break detected" I used "Break detected".

A few remaining errors resulted:

  • Pin guidance unavailable: RX(0) cannot be configured for Output Enable or Input/Output Synchronization while connected to \UART_1:SCB\'s uart_rx terminal.
  • RX(0) cannot be configured for Output Enable or Input/Output Synchronization while connected to \UART_1:SCB\'s uart_rx terminal.

 

0 Likes
BiBi_1928986
Level 7
250 replies posted 250 sign-ins 100 solutions authored
Level 7

Hello.

RX - On byte Received, I would use RX FIFO not empty.
RX - On Break, I would use Break detected (just as you thought).
I wouldn't worry about the buffer levels.  The default 8 is fine.

There's something not right with the RX GPIO pin configuration.  Have a look at the 4245 RX GPIO design configuration tab "General", "Input", "Output" and match that to the 4125 RX GPIO pin configuration.  If you've already done that, I'll have to think a bit more on this one.

adamelli
Level 2
10 replies posted 10 likes given 10 sign-ins
Level 2

@BiBi_1928986 wrote:

There's something not right with the RX GPIO pin configuration.  Have a look at the 4245 RX GPIO design configuration tab "General", "Input", "Output" and match that to the 4125 RX GPIO pin configuration.  If you've already done that, I'll have to think a bit more on this one.


I changed to "RX - On Break". The RX GPIO pin configuration was copied over from the old design, and all the parameters are the same. The same configuration errors resulted. 

I feel like it's so close!

0 Likes
BiBi_1928986
Level 7
250 replies posted 250 sign-ins 100 solutions authored
Level 7

Hi.

Try this.
I don't normally show the UART pins.  You can delete the GPIO's on schematic, change UART Pins config tab to no show.  From cydwr window, pins tab, you'll see the outline of the 4125 and a list of pin signals (at the right) for assigning to pins.  You can dlick on a pin name, RX, and once it's high-lighted, drag it to the pin with a SCB RX name.  Do the same for the TX pin.

Doing the TX/RX pin assignments using this method, Creator takes care of sorting out the GPIO pad configuration.  That's the way I've always done it.

adamelli
Level 2
10 replies posted 10 likes given 10 sign-ins
Level 2

Yay! I am so happy. That worked. Now onto a new question about how to fix the UART errors in the main.c file. 

Thanks for all your help.

0 Likes
BiBi_1928986
Level 7
250 replies posted 250 sign-ins 100 solutions authored
Level 7

Hello.

Excellent work!

Good to hear you've got the schematic working.  You'll have to compare the API calls for the 4245 UDB UART versus 4125 SCB UART and make appropriate changes.

As I know nothing about DMX, you'll have ensure DMX implementation is valid with the SCB UART configuration.

Good luck with your project.

0 Likes