Fixed a bug in CYRF_FindBestChannels when trying to Clear the RX abort.

This commit is contained in:
Richard Li 2020-04-07 15:35:39 +08:00
parent 4a01e2d472
commit 4643e5fa23

View File

@ -262,7 +262,7 @@ void CYRF_FindBestChannels(uint8_t *channels, uint8_t len, uint8_t minspace, uin
delayMicroseconds(270); //slow channel require 270usec for synthesizer to settle
if( !(CYRF_ReadRegister(CYRF_05_RX_CTRL) & 0x80)) {
CYRF_WriteRegister(CYRF_05_RX_CTRL, 0x80); //Prepare to receive
delayMicroseconds(15);
delayMicroseconds(10);
CYRF_ReadRegister(CYRF_13_RSSI); //dummy read
delayMicroseconds(15); //The conversion can occur as often as once every 12us
}
@ -284,7 +284,7 @@ void CYRF_FindBestChannels(uint8_t *channels, uint8_t len, uint8_t minspace, uin
}
CYRF_WriteRegister(CYRF_29_RX_ABORT, 0x20); // Abort RX operation
CYRF_SetTxRxMode(TX_EN);
CYRF_WriteRegister(CYRF_29_RX_ABORT, 0x20); // Clear abort RX
CYRF_WriteRegister(CYRF_29_RX_ABORT, 0x00); // Clear abort RX
}
#if defined(DEVO_CYRF6936_INO) || defined(J6PRO_CYRF6936_INO)