PCA9547 I2C mux support #163

Closed
opened 2022-01-31 13:33:48 +08:00 by sb10q · 2 comments

Due to the global chip shortage, TCA9548/PCA9548 is unavailable and the ones we sourced through unofficial channels are completely broken. PCA9547 is a possible substitute and has been validated on a prototype.

Only significant difference between the chips:

Original PCA9548:
image

Substitute PCA9547:
image

The chip can be auto-detected in zynq-rs I2c::init by pulsing I2C_SW_RESET and then reading the value of the control register.

Due to the global chip shortage, TCA9548/PCA9548 is unavailable and the ones we sourced through unofficial channels are completely broken. PCA9547 is a possible substitute and has been validated on a prototype. Only significant difference between the chips: Original PCA9548: ![image](/attachments/5e7f6e6d-27bb-42e7-b257-5cb54210d69f) Substitute PCA9547: ![image](/attachments/d0c07ab5-31fa-4758-ae89-7e9cb4d3bad6) The chip can be auto-detected in zynq-rs ``I2c::init`` by pulsing I2C_SW_RESET and then reading the value of the control register.
mwojcik was assigned by sb10q 2022-01-31 13:33:48 +08:00
Poster
Owner

quick hack to get ARTIQ to run on the boards with PCA9547:

diff --git a/src/libboard_artiq/src/si5324.rs b/src/libboard_artiq/src/si5324.rs
index c083fae..61ea5eb 100644
--- a/src/libboard_artiq/src/si5324.rs
+++ b/src/libboard_artiq/src/si5324.rs
@@ -189,7 +189,7 @@ fn init(i2c: &mut I2c, timer: &mut GlobalTimer) -> Result<()> {
     #[cfg(feature = "target_kasli_soc")]
     {
         i2c.pca9548_select(0x70, 0)?;
-        i2c.pca9548_select(0x71, 1 << 3)?;
+        i2c.pca9548_select(0x71, 8 | 3)?;
     }
     #[cfg(feature = "target_zc706")]
     {

quick hack to get ARTIQ to run on the boards with PCA9547: ``` diff --git a/src/libboard_artiq/src/si5324.rs b/src/libboard_artiq/src/si5324.rs index c083fae..61ea5eb 100644 --- a/src/libboard_artiq/src/si5324.rs +++ b/src/libboard_artiq/src/si5324.rs @@ -189,7 +189,7 @@ fn init(i2c: &mut I2c, timer: &mut GlobalTimer) -> Result<()> { #[cfg(feature = "target_kasli_soc")] { i2c.pca9548_select(0x70, 0)?; - i2c.pca9548_select(0x71, 1 << 3)?; + i2c.pca9548_select(0x71, 8 | 3)?; } #[cfg(feature = "target_zc706")] { ```
Poster
Owner

done

done
sb10q closed this issue 2022-02-11 15:04:03 +08:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/artiq-zynq#163
There is no content yet.