Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I2C header wiring is incorrect #1

Closed
securelyfitz opened this issue Jun 9, 2020 · 2 comments
Closed

I2C header wiring is incorrect #1

securelyfitz opened this issue Jun 9, 2020 · 2 comments
Assignees

Comments

@securelyfitz
Copy link
Contributor

There are diodes between the SDA/SCL pins and the CK/DI/DO pins to protect JTAG and SPI from the I2C pullups.

Unfortunately these diodes prevent I2C device's response from getting back to the FT2232H - When trying to read an I2C eeprom, using the SPI header works, using the I2C header does not.

The FT2232H doesn't do real push-pull, it ties in and out wires to each pin to make it work.

  1. Since we don't support clock stretching (at least, the hardware doesn't - if that should change, separate issue), then we can remove the diode and pullup on SCL.

  2. Since we already have a dual pole switch to combine DI and DO for both I2C and SWD, we can use the second pole to switch in a pullup

  3. The remaining difference between SPI and I2C headers are CS and MISO. Some 8 pin I2C chips use those pins for address bits. AFAIK those are only checked at poweron, but i haven't tested and wouldn't be surprised if they mess with other devices. CS is unused in I2C mode, but MISO could theoretically interfere. Perhaps the I2C/SWD switch could also disconnect the spi header MISO pin with no additional hardware?

I can bluewire whatever changes we decide on to make sure they work - and perhaps also experiment with removing the SDA pullup entirely?

@securelyfitz
Copy link
Contributor Author

Test: pulling off diodes and pullups, I2C still works fine both with bare devices and in-circuit. Likely works because 1) in-circuit has pullups on the target and 2) bare device, the level shifter is sensitive enough that the 100k pullups are sufficient.

@securelyfitz
Copy link
Contributor Author

So, confirmed todo:

  1. remove i2c header
  2. remove i2c diodes and pullups
  3. rotate SPI header so even numbered pins face board edge

breaking off switch options to separate issue #5

@fharding1 fharding1 self-assigned this Jun 14, 2020
fharding1 added a commit that referenced this issue Jun 14, 2020
Test: pulling off diodes and pullups, I2C still works fine both with bare devices and in-circuit. Likely works because 1) in-circuit has pullups on the target and 2) bare device, the level shifter is sensitive enough that the 100k pullups are sufficient.

Part of #1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants