How can I instantiate a UDB-based I2C/UART Controller with PSoC 6 & Creator 4.3?

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

cross mob
Bit-Twiddler
Level 3
Level 3
5 questions asked 10 sign-ins First solution authored

Hey there!

I read in the "CYBLE-416045-02 EZ-BLE™ CREATOR MODULE.pdf" document:

"Cypress-provided peripheral component library using UDBs to implement functions such as communication peripherals (for example, LIN, UART, SPI, I2C..."

For my application I need to implement 2x I2C Master Controllers, 1x partial SPI Controller (MOSI, CLK, SS), and 1x UART (TX & RX). I additionally need pin 24 for the SWO functionality. From what I see in "Table 4. Digital Peripheral Capabilities", there appear to be 4x groups of pins that are capable of UART/I2C/SPI. Unfortunately using SWO (pin 24) stomps on one of those blocks and removes an UART RX, SPI MOSI, and I2C SCL from being accessible.

Given my current wiring layout I've implemented the UART, SPI, and only 1x of the I2C controllers using the SCBs. I do still have spare SCBs available and general purpose pins. However I don't have enough SCB-dedicated pins. From what I understand SCB pins are hardwired and cannot be rerouted to general purpose pins.

In light of what the aforementioned document claimed, I'm looking for instructions on how I can implement the remaining I2C Master controller with an available UDB block. Can anyone point me in the right direction of how to accomplish this?

I've read posts from over a year ago saying that PSoC 6 / Creator 4.2 Beta weren't quite ready to have UDB-based communication modules ready.

Re: No UDB-Components for PSoC6

Re: How to use PSoC6 UDB in Creator4.2?

I've also seen that there appears to be a process for forcing compatibility of UDB-implementation of I2S to work with PSoC 6:

Import UDB-based I2S Component in a PSoC 6 MCU Project (PSoC Creator) – KBA229971

So with that said, could anyone point me in the right direction to either get an I2C or UART-RX Controller implemented with UDB(s), or magically reroute dedicated-pin SCBs signals to other pins?

Cheers,

Timothy

0 Likes
1 Solution
Vison_Zhang
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 250 sign-ins

Some one have ever transplant UDB based I2C,PWM and UART component for PSoC6, please refer

https://forum.onethinx.com/t/how-to-use-udb-components-on-psoc6/365

If you need UDB based SPI Master and Slave component, please refer my attachment file.

View solution in original post

14 Replies
RodolfoGL
Employee
Employee
250 solutions authored 250 sign-ins 5 comments on KBA

The UDB I2C is already available in PSoC Creator. If you are not seeing in the catalog, go to Tools > Find New Components. It will download the latest components created for PSoC Creator.

0 Likes

Thanks for the quick feedback. I believe I followed what you suggested but to no avail:

When looking at the Component Catalog under Communications\I2C I see:

Component Catalog.png

When I clicked Tools\Find New Components there weren't any listings for the PSoC 63 when Show only newer was checked. When I unchecked it only older versions of Emulated EEPROM and Scanning SAR ADC showed up.

Installer-only newer.png

Installer - older too.png

I checked the other PSoC 6x options and didn't see anything for the I2C UDB. When I looked at the All [families] option up top, and Show only newer option checked, I only saw two options for newer BLE modules. When I uncheck that option then I can find the generic I2C [v3.30] option. However selecting it and installing it didn't visibly change anything in the Component Catalog.

I would assume that this means that the generic I2C component is already installed, however the UDB version of it is being considered incompatible with the PSoC 6x series.

What do you think?

0 Likes

I'm sorry. I was looking the catalog for PSoC 5 project.

Perhaps someone in the community port the I2C and UART components to PSoC 6.

0 Likes

I wouldn't have expected that porting existing components to PSoC 6 would be exceptionally hard, since I thought the UDBs were fairly similar between PSoC 4/5/6. And that one post seemed to be saying that the UDB-I2S component could be forced into being compatible with some manipulation. Thank you for your suggestion.

Here's hoping someone else also has insight into this issue.

0 Likes

Timothy,

If you properly installed PSoC Creator 4.3, the PSoC6 components should be immediately available including the PDL SCB (Serial Communication Block)

pastedImage_0.png

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes

Hey there LePo,

1) The SCB objects are accessible, and I've put them into my design. However I need an additional I2C interface that the SCBs cannot provide.

2) When I look at a TopDesign for a PSoC 5 target I can see both SCB & UDB peripherals in the catalog:

Screen Shot 2020-07-19 at 12.25.26 PM.png

However once my target is a PSoC 6, then they disappear:

Screen Shot 2020-07-19 at 12.24.05 PM.png

I've looked into the I2C files and seen that PSoC 6 is specifically marked as not compatible, unlike PSoC 4/5.

Cheers,

Timothy

0 Likes

Timothy,

For the PSoC6 you want to select the I2C (SCB) component.

pastedImage_0.png

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes

Hi LePo,

I have already used the SCBs for my other digital interfaces. I need one more I2C interface but do not have SCB pins available for it.

The remaining I2C interface must be created with a UDB.

~Timothy

0 Likes
Vison_Zhang
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 250 sign-ins

Some one have ever transplant UDB based I2C,PWM and UART component for PSoC6, please refer

https://forum.onethinx.com/t/how-to-use-udb-components-on-psoc6/365

If you need UDB based SPI Master and Slave component, please refer my attachment file.

Thanks! I will try this shortly and see if it works for my hardware

0 Likes

I was able to implement the Onethinx I2C-UDB module and successfully use it to talk to an I2C peripheral. Thank you for pointing me to this answer!

Do you know why Cypress/Infineon doesn't appear to have their own peripherals ported over? Even just validating and backing the Onethinx designs could be useful for the community.

Cheers,

Timothy

I don't know why, but no official version P6 UDB I2C component available. If you do not want to use the lib shared by enthusiast, i also transplanted the UDB I2C Master and Salve component from P3/5 to P6 platform. When I transplant it, only some include header file name and interrupt function name are changed to compatible with P6,no any change to functional source code, so I think it is safe but it is also not fully tested by official process.

Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Timothy,

Is the SWO pin being used for production in your design?

Len

Len
"Engineering is an Art. The Art of Compromise."
0 Likes

Yes, for the foreseeable future.

0 Likes