- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Is there a API or some way to change I2C master component data rate programmatically? We have one I2C master component, that connects to two I2C slave, with one slave needs 400k data rage, another I2C slave needs 50k data rate. How to use one I2C master to deal with this case?
Thanks,
Winston
Solved! Go to Solution.
- Labels:
-
PSOC5 LP MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Winston,
Is there a API or some way to change I2C master component data rate programmatically?
Theoretically: Yes.
Note the following schematic using a I2C Master (UDB) component:
Clock_1 frequency can be altered programmatically (on-the-fly) by changing the Divider value
Clock_1_SetDividerValue(new_value);
Therefore it is possible.
However, the practical problem you may have is that the slower I2C slave (@50K) may not process the I2C communication at the higher rate (@ 400K) when you are trying to communicate with the higher speed slave.
The worst-case event is that the slower slave will misinterpret command info at the higher data rate and get "confused".
The general practice for using one Master with multiple slaves at different data rates is to default to the lowest data rate.
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @yaga_3967241 ,
You have to change the Fscb and high and low oversample correctly.
You can also use unconfigured SCB mode and playaround with clock settings
You can refer to the below link, Interface data rate configuration in page6
https://www.cypress.com/file/408071/download
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Winston,
Is there a API or some way to change I2C master component data rate programmatically?
Theoretically: Yes.
Note the following schematic using a I2C Master (UDB) component:
Clock_1 frequency can be altered programmatically (on-the-fly) by changing the Divider value
Clock_1_SetDividerValue(new_value);
Therefore it is possible.
However, the practical problem you may have is that the slower I2C slave (@50K) may not process the I2C communication at the higher rate (@ 400K) when you are trying to communicate with the higher speed slave.
The worst-case event is that the slower slave will misinterpret command info at the higher data rate and get "confused".
The general practice for using one Master with multiple slaves at different data rates is to default to the lowest data rate.
"Engineering is an Art. The Art of Compromise."