diff --git a/liblms7002m.c b/liblms7002m.c index 47c2cd4..018a946 100644 --- a/liblms7002m.c +++ b/liblms7002m.c @@ -1295,6 +1295,8 @@ int lms7_rbb_set_lpfx_bandwidth(struct lms7_state* st, unsigned bw) int lms7_rbb_set_bandwidth(struct lms7_state* st, unsigned bw) { int res; + if (bw < 100000) + bw = 100000; int cfb_tia_rfe = (int)(1680000000U/bw - 10); int ccomp_tia_rfe = cfb_tia_rfe/100; @@ -1349,6 +1351,14 @@ int lms7_rbb_set_pga(struct lms7_state* st, unsigned gain) return lms7_spi_post(st, REG_COUNT(regs), regs); } +int lms7_rbb_set_ext(struct lms7_state* st) +{ + uint32_t regs[] = { + MAKE_LMS7002_0x0119(1, 20, 20, 1) + }; + return lms7_spi_post(st, REG_COUNT(regs), regs); +} + /************************************************************************ * AFE configuration diff --git a/liblms7002m.h b/liblms7002m.h index 00b6989..4bc07a9 100644 --- a/liblms7002m.h +++ b/liblms7002m.h @@ -163,6 +163,7 @@ int lms7_rbb_disable(struct lms7_state* st); int lms7_rbb_set_path(struct lms7_state* st, enum rbb_path path); int lms7_rbb_set_pga(struct lms7_state* st, unsigned gain); int lms7_rbb_set_bandwidth(struct lms7_state* st, unsigned bw); +int lms7_rbb_set_ext(struct lms7_state* st); // AFE functions int lms7_afe_ctrl(struct lms7_state* st, bool rxa, bool rxb, bool txa, bool txb);