GlasgowEmbedded / glasgow

Scots Army Knife for electronics
BSD Zero Clause License
1.92k stars 189 forks source link

Add FPGA/I2C health check after bitstream load #699

Closed whitequark closed 2 months ago

whitequark commented 2 months ago

There have been reports of issues that are suspected to be manufacturing defects related to the I2C bus, for example #688. These issues cause a failure in one of the post-configuration code paths related to the I2C bus, where it's difficult to display a good error message. This commit adds a dedicated health check register and a dedicated error message:

E: g.cli: FPGA health check failed; if you are using a newly
manufactured device, ask the vendor of the device for return and
replacement, else ask for support on community channels
whitequark commented 2 months ago

@esden Could you please check that the unit RMA'd from #688 is caught by the check I'm adding here?

esden commented 2 months ago

@esden Could you please check that the unit RMA'd from #688 is caught by the check I'm adding here?

Yeah I will test it on the two RMA units I have here.

esden commented 2 months ago

Ok, just tested this patch against the RMA units. It does indeed detect an issue with the i2c interface and prints the message. Also tested after fixing the 1.2v regulator, and it makes the message go away as expected.

whitequark commented 2 months ago

Thanks. I'll update the message once we have more confidence that it's the 1V2 regulator. Let's say after you have 5/5 recalled devices with the same issue.

esden commented 2 months ago

Sure sounds good. So far it is 3/3 boards. I will open an issue when/if we hit the 5/5 threshold.