[samr21] Set RF state to OT_RADIO_STATE_RECEIVE on tx finished (#3491)

OT doesn't always call otPlatRadioReceive to set rx state explicitly. It
causes RF is in wrong state in some cases. SAMR21 RF is switched to
rx state internally when tx is finished and OT platform radio state should
be updated accordingly. This fix is set sState to OT_RADIO_STATE_RECEIVE
when tx is done.

Signed-off-by: Oleksandr Grytsov <[email protected]>
This commit is contained in:
Oleksandr Grytsov
2019-02-04 18:24:37 -08:00
committed by Jonathan Hui
parent f304177726
commit cf7b57a5cf
+1 -1
View File
@@ -247,9 +247,9 @@ static void handleTx(void)
if (sTxDone)
{
sTxDone = false;
sState = OT_RADIO_STATE_RECEIVE;
#if OPENTHREAD_ENABLE_DIAG
if (otPlatDiagModeGet())
{
otPlatDiagRadioTransmitDone(sInstance, &sTransmitFrame, sTxStatus);