diff --git a/sa_cmd.c b/sa_cmd.c index 6def7ca..17f8447 100644 --- a/sa_cmd.c +++ b/sa_cmd.c @@ -737,7 +737,12 @@ VNA_SHELL_FUNCTION(cmd_if1) return; } else { freq_t a = (freq_t)my_atoui(argv[0]); - if (a!= 0 &&( a < (DEFAULT_IF - (freq_t)80000000) || a>(DEFAULT_IF + (freq_t)80000000))) + freq_t f = DEFAULT_IF; +#ifdef TINYSA4 + if (hw_if) + f = DEFAULT_IF_PLUS; // the 1070 MHz IF of the hw_if units +#endif + if (a!= 0 &&( a < (f - (freq_t)80000000) || a>(f + (freq_t)80000000))) goto usage; config.frequency_IF1 = a; config_save(); diff --git a/si4468.c b/si4468.c index 0f57b1d..51fbe65 100644 --- a/si4468.c +++ b/si4468.c @@ -2549,7 +2549,7 @@ void SI4463_set_IF(int band) { static const uint8_t if_freq_high[6] = { 0x03, 0x03, 0x03, 0x03, 0, 0x02}; static const uint8_t if_freq_low[6] = { 0xc0, 0x60, 0x80, 0x40, 0, 0x80}; - uint8_t data3[] = { 0x11, 0x20, 0x03, 0x1b, if_freq_high[band], if_freq_low[band] }; + uint8_t data3[] = { 0x11, 0x20, 0x03, 0x1b, if_freq_high[band], if_freq_low[band], 0x00 }; // three property bytes SI4463_do_api(data3, sizeof(data3), NULL, 0); }