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

PSoC™ 4 Forum Discussions

PrRe_3492461
Level 4
Level 4
50 sign-ins 50 replies posted 25 replies posted

Hello all,

Posting this after the response from below query:

https://community.infineon.com/t5/USB-EZ-PD-Type-C/Runtime-Configuration-of-CCG3PA-from-I2C-Multimas...

I have a requirement to change the i2c configuration of ccg3pa in runtime ie., from I2C Multi-Master configuration to I2C slave.

From PSOC4 Serial Communication Block(SCB) document,

void SCB_I2CInit(SCB_I2C_INIT_STRUCT *config) description as in Image 1 says that this function is intended specifically for "Unconfigured SCB " in customizer as in Image 2,

So if I use "I2C" block instead of "Unconfigured SCB", how would I re-configure I2C from multi-master to slave mode in runtime ? Is it possible ?

And Even though if I use "Unconfigured SCB " in customizer, I'm unable to Configure I2C SCL and SDA lines to my required pins in .cydwr file as in Image 3. I want to configure SCL SDA lines to 12 and  pins but only 2,5,7,8 pins are only available to configure. Why ? Any dependecny with pin muxing ? How to overcome ?

Image 1:

 

PrRe_3492461_0-1669875961237.png

 

 

Image 2:

PrRe_3492461_1-1669875961253.png

 

 

Image 3:

PrRe_3492461_2-1669875961589.png

 

 

PrRe_3492461_3-1669875961377.png

Below Image4 is from ccg3pa datasheet, it says pins 1,2 and 7,8 and 12,13 can be used for SCB (I2C) component. Correct me if I'm wrong here.

And in my custom design I'm using pins 12 and 13 for I2C communications, so I want to make use of that pins itself and re-configure i2c as Multi-Master and Slave in runtime.

But as per below Image5 and Image6, I'm unable to allocate pins 12 and 13 for SCB block, they're not even visible in the dropdown selection itself. Can you please help me out here, Am I missing something here ?

Image 4:

 

 

 

Image 5:

PrRe_3492461_4-1669875961237.png

 

 

 

Image 6:

 

PrRe_3492461_5-1669875961230.png

 

 

Thanks in advance,

Regards,

Pranay

0 Likes
4 Replies
SuSh_1535366
Level 5
Level 5
50 questions asked 50 replies posted 50 sign-ins

Hello Pranay,

Couldn't the functionality you require be achieved by placing the SCB component as I2C and using it in Multi-Master-Slave mode?

SuSh_1535366_0-1669879588591.png

The above configuration should not cause any errors in the hardware configuration.

SuSh_1535366_1-1669879718986.png

 

Regards,

Shimamura

0 Likes

Shimamura,

Yes, pin12/13 could be route to SCB component only if the SCB component is pre-configured as I2C. If SCB component is configured as 'Unconfigured SCB' in customizer, the pin12/13 could not be routed.

In code example 'SCB_UnconfiguredComm', it's easy to switch between modes using API Comm_I2CInit(), but this API could be available only the component configured as 'Unconfigured SCB'.

 

So how could the customer implement

1. route pin12/13 to as I2C pins   as well as

2. switch I2C mode between Multi-master and slave at running time?

To use I2C component is also fine to customer. If we have related code or API to achieve this?

 

Thanks, Fred

0 Likes

Hi Shimamura/Fred,

 

Any updates so far to achieve this requirement.

 

Thanks and regards,

Pranay.

0 Likes
Wang_Fred
Moderator
Moderator
Moderator
100 replies posted 10 likes received 25 solutions authored

There is a workaround for this issue, mentioned in this thread - https://community.infineon.com/t5/USB-EZ-PD-Type-C/Runtime-Configuration-of-CCG3PA-from-I2C-Multimas...

We can discuss further if necessary under that thread.

0 Likes