diff --git a/cores/asr650x/device/asr6501_lrwan/radio.c b/cores/asr650x/device/asr6501_lrwan/radio.c index cd825c61..d38e4730 100644 --- a/cores/asr650x/device/asr6501_lrwan/radio.c +++ b/cores/asr650x/device/asr6501_lrwan/radio.c @@ -1120,12 +1120,11 @@ void RadioOnCadTimeoutIrq( void ) } extern void enableUart(void); -extern uint8_t dio1_ClearInterrupt(void); void RadioOnDioIrq( void ) { - IrqFired = true; - //dio1_ClearInterrupt(); - //RadioIrqProcess(); + pinMode(P4_1,INPUT); + IrqFired = true; + RadioIrqProcess(); } void RadioIrqProcess( void ) diff --git a/cores/asr650x/loramac/mac/LoRaMac.c b/cores/asr650x/loramac/mac/LoRaMac.c index eb747e7b..39e9ef83 100644 --- a/cores/asr650x/loramac/mac/LoRaMac.c +++ b/cores/asr650x/loramac/mac/LoRaMac.c @@ -1209,6 +1209,14 @@ static void OnRadioTxTimeout( void ) #endif DIO_PRINTF("Event : Tx Timeout\r\n"); + Radio.Init( &RadioEvents ); + // Random seed initialization + srand1( Radio.Random( ) ); + + PublicNetwork = true; + Radio.SetPublicNetwork(true); + Radio.Sleep( ); + if( LoRaMacDeviceClass != CLASS_C ) { Radio.Sleep( ); diff --git a/cores/asr650x/projects/PSoC4/CyLFClk.c b/cores/asr650x/projects/PSoC4/CyLFClk.c index 86a9f3fc..b362261b 100644 --- a/cores/asr650x/projects/PSoC4/CyLFClk.c +++ b/cores/asr650x/projects/PSoC4/CyLFClk.c @@ -18,7 +18,7 @@ #include "CyLFClk.h" #include "CyLib.h" - +#include "ASR_Arduino.h" #if (CY_IP_WCO && CY_IP_SRSSV2) @@ -2863,7 +2863,6 @@ cystatus CySysClkIloRestoreFactoryTrim(void) } } - /******************************************************************************* * Function Name: CySysTimerIsr ****************************************************************************//** @@ -2891,6 +2890,7 @@ cystatus CySysClkIloRestoreFactoryTrim(void) disableTimerServicedIsr &= ~CY_SYS_TIMER0_INT; if(cySysTimerCallback[CY_SYS_TIMER0] != (void *) 0) { + pinMode(P4_1,INPUT); (void)(cySysTimerCallback[CY_SYS_TIMER0])(); } } @@ -2905,6 +2905,7 @@ cystatus CySysClkIloRestoreFactoryTrim(void) disableTimerServicedIsr &= ~CY_SYS_TIMER1_INT; if(cySysTimerCallback[CY_SYS_TIMER1] != (void *) 0) { + pinMode(P4_1,INPUT); (void)(cySysTimerCallback[CY_SYS_TIMER1])(); } } @@ -2917,6 +2918,7 @@ cystatus CySysClkIloRestoreFactoryTrim(void) { if(cySysTimerCallback[CY_SYS_TIMER2] != (void *) 0) { + pinMode(P4_1,INPUT); (void)(cySysTimerCallback[CY_SYS_TIMER2])(); } } diff --git a/libraries/LoRa/src/LoRaWan_APP.cpp b/libraries/LoRa/src/LoRaWan_APP.cpp index dc8d44fe..e244c2e2 100644 --- a/libraries/LoRa/src/LoRaWan_APP.cpp +++ b/libraries/LoRa/src/LoRaWan_APP.cpp @@ -681,7 +681,7 @@ void LoRaWanClass::sleep() #endif // Process Radio IRQ - Radio.IrqProcess( ); + //Radio.IrqProcess( ); } void LoRaWanClass::setDataRateForNoADR(int8_t dataRate) {