- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all,
Posting this after the response from below query:
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,
Regards,
Pranay
- Labels:
-
PSoC 4 MCU
- Tags:
- ccg3pa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
The above configuration should not cause any errors in the hardware configuration.
Regards,
Shimamura
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Shimamura/Fred,
Any updates so far to achieve this requirement.
Thanks and regards,
Pranay.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.