fw: dc offset correction fix

pins b7 & b6 are floating, disable re-triggering
selecting a different HPC_STOP fixes the dc offset drift
disabling and enabling rx/tx after tuning triggers the dc offset
correction
This commit is contained in:
Hoernchen
2013-06-16 19:08:59 +02:00
parent 3f6c91a5db
commit 839a1a170f
2 changed files with 10 additions and 0 deletions

View File

@ -141,6 +141,10 @@ void max2837_setup(void)
set_MAX2837_TXVGA_GAIN_MSB_SPI_EN(1);
//set_MAX2837_TXVGA_GAIN(0x3f); /* maximum attenuation */
set_MAX2837_TXVGA_GAIN(0x00); /* minimum attenuation */
set_MAX2837_VGAMUX_enable(1);
set_MAX2837_VGA_EN(1);
set_MAX2837_HPC_RXGAIN_EN(0);
set_MAX2837_HPC_STOP(MAX2837_STOP_1K);
set_MAX2837_LNAgain_SPI_EN(1);
set_MAX2837_LNAgain(MAX2837_LNAgain_MAX); /* maximum gain */
set_MAX2837_VGAgain_SPI_EN(1);

View File

@ -115,6 +115,7 @@ bool set_freq(uint32_t freq_mhz, uint32_t freq_hz)
success = true;
gpio_clear(PORT_XCVR_ENABLE, (PIN_XCVR_RXENABLE | PIN_XCVR_TXENABLE));
if(freq_mhz >= MIN_LP_FREQ_MHZ)
{
if(freq_mhz < MAX_LP_FREQ_MHZ)
@ -170,6 +171,11 @@ bool set_freq(uint32_t freq_mhz, uint32_t freq_hz)
/* Error freq_mhz too low */
success = false;
}
if(transceiver_mode == TRANSCEIVER_MODE_RX)
gpio_set(PORT_XCVR_ENABLE, PIN_XCVR_RXENABLE);
else if(transceiver_mode == TRANSCEIVER_MODE_TX)
gpio_set(PORT_XCVR_ENABLE, PIN_XCVR_TXENABLE);
freq_mhz_cache = freq_mhz;
freq_hz_cache = freq_hz;
return success;