From 7d211456415a158aea5ff140eabe8ccc850d42e3 Mon Sep 17 00:00:00 2001 From: ligenxxxx <59721724+ligenxxxx@users.noreply.github.com> Date: Wed, 31 Jul 2024 16:08:50 +0800 Subject: [PATCH] rf_calib adapts to multiple partitions --- src/rom.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/rom.c b/src/rom.c index 23ba178b..a73f1a1e 100644 --- a/src/rom.c +++ b/src/rom.c @@ -39,6 +39,8 @@ void CalibProc() { DM6300_SetPower(RF_POWER, RF_FREQ, pwr_offset); I2C_Write8_Wait(10, ADDR_EEPROM, RF_FREQ * (POWER_MAX + 1) + RF_POWER, table_power[RF_FREQ][RF_POWER]); + I2C_Write8_Wait(10, ADDR_EEPROM, EEP_ADDR_TAB2 + RF_FREQ * (POWER_MAX + 1) + RF_POWER, table_power[RF_FREQ][RF_POWER]); + I2C_Write8_Wait(10, ADDR_EEPROM, EEP_ADDR_TAB3 + RF_FREQ * (POWER_MAX + 1) + RF_POWER, table_power[RF_FREQ][RF_POWER]); break; case 'c': @@ -120,6 +122,16 @@ void CalibProc() { I2C_Write8_Wait(10, ADDR_EEPROM, EEP_ADDR_DCOC_IL, rxbuf[3]); I2C_Write8_Wait(10, ADDR_EEPROM, EEP_ADDR_DCOC_QH, rxbuf[4]); I2C_Write8_Wait(10, ADDR_EEPROM, EEP_ADDR_DCOC_QL, rxbuf[5]); + I2C_Write8_Wait(10, ADDR_EEPROM, EEP_ADDR_DCOC2 + EEP_ADDR_DCOC_EN, 0x00); + I2C_Write8_Wait(10, ADDR_EEPROM, EEP_ADDR_DCOC2 + EEP_ADDR_DCOC_IH, rxbuf[2]); + I2C_Write8_Wait(10, ADDR_EEPROM, EEP_ADDR_DCOC2 + EEP_ADDR_DCOC_IL, rxbuf[3]); + I2C_Write8_Wait(10, ADDR_EEPROM, EEP_ADDR_DCOC2 + EEP_ADDR_DCOC_QH, rxbuf[4]); + I2C_Write8_Wait(10, ADDR_EEPROM, EEP_ADDR_DCOC2 + EEP_ADDR_DCOC_QL, rxbuf[5]); + I2C_Write8_Wait(10, ADDR_EEPROM, EEP_ADDR_DCOC3 + EEP_ADDR_DCOC_EN, 0x00); + I2C_Write8_Wait(10, ADDR_EEPROM, EEP_ADDR_DCOC3 + EEP_ADDR_DCOC_IH, rxbuf[2]); + I2C_Write8_Wait(10, ADDR_EEPROM, EEP_ADDR_DCOC3 + EEP_ADDR_DCOC_IL, rxbuf[3]); + I2C_Write8_Wait(10, ADDR_EEPROM, EEP_ADDR_DCOC3 + EEP_ADDR_DCOC_QH, rxbuf[4]); + I2C_Write8_Wait(10, ADDR_EEPROM, EEP_ADDR_DCOC3 + EEP_ADDR_DCOC_QL, rxbuf[5]); break; } break;