newaetech / sonata-pcb

Design files and associated documentation for Sonata PCB, part of the Sunburst Project
Apache License 2.0
11 stars 1 forks source link

0.2pcb/0.3pcb/0.4pcb/0.5pcb RPI Header may require on-board pull-up resistors #14

Closed alees24 closed 4 months ago

alees24 commented 5 months ago

The I2C bus to pins 3 (RPH_G2_SDA) and 5 (RPH_G3_SCL) does not have on-board pull-up resistors but with Raspberry Pi HATs it is the responsibility of the controller SoC (Sonata FPGA) to provide bus termination when these pins are used as I2C rather than GPIO. Probing the Raspberry Pi 4 when driving the Sense HAT indicates the presence of pull ups, whilst no such resistors are present on the HATs themselves.

I2C pull-up resistors are typically 1.8k to 3.3k, and whilst the weak internal pull-ups of the FPGA pins may be enabled, these offer a resistance of between 10k and 37k (calculated from the Xilinx Artix-7 datasheet).

Experimentally, on one particular board enabling the internal pull-ups is sufficient to operate in Standard-mode (100kbit/s), but the SI starts to fall apart below Fast-mode (400kbit/s). (Aside: It does function with current I2C test software, but this may be only because the bit rate is actually around 290kbit/s with the current settings calculated by the software.)

PiHatI2C_IntPullsSlow

With external pull-up resistors present (3.3k and 5.1k because they were to hand), operation up to Fast-mode Plus is possible (though, again this is a claimed 1Mbit/s, but actual measurements presently indicate 590kbit/s)

PiHatI2C_ExtPulls

The two images above show Standard-mode operation (100kbit/s) and the longer rise time - although not especially marked - can be seen.

colinoflynn commented 5 months ago

Resistors are now on the 0.6 PCB, 1.8K pull-ups. They are mounted somewhat "out of the way" to make it a little easier for someone to modify them:

image