Browse Source

further testing to re enable the communication

pull/935/head
lumapu 2 years ago
parent
commit
38d01b704d
  1. 24
      src/hms/cmt2300a.h
  2. 2
      src/hms/hmsPayload.h

24
src/hms/cmt2300a.h

@ -177,24 +177,24 @@
// LP Settings
static uint8_t cmtConfig[0x60] PROGMEM {
// 0x00 - 0x0f -- RSSI offset +- 0 and 13dBm
0x00, 0x66, 0xEC, 0x1C, 0x70, 0x80, 0x14, 0x08,
0x11, 0x02, 0x02, 0x00, 0xAE, 0xE0, 0x35, 0x00,
// 0x00 - 0x0f
0x00, 0x66, 0xEC, 0x1D, 0x70, 0x80, 0x14, 0x08,
0x91, 0x02, 0x02, 0xD0, 0xAE, 0xE0, 0x35, 0x00,
// 0x10 - 0x1f
0x00, 0xF4, 0x10, 0xE2, 0x42, 0x20, 0x0C, 0x81,
0x42, 0x32, 0xCF, 0x82, 0x42, 0x27, 0x76, 0x12, // 860MHz as default
0x42, 0x32, 0xCF, 0x82, 0x42, 0x27, 0x76, 0x12, // 0x42, 0xCF, 0xA7, 0x8C, 0x42, 0xC4, 0x4E, 0x1C,
// 0x20 - 0x2f
0xA6, 0xC9, 0x20, 0x20, 0xD2, 0x35, 0x0C, 0x0A,
0x9F, 0x4B, 0x29, 0x29, 0xC0, 0x14, 0x05, 0x53,
0x9F, 0x4B, 0x0A, 0x29, 0xC0, 0x14, 0x05, 0x53, // 0x9F, 0x4B, 0x29, 0x29, 0xC0, 0x14, 0x05, 0x53,
// 0x30 - 0x3f
0x10, 0x00, 0xB4, 0x00, 0x00, 0x01, 0x00, 0x00,
0x12, 0x1E, 0x00, 0xAA, 0x06, 0x00, 0x00, 0x00,
// 0x40 - 0x4f
0x00, 0x48, 0x5A, 0x48, 0x4D, 0x01, 0x1D, 0x00,
0x00, 0x48, 0x5A, 0x48, 0x4D, 0x01, 0x1D, 0x00, // 0x00, 0xD6, 0xD5, 0xD4, 0x2D, 0x01, 0x1D, 0x00,
0x00, 0x00, 0x00, 0x00, 0xC3, 0x00, 0x00, 0x60,
// 0x50 - 0x5f - TX 13dBm
// 0x50 - 0x5f
0xFF, 0x00, 0x00, 0x1F, 0x10, 0x70, 0x4D, 0x06,
0x00, 0x07, 0x50, 0x00, 0x42, 0x0C, 0x3F, 0x7F
0x00, 0x07, 0x50, 0x00, 0x8A, 0x18, 0x3F, 0x7F
};
@ -235,6 +235,8 @@ class Cmt2300a {
if(mInRxMode)
return CMT_SUCCESS;
DPRINTLN(DBG_INFO, "goRX");
mSpi.readReg(CMT2300A_CUS_INT1_CTL);
mSpi.writeReg(CMT2300A_CUS_INT1_CTL, CMT2300A_INT_SEL_TX_DONE);
@ -318,7 +320,7 @@ class Cmt2300a {
mSpi.writeFifo(buf, len);
if(0xff != mRqstCh) {
DPRINTLN(DBG_INFO, "switchChannel: 0x" + String(mRqstCh, HEX));
//DPRINTLN(DBG_INFO, "switchChannel: 0x" + String(mRqstCh, HEX));
mCurCh = mRqstCh;
mRqstCh = 0xff;
}
@ -348,8 +350,6 @@ class Cmt2300a {
mSpi.writeReg(i, cmtConfig[i]);
}
//uint8_t tmp = (~0x07) & mSpi.readReg(CMT2300A_CUS_CMT10);
//mSpi.writeReg(CMT2300A_CUS_CMT10, (tmp | 0x02));
mSpi.writeReg(CMT2300A_CUS_IO_SEL, 0x20); // -> GPIO3_SEL[1:0] = 0x02
@ -383,7 +383,7 @@ class Cmt2300a {
if(!cmtSwitchStatus(CMT2300A_GO_STBY, CMT2300A_STA_STBY))
return false;
switchDtuFreq(WORK_FREQ_KHZ);
//switchDtuFreq(WORK_FREQ_KHZ);
return true;
}

2
src/hms/hmsPayload.h

@ -142,7 +142,7 @@ class HmsPayload {
DPRINT(DBG_INFO, "LastRx: ");
DBGPRINTLN(String(mLastRx));
if((mLastRx + HMS_TIMEOUT_MS) < millis()) {
//mRadio->switchFrequency(&iv->radioId.u64, HOY_BOOT_FREQ_KHZ, HOY_BOOT_FREQ_KHZ + FREQ_STEP_KHZ);
//mRadio->switchFrequency(&iv->radioId.u64, 863000, WORK_FREQ_KHZ);
mRadio->switchFrequency(&iv->radioId.u64, HOY_BOOT_FREQ_KHZ, WORK_FREQ_KHZ);
mLastRx = millis() - (HMS_TIMEOUT_MS / 6);
} else {

Loading…
Cancel
Save