Forum Discussion

dpeng's avatar
dpeng
Icon for Occasional Contributor rankOccasional Contributor
2 hours ago

Cyclone V HPS I2C1 issue: no activity on bus

Board: Enclustra Mercury+ SA2 module on Enclustra ST1 baseboard

  • I enabled I2C1 in Platform Designer and selected HPS I/O Set 0: GPIO51 (SDA) and GPIO52 (SCL).
  • I generated and updated the handoff files in the Barebox bootloader.
  • I updated the devicetree in Barebox and Linux.

Devicetree addition:

&i2c1 {
 	i2c-sda-hold-time-ns = <300>;
	clock-frequency = <100000>;
	status = "okay";
 };

In Barebox, I can see the I2C1 bus, but no slave (1 expected):

barebox@Enclustra Mercury+ SA2:/ i2c_probe
probing i2c0 range 0x04-0x77: 0x57 0x5e 0x64 0x6f 0x70                                                          
probing i2c1 range 0x04-0x77:

Same results on Linux:

# i2cdetect -y -r 0                                                                                             
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f                                                             
00:          -- -- -- -- -- -- -- -- -- -- -- -- --                                                             
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                                                             
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                                                             
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                                                             
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                                                             
50: -- -- -- -- -- -- -- 57 -- -- -- -- -- -- 5e --                                                             
60: -- -- -- -- 64 -- -- -- -- -- -- -- -- -- -- 6f                                                             
70: 70 -- -- -- -- -- -- --                                                                                     
# i2cdetect -y -r 1                                                                                             
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f                                                             
00:          -- -- -- -- -- -- -- -- -- -- -- -- --                                                             
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                                                             
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                                                             
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                                                             
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                                                             
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                                                             
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                                                             
70: -- -- -- -- -- -- -- --                                                                                     

Note: I need to use the -r option because the SMBus quick command is not supported. As a consequence, not all addresses can be scanned. Message: "i2cdetect: warning: can't use SMBus quick write command, will skip some addresses".

On I2C1, 1 slave is connected at address 0x40 (INA219 current sensor). Pull-up resistors are present from the SDA and SCL lines to +3.3V.

I connected an oscilloscope on the SCL line, but I see no signal when I type the i2c_probe command.

No RepliesBe the first to reply