Skip to content

Commit bc5d089

Browse files
committed
Fixed certification FPort224DisableReq command NVM handling
1 parent 76a2acc commit bc5d089

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/mac/LoRaMac.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1689,14 +1689,19 @@ void LoRaMacProcess( void )
16891689
}
16901690
LoRaMacHandleRequestEvents( );
16911691
LoRaMacHandleScheduleUplinkEvent( );
1692-
LoRaMacHandleNvm( &Nvm );
16931692
LoRaMacEnableRequests( LORAMAC_REQUEST_HANDLING_ON );
1693+
MacCtx.MacFlags.Bits.NvmHandle = 1;
16941694
}
16951695
LoRaMacHandleIndicationEvents( );
16961696
if( MacCtx.RxSlot == RX_SLOT_WIN_CLASS_C )
16971697
{
16981698
OpenContinuousRxCWindow( );
16991699
}
1700+
if( MacCtx.MacFlags.Bits.NvmHandle == 1 )
1701+
{
1702+
MacCtx.MacFlags.Bits.NvmHandle = 0;
1703+
LoRaMacHandleNvm( &Nvm );
1704+
}
17001705
}
17011706

17021707
static void OnTxDelayedTimerEvent( void* context )
@@ -4369,6 +4374,12 @@ LoRaMacStatus_t LoRaMacMibSetRequestConfirm( MibRequestConfirm_t* mibSet )
43694374
break;
43704375
}
43714376
}
4377+
4378+
if( status == LORAMAC_STATUS_OK )
4379+
{
4380+
// Handle NVM potential changes
4381+
MacCtx.MacFlags.Bits.NvmHandle = 1;
4382+
}
43724383
return status;
43734384
}
43744385

src/mac/LoRaMac.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,10 @@ typedef union eLoRaMacFlags_t
500500
* MAC cycle done
501501
*/
502502
uint8_t MacDone : 1;
503+
/*!
504+
* Indicate if a NVM handling is required
505+
*/
506+
uint8_t NvmHandle : 1;
503507
}Bits;
504508
}LoRaMacFlags_t;
505509

0 commit comments

Comments
 (0)