File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff 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
17021707static 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments