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

USB EZ-PD™ Type-C Forum Discussions

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

Hello all,

Based on the reply from below link raising this query again in PSOC4 category:

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-1669801527615.png

 

Image 2:

PrRe_3492461_1-1669801527485.png

 

Image 3:

PrRe_3492461_2-1669801527604.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:

PrRe_3492461_4-1669801643879.png

 

Image 5:

PrRe_3492461_5-1669801643398.png

 

 

Image 6:

 

PrRe_3492461_6-1669801642795.png

 

Thanks in advance,

@PranavaYN / @Sananya_14  Any help here ?

Regards,

Pranay

0 Likes
1 Solution

Hi Pranay,

Anyway I find a potential workaround for this issue. The current status is not able to route unconfigued SCB to pin12/13, but it's ok for SCB configure as I2C in topdesign.

Therefore we can instead route to pin12/13 in the code with SCB unconfigured.   By this way API SCB_I2CInit() could be available.

Please find the attached main.c file FYI, in which the macros and functions code to configure the pin12/13 as I2C sda/scl for CCG3PA 24pin device are existing. The component name is SCB_1, so the definitions are begun with 'SCB_1'. You can adjust the name in accordance with your component name or change your component name to SCB_1 too.

View solution in original post

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

Hello Pranay,

It looks this ticket still a duplicate of previous under  USB EZ-PD™ Type-C,  but not PSoC 4, and there is no more insight from others under this current category.

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 ?

> This issue could not be overcomed, since CCG3PA pinout resource is limited. That means unconfigured SCB can not used on CCG3PA device.

 

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.

> This is the question you can put under PSoC 4 community. Maybe it does not need to mention CCG3PA device. I believe the code for PSoC 4 can also apply to CCG3PA.

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

Thanks for correcting wang,

Do ou want me to create a new thread for this query ?

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 ?

Do you think that this can be overcomed ?

 

 

0 Likes

This is the target to post -  https://community.infineon.com/t5/PSoC-4/bd-p/psoc4

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 ?

Do you think that this can be overcomed ?

> Perhaps this is feasible. so I recommend you post a new ticket under https://community.infineon.com/t5/PSoC-4/bd-p/psoc4, PSoC 4 expertise may be able to provide you the specific code to implement switching between diffierent modes for I2C component.

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

ok thanks, this ticket can be closed now

0 Likes

Hi Pranay,

Anyway I find a potential workaround for this issue. The current status is not able to route unconfigued SCB to pin12/13, but it's ok for SCB configure as I2C in topdesign.

Therefore we can instead route to pin12/13 in the code with SCB unconfigured.   By this way API SCB_I2CInit() could be available.

Please find the attached main.c file FYI, in which the macros and functions code to configure the pin12/13 as I2C sda/scl for CCG3PA 24pin device are existing. The component name is SCB_1, so the definitions are begun with 'SCB_1'. You can adjust the name in accordance with your component name or change your component name to SCB_1 too.

0 Likes

Hi wang,

 

I will implement and test and this and get back to you

Thanks,

pranay

0 Likes