forked from M-Labs/artiq
1
0
Fork 0

firmware: add register dump on HMC830 lock timeout.

This commit is contained in:
hartytp 2018-01-20 00:19:31 +00:00 committed by whitequark
parent 934bc53cb5
commit 37fa3b29da
1 changed files with 7 additions and 0 deletions

View File

@ -107,6 +107,13 @@ mod hmc830 {
info!("waiting for lock..."); info!("waiting for lock...");
while read(0x12) & 0x02 == 0 { while read(0x12) & 0x02 == 0 {
if clock::get_ms() > t + 2000 { if clock::get_ms() > t + 2000 {
error!("lock timeout");
info!("register dump:");
for addr in 0x00..0x14 {
// These registers don't exist (in the data sheet at least)
if addr == 0x0d || addr == 0x0e { continue; }
info!("[0x{:02x}] = 0x{:04x}", addr, read(addr));
}
return Err("HMC830 lock timeout"); return Err("HMC830 lock timeout");
} }
} }