sinara-hw / Sayma_AMC

AMC FPGA carrier board with FMC, dual SFP and RTM
8 stars 6 forks source link

BaseMod RF, output amplitude inconsistent #142

Closed jbqubit closed 4 years ago

jbqubit commented 4 years ago

Issue raised on call with Creotech on 12/18. "RF output has correct frequency but every second channel has 2x amplitude." @marmeladapk says this might be due to error in BaseMod configuration.

@sbourdeauducq Has M-Labs written a driver for BaseMod yet? I gather Cretoech would appreciate using your driver as a reference design.

gkasprow commented 4 years ago

Unitinialised attenuators often setup in a random way, I noticed it on Urukul.

marmeladapk commented 4 years ago

@jbqubit It not an error per se in configuration, it's just lack of configuration ;)

marmeladapk commented 4 years ago

@atcher0 fixed it yesterday before we had a chance to tell him that it's not needed.

sbourdeauducq commented 4 years ago

FWIW, the HMC542 datasheet says that reset held low "clears the shift register". I do not know if reset affects the latch (I suppose we have to measure that ourselves, as is often the case when using anything from HMC) and thus if a pull-down resistor on reset would help with this minor wrinkle.

sbourdeauducq commented 4 years ago

The schematic says it does not affect the latch: image

So it would be pull-down on reset and pull-up on LE.

gkasprow commented 4 years ago

Yes, but first, someone must toggle the reset line :)

sbourdeauducq commented 4 years ago

According to the datasheet, reset is level-sensitive. But we would have that problem with the latch signal, yes (which is rising edge sensitive). image

sbourdeauducq commented 4 years ago

So if we really care about this, we need some complicated power-up sequencing of LE and reset pullup/pulldowns. HMC design strikes again... But since there are also RF switches on our PCB, it doesn't really matter.

sbourdeauducq commented 4 years ago

And it's not a "latch" but a D flip-flop...

sbourdeauducq commented 4 years ago

@sbourdeauducq Has M-Labs written a driver for BaseMod yet? I gather Cretoech would appreciate using your driver as a reference design.

Yes and it seems to work - at least I can read back the values. See the latest commits in the ARTIQ repos.