[efr32] fix assert triggered in otPlatRadioTransmit (#3768) (#4060)

* Removed assert if RAIL_StartTx() fails. It will report the error and continue

* Updated Makefile.am to fix missing header and prettified radio.c

* Added OPENTHREAD_CONFIG_NCP_UART_ENABLE to efr32mg12 config
This commit is contained in:
Marven Gilhespie
2019-08-06 17:32:24 +01:00
committed by Jonathan Hui
parent 28a9620758
commit 6ebc517408
4 changed files with 27 additions and 6 deletions
+9 -3
View File
@@ -538,9 +538,15 @@ otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame)
status = RAIL_StartTx(gRailHandle, aFrame->mChannel, txOptions, NULL);
}
assert(status == RAIL_STATUS_NO_ERROR);
otPlatRadioTxStarted(aInstance, aFrame);
if (status == RAIL_STATUS_NO_ERROR)
{
otPlatRadioTxStarted(aInstance, aFrame);
}
else
{
sTransmitError = OT_ERROR_CHANNEL_ACCESS_FAILURE;
sTransmitBusy = false;
}
exit:
return error;
@@ -140,4 +140,12 @@
*/
#define RADIO_CONFIG_SRC_MATCH_EXT_ENTRY_NUM 6
/**
* @def OPENTHREAD_CONFIG_NCP_UART_ENABLE
*
* Define to 1 to enable NCP UART support.
*
*/
#define OPENTHREAD_CONFIG_NCP_UART_ENABLE 1
#endif // OPENTHREAD_CORE_EFR32_CONFIG_H_
+9 -3
View File
@@ -514,9 +514,15 @@ otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame)
status = RAIL_StartTx(sTxBandConfig->mRailHandle, aFrame->mChannel, txOptions, &schedulerInfo);
}
assert(status == RAIL_STATUS_NO_ERROR);
otPlatRadioTxStarted(aInstance, aFrame);
if (status == RAIL_STATUS_NO_ERROR)
{
otPlatRadioTxStarted(aInstance, aFrame);
}
else
{
sTransmitError = OT_ERROR_CHANNEL_ACCESS_FAILURE;
sTransmitBusy = false;
}
exit:
return error;
+1
View File
@@ -61,6 +61,7 @@ COMMONCPPFLAGS
-D__STARTUP_CLEAR_BSS \
-I$(srcdir) \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/core \
-I$(top_srcdir)/third_party/silabs/rail_config \
-I$(top_srcdir)/examples/platforms/efr32mg21/$(EFR32_BOARD_DIR) \
-I$(EFR32MG_SDK_SRCDIR) \