forked from M-Labs/artiq
hmc830: compile-time configurable reference frequency
This commit is contained in:
parent
6f3ed81626
commit
d29b3dd588
|
@ -330,7 +330,13 @@ pub fn init() -> Result<(), &'static str> {
|
|||
hmc830::select_spi_mode();
|
||||
hmc830::detect()?;
|
||||
hmc830::init();
|
||||
hmc830::set_dividers(1, 24, 0, 2); // 100MHz ref, 1.2GHz out
|
||||
|
||||
// 1.2GHz out
|
||||
#[cfg(hmc830_ref = "100")]
|
||||
hmc830::set_dividers(1, 24, 0, 2);
|
||||
#[cfg(hmc830_ref = "150")]
|
||||
hmc830::set_dividers(2, 32, 0, 2);
|
||||
|
||||
hmc830::check_locked()?;
|
||||
|
||||
hmc7043::enable();
|
||||
|
|
|
@ -204,6 +204,8 @@ class Standalone(MiniSoC, AMPSoC):
|
|||
self.submodules += serwb_core
|
||||
self.add_wb_slave(self.mem_map["serwb"], 8192, serwb_core.etherbone.wishbone.bus)
|
||||
|
||||
self.config["HMC830_REF"] = "100"
|
||||
|
||||
# RTIO
|
||||
rtio_channels = []
|
||||
for i in range(4):
|
||||
|
|
Loading…
Reference in New Issue