- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all,
Based on the reply from below link raising this query again in PSOC4 category:
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:
Image 2:
Image 3:
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:
Image 6:
Thanks in advance,
@Pranava_YN / @Sananya_14 Any help here ?
Regards,
Pranay
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ok thanks, this ticket can be closed now
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi wang,
I will implement and test and this and get back to you
Thanks,
pranay