enjoy-digital / thunderscope

LiteX based FPGA gateware for Thunderscope.
19 stars 3 forks source link

Add LMK61E2 datasheet to repo and I2C core/simple test over JTAGBone. #9

Closed enjoy-digital closed 2 years ago

enjoy-digital commented 2 years ago

The LMK61E2 is a programmable oscillator and is used to generate the HMCAD1511 sampling clock. Let's first do a simple unit-test over JTAGBone and verify outputs with a scope.

The configuration used in the official repository can be found at: https://github.com/EEVengers/ThunderScope/blob/master/Software/libthunderscope/thunderscopehw/thunderscopehw_pll.c

AleksaBjelogrlic commented 2 years ago

An array of configuration bytes is here, it also shows the structure of packets sent to the chip via I2C: https://github.com/EEVengers/ThunderScope/blob/master/Software/libthunderscope/thunderscopehw/thunderscopehw_pll.c

enjoy-digital commented 2 years ago

LMK61E2 config added with https://github.com/enjoy-digital/thunderscope/commit/af20c482cfcecab8ec55361eada005f0e5068357, Clock generation needs to be verified.

enjoy-digital commented 2 years ago

Configuration seems to be correct (measured indirectly from data source of the ADC core). The I2C configuration (over LiteX-Server + BitBanging) needs to be improved since we can see retries on register writes, ex:

image (One point = one retry).

enjoy-digital commented 2 years ago

Done, there are a lot less retries when doing the I2C BitBanging over PCIeBone directly.