Skip to content

Commit 0198848

Browse files
committed
STM32CubeWL: update to version 1.4.0
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 6c1e985 commit 0198848

28 files changed

Lines changed: 759 additions & 524 deletions

src/STM32CubeWL/LoRaWAN/Mac/LoRaMac.c

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,19 @@ typedef struct sLoRaMacCtx
329329
* Buffer containing the MAC layer commands
330330
*/
331331
uint8_t MacCommandsBuffer[LORA_MAC_COMMAND_MAX_LENGTH];
332+
/*
333+
* Stores the reference time at at 1st JoinReq or ReJoinReq.
334+
*
335+
* \remark Used for the BACKOFF_DC computation.
336+
*/
337+
SysTime_t TxBackoffRefTime;
338+
/*
339+
* Indicates if \ref TxBackoffRefTime must be initialized or not.
340+
* \ref TxBackoffRefTime must be initialized for 1st JoinReq or RejoinReq event.
341+
*
342+
* \remark Used for the BACKOFF_DC computation.
343+
*/
344+
bool IsFirstJoinReqTx;
332345
}LoRaMacCtx_t;
333346

334347
/*!
@@ -1076,7 +1089,7 @@ static void ProcessRadioTxDone( void )
10761089
// Update last tx done time for the current channel
10771090
txDone.Channel = MacCtx.Channel;
10781091
txDone.LastTxDoneTime = TxDoneParams.CurTime;
1079-
txDone.ElapsedTimeSinceStartUp = SysTimeSub( SysTimeGetMcuTime( ), Nvm.MacGroup2.InitializationTime );
1092+
txDone.ElapsedTimeSinceTxBackoffRefTime = SysTimeSub( SysTimeGetMcuTime( ), MacCtx.TxBackoffRefTime );
10801093
txDone.LastTxAirTime = MacCtx.TxTimeOnAir;
10811094
txDone.Joined = true;
10821095
if( Nvm.MacGroup2.NetworkActivation == ACTIVATION_TYPE_NONE )
@@ -1140,11 +1153,6 @@ static void ProcessRadioRxDone( void )
11401153
#endif /* LORAMAC_VERSION */
11411154
Mlme_t joinType = MLME_JOIN;
11421155

1143-
MW_LOG( TS_ON, VLEVEL_M, "RX: ");
1144-
for (size_t i = 0; i < RxDoneParams.Size; ++i)
1145-
MW_LOG( TS_ON, VLEVEL_M, "%02x", RxDoneParams.Payload[i]);
1146-
MW_LOG( TS_ON, VLEVEL_M, "\r\n");
1147-
11481156
#if (defined( LORAMAC_VERSION ) && (( LORAMAC_VERSION == 0x01000400 ) || ( LORAMAC_VERSION == 0x01010100 )))
11491157
LoRaMacRadioEvents.Events.RxProcessPending = 0;
11501158
#endif /* LORAMAC_VERSION */
@@ -1398,6 +1406,9 @@ static void ProcessRadioRxDone( void )
13981406
ResetMacParameters( true );
13991407
}
14001408
#endif /* LORAMAC_VERSION */
1409+
// Restarts the retransmission backoff algorithm by indicating that the next JoinReq or ReJoinReq
1410+
// is the first one.
1411+
MacCtx.IsFirstJoinReqTx = true;
14011412
}
14021413
else
14031414
{
@@ -1654,11 +1665,8 @@ static void ProcessRadioRxDone( void )
16541665

16551666
// Set the pending status
16561667
// Fix for Class C Certification test. Re-enabled part of if condition previously removed.
1657-
if( ( ( ( Nvm.MacGroup1.SrvAckRequested == true ) || ( macMsgData.FHDR.FCtrl.Bits.FPending > 0 ) ) && ( Nvm.MacGroup2.DeviceClass == CLASS_A ) )
1658-
#if (defined( LORAMAC_VERSION ) && (( LORAMAC_VERSION == 0x01000400 ) || ( LORAMAC_VERSION == 0x01010100 )))
1659-
|| ( MacCtx.McpsIndication.ResponseTimeout > 0 )
1660-
#endif /* LORAMAC_VERSION */
1661-
)
1668+
if( ( ( ( Nvm.MacGroup1.SrvAckRequested == true ) || ( macMsgData.FHDR.FCtrl.Bits.FPending > 0 ) ) && ( Nvm.MacGroup2.DeviceClass == CLASS_A ) ) ||
1669+
( MacCtx.McpsIndication.ResponseTimeout > 0 ) )
16621670
//if( ( ( Nvm.MacGroup1.SrvAckRequested == true ) || ( macMsgData.FHDR.FCtrl.Bits.FPending > 0 ) ) && ( Nvm.MacGroup2.DeviceClass == CLASS_A ) )
16631671
{
16641672
MacCtx.McpsIndication.IsUplinkTxPending = 1;
@@ -3471,6 +3479,13 @@ static LoRaMacStatus_t SendReJoinReq( JoinReqIdentifier_t joinReqType )
34713479
break;
34723480
}
34733481

3482+
if( MacCtx.IsFirstJoinReqTx == true )
3483+
{
3484+
MacCtx.IsFirstJoinReqTx = false;
3485+
// Store the current time as reference time for the retransmission backoff algorithm
3486+
MacCtx.TxBackoffRefTime = SysTimeGetMcuTime( );
3487+
}
3488+
34743489
// Schedule frame
34753490
status = ScheduleTx( allowDelayedTx );
34763491
return status;
@@ -3618,7 +3633,7 @@ static LoRaMacStatus_t ScheduleTx( bool allowDelayedTx )
36183633
nextChan.AggrTimeOff = Nvm.MacGroup1.AggregatedTimeOff;
36193634
nextChan.Datarate = Nvm.MacGroup1.ChannelsDatarate;
36203635
nextChan.DutyCycleEnabled = Nvm.MacGroup2.DutyCycleOn;
3621-
nextChan.ElapsedTimeSinceStartUp = SysTimeSub( SysTimeGetMcuTime( ), Nvm.MacGroup2.InitializationTime );
3636+
nextChan.ElapsedTimeSinceTxBackoffRefTime = SysTimeSub( SysTimeGetMcuTime( ), MacCtx.TxBackoffRefTime );
36223637
nextChan.LastAggrTx = Nvm.MacGroup1.LastTxDoneTime;
36233638
nextChan.LastTxIsJoinRequest = false;
36243639
nextChan.Joined = true;
@@ -4698,8 +4713,8 @@ LoRaMacStatus_t LoRaMacInitialization( LoRaMacPrimitives_t* primitives, LoRaMacC
46984713
TimerInit( &MacCtx.ForceRejoinReqCycleTimer, OnForceRejoinReqCycleTimerEvent );
46994714
#endif /* LORAMAC_VERSION */
47004715

4701-
// Store the current initialization time
4702-
Nvm.MacGroup2.InitializationTime = SysTimeGetMcuTime( );
4716+
// At stack initialization no JoinReq has been transmitted yet
4717+
MacCtx.IsFirstJoinReqTx = true;
47034718

47044719
#if (defined( LORAMAC_VERSION ) && (( LORAMAC_VERSION == 0x01000400 ) || ( LORAMAC_VERSION == 0x01010100 )))
47054720
// Initialize MAC radio events

src/STM32CubeWL/LoRaWAN/Mac/LoRaMacInterfaces.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,10 +1125,11 @@ typedef struct sLoRaMacNvmDataGroup2
11251125
* Aggregated duty cycle management
11261126
*/
11271127
uint16_t AggregatedDCycle;
1128-
/*!
1128+
/*!
11291129
* Stores the time at LoRaMac initialization.
1130+
* This value is no more used as defined by the LoRaWAN Specification v1.0.4.
11301131
*
1131-
* \remark Used for the BACKOFF_DC computation.
1132+
* \remark Taken in the structure only for Backward compatibility.
11321133
*/
11331134
SysTime_t InitializationTime;
11341135
/*!

src/STM32CubeWL/LoRaWAN/Mac/Region/Region.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ typedef struct sSetBandTxDoneParams
466466
/*!
467467
* Elapsed time since initialization.
468468
*/
469-
SysTime_t ElapsedTimeSinceStartUp;
469+
SysTime_t ElapsedTimeSinceTxBackoffRefTime;
470470
}SetBandTxDoneParams_t;
471471

472472
/*!
@@ -814,7 +814,7 @@ typedef struct sNextChanParams
814814
/*!
815815
* Elapsed time since the start of the node.
816816
*/
817-
SysTime_t ElapsedTimeSinceStartUp;
817+
SysTime_t ElapsedTimeSinceTxBackoffRefTime;
818818
/*!
819819
* Joined Set to true, if the last uplink was a join request
820820
*/

src/STM32CubeWL/LoRaWAN/Mac/Region/RegionAS923.c

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
*/
4444
#include "../../../SubGHz_Phy/radio.h"
4545
#include "RegionAS923.h"
46+
#include "LmHandler.h"
4647

4748
// Definitions
4849
#define CHANNELS_MASK_SIZE 1
@@ -99,7 +100,7 @@
99100
#define AS923_MIN_RF_FREQUENCY 915000000
100101
#if (defined( REGION_VERSION ) && ( REGION_VERSION == 0x02010003 ))
101102
#define AS923_MAX_RF_FREQUENCY 921000000
102-
#else
103+
#else
103104
#define AS923_MAX_RF_FREQUENCY 928000000
104105
#endif
105106

@@ -169,9 +170,6 @@
169170
#undef AS923_RX_MAX_DATARATE
170171
#define AS923_RX_MAX_DATARATE DR_5
171172

172-
#undef AS923_DEFAULT_MAX_EIRP
173-
#define AS923_DEFAULT_MAX_EIRP 13.0f
174-
175173
/*!
176174
* STD-T108 Ver1.4 does not require dwell-time enforcement when using LBT on channels 28 to 38
177175
*/
@@ -202,9 +200,6 @@
202200
#undef AS923_RX_MAX_DATARATE
203201
#define AS923_RX_MAX_DATARATE DR_5
204202

205-
#undef AS923_DEFAULT_MAX_EIRP
206-
#define AS923_DEFAULT_MAX_EIRP 13.0f
207-
208203
/*!
209204
* STD-T108 Ver1.4 does not require dwell-time enforcement when using DC on channels 28 to 38
210205
*/
@@ -217,19 +212,19 @@
217212
#undef AS923_DUTY_CYCLE_ENABLED
218213
#define AS923_DUTY_CYCLE_ENABLED 1
219214

220-
#elif ( REGION_AS923_DEFAULT_CHANNEL_PLAN == CHANNEL_PLAN_GROUP_AS923_1_JP_CH37_CH61_LBT_DC )
215+
#elif ( REGION_AS923_DEFAULT_CHANNEL_PLAN == CHANNEL_PLAN_GROUP_AS923_1_JP_CH33_CH61_LBT_DC )
221216

222217
/*
223-
* STD-T108 Ver1.4 allows the use of channels 37 to 61 with LBT and DC.
218+
* STD-T108 Ver1.4 allows the use of channels 33 to 61 with LBT and DC.
224219
* However dwell time enforcement must be enabled
225220
*/
226221

227-
// Channel plan CHANNEL_PLAN_GROUP_AS923_1_JP_CH37_CH61_LBT_DC
222+
// Channel plan CHANNEL_PLAN_GROUP_AS923_1_JP_CH33_CH61_LBT_DC
228223

229224
#define REGION_AS923_FREQ_OFFSET 0
230225

231226
/*!
232-
* Restrict AS923 frequencies to channels 37 to 61
227+
* Restrict AS923 frequencies to channels 33 to 61
233228
* Center frequencies 922.4 MHz to 928.0 MHz @ 200 kHz max bandwidth
234229
*/
235230
#define AS923_MIN_RF_FREQUENCY 922400000
@@ -241,17 +236,14 @@
241236
#undef AS923_RX_MAX_DATARATE
242237
#define AS923_RX_MAX_DATARATE DR_5
243238

244-
#undef AS923_DEFAULT_MAX_EIRP
245-
#define AS923_DEFAULT_MAX_EIRP 13.0f
246-
247239
/*!
248240
* Enable duty cycle enforcement
249241
*/
250242
#undef AS923_DUTY_CYCLE_ENABLED
251243
#define AS923_DUTY_CYCLE_ENABLED 1
252244

253245
/*!
254-
* STD-T108 Ver1.4 requires a carrier sense time of at least 128 us on channels 37 to 61
246+
* STD-T108 Ver1.4 requires a carrier sense time of at least 128 us on channels 33 to 61
255247
*/
256248
#undef AS923_CARRIER_SENSE_TIME
257249
#define AS923_CARRIER_SENSE_TIME 1
@@ -562,10 +554,10 @@ void RegionAS923SetBandTxDone( SetBandTxDoneParams_t* txDone )
562554
#if defined( REGION_AS923 )
563555
#if (defined( REGION_VERSION ) && ( REGION_VERSION == 0x01010003 ))
564556
RegionCommonSetBandTxDone( &RegionNvmGroup1->Bands[RegionNvmGroup2->Channels[txDone->Channel].Band],
565-
txDone->LastTxAirTime, txDone->Joined, txDone->ElapsedTimeSinceStartUp );
557+
txDone->LastTxAirTime, txDone->Joined, txDone->ElapsedTimeSinceTxBackoffRefTime );
566558
#elif (defined( REGION_VERSION ) && (( REGION_VERSION == 0x02010001 ) || ( REGION_VERSION == 0x02010003 )))
567559
RegionCommonSetBandTxDone( &RegionBands[RegionNvmGroup2->Channels[txDone->Channel].Band],
568-
txDone->LastTxAirTime, txDone->Joined, txDone->ElapsedTimeSinceStartUp );
560+
txDone->LastTxAirTime, txDone->Joined, txDone->ElapsedTimeSinceTxBackoffRefTime );
569561
#endif /* REGION_VERSION */
570562
#endif /* REGION_AS923 */
571563
}
@@ -617,7 +609,7 @@ void RegionAS923InitDefaults( InitDefaultsParams_t* params )
617609

618610
#if ( ( REGION_AS923_DEFAULT_CHANNEL_PLAN == CHANNEL_PLAN_GROUP_AS923_1_JP ) || \
619611
( REGION_AS923_DEFAULT_CHANNEL_PLAN == CHANNEL_PLAN_GROUP_AS923_1_JP_CH24_CH38_LBT ) || \
620-
( REGION_AS923_DEFAULT_CHANNEL_PLAN == CHANNEL_PLAN_GROUP_AS923_1_JP_CH37_CH61_LBT_DC ) )
612+
( REGION_AS923_DEFAULT_CHANNEL_PLAN == CHANNEL_PLAN_GROUP_AS923_1_JP_CH33_CH61_LBT_DC ) )
621613
RegionNvmGroup2->RssiFreeThreshold = AS923_RSSI_FREE_TH;
622614
RegionNvmGroup2->CarrierSenseTime = AS923_CARRIER_SENSE_TIME;
623615
#endif
@@ -1023,7 +1015,8 @@ uint8_t RegionAS923RxParamSetupReq( RxParamSetupReqParams_t* rxParamSetupReq )
10231015
{
10241016
uint8_t status = 0x07;
10251017
#if defined( REGION_AS923 )
1026-
1018+
int8_t datarate;
1019+
LmHandlerGetTxDatarate( &datarate );
10271020
// Verify radio frequency
10281021
if( VerifyRfFreq( rxParamSetupReq->Frequency ) == false )
10291022
{
@@ -1037,7 +1030,7 @@ uint8_t RegionAS923RxParamSetupReq( RxParamSetupReqParams_t* rxParamSetupReq )
10371030
}
10381031

10391032
// Verify datarate offset
1040-
if( RegionCommonValueInRange( rxParamSetupReq->DrOffset, AS923_MIN_RX1_DR_OFFSET, AS923_MAX_RX1_DR_OFFSET ) == false )
1033+
if( RegionCommonValueInRange( rxParamSetupReq->DrOffset, AS923_MIN_RX1_DR_OFFSET, AS923_MAX_RX1_DR_OFFSET ) && (EffectiveRx1DrOffsetDownlinkDwell0AS923[datarate][rxParamSetupReq->DrOffset]<=AS923_RX_MAX_DATARATE) == false )
10411034
{
10421035
status &= 0xFB; // Rx1DrOffset range KO
10431036
}
@@ -1181,7 +1174,7 @@ LoRaMacStatus_t RegionAS923NextChannel( NextChanParams_t* nextChanParams, uint8_
11811174
identifyChannelsParam.DutyCycleEnabled = nextChanParams->DutyCycleEnabled;
11821175
identifyChannelsParam.MaxBands = AS923_MAX_NB_BANDS;
11831176

1184-
identifyChannelsParam.ElapsedTimeSinceStartUp = nextChanParams->ElapsedTimeSinceStartUp;
1177+
identifyChannelsParam.ElapsedTimeSinceTxBackoffRefTime = nextChanParams->ElapsedTimeSinceTxBackoffRefTime;
11851178
identifyChannelsParam.LastTxIsJoinRequest = nextChanParams->LastTxIsJoinRequest;
11861179
identifyChannelsParam.ExpectedTimeOnAir = GetTimeOnAir( nextChanParams->Datarate, nextChanParams->PktLen );
11871180

@@ -1194,7 +1187,7 @@ LoRaMacStatus_t RegionAS923NextChannel( NextChanParams_t* nextChanParams, uint8_
11941187
{
11951188
#if (( REGION_AS923_DEFAULT_CHANNEL_PLAN == CHANNEL_PLAN_GROUP_AS923_1_JP ) || \
11961189
( REGION_AS923_DEFAULT_CHANNEL_PLAN == CHANNEL_PLAN_GROUP_AS923_1_JP_CH24_CH38_LBT ) || \
1197-
( REGION_AS923_DEFAULT_CHANNEL_PLAN == CHANNEL_PLAN_GROUP_AS923_1_JP_CH37_CH61_LBT_DC ) )
1190+
( REGION_AS923_DEFAULT_CHANNEL_PLAN == CHANNEL_PLAN_GROUP_AS923_1_JP_CH33_CH61_LBT_DC ) )
11981191
// Executes the LBT algorithm when operating in Japan
11991192
uint8_t channelNext = 0;
12001193

src/STM32CubeWL/LoRaWAN/Mac/Region/RegionAS923.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ extern "C"
9999
#define CHANNEL_PLAN_GROUP_AS923_1_JP_CH24_CH38_DC 6
100100

101101
/*!
102-
* Channel plan group AS923-1 for Japan - channels 37 to 61 Listen Before Talk + Duty Cycle
102+
* Channel plan group AS923-1 for Japan - channels 33 to 61 Listen Before Talk + Duty Cycle
103103
* AS923_FREQ_OFFSET = 0
104104
*/
105-
#define CHANNEL_PLAN_GROUP_AS923_1_JP_CH37_CH61_LBT_DC 7
105+
#define CHANNEL_PLAN_GROUP_AS923_1_JP_CH33_CH61_LBT_DC 7
106106
#endif
107107

108108
/*!

src/STM32CubeWL/LoRaWAN/Mac/Region/RegionAU915.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,10 @@ void RegionAU915SetBandTxDone( SetBandTxDoneParams_t* txDone )
376376
#if defined( REGION_AU915 )
377377
#if (defined( REGION_VERSION ) && ( REGION_VERSION == 0x01010003 ))
378378
RegionCommonSetBandTxDone( &RegionNvmGroup1->Bands[RegionNvmGroup2->Channels[txDone->Channel].Band],
379-
txDone->LastTxAirTime, txDone->Joined, txDone->ElapsedTimeSinceStartUp );
379+
txDone->LastTxAirTime, txDone->Joined, txDone->ElapsedTimeSinceTxBackoffRefTime );
380380
#elif (defined( REGION_VERSION ) && (( REGION_VERSION == 0x02010001 ) || ( REGION_VERSION == 0x02010003 )))
381381
RegionCommonSetBandTxDone( &RegionBands[RegionNvmGroup2->Channels[txDone->Channel].Band],
382-
txDone->LastTxAirTime, txDone->Joined, txDone->ElapsedTimeSinceStartUp );
382+
txDone->LastTxAirTime, txDone->Joined, txDone->ElapsedTimeSinceTxBackoffRefTime );
383383
#endif /* REGION_VERSION */
384384
#endif /* REGION_AU915 */
385385
}
@@ -976,7 +976,7 @@ LoRaMacStatus_t RegionAU915NextChannel( NextChanParams_t* nextChanParams, uint8_
976976
identifyChannelsParam.DutyCycleEnabled = nextChanParams->DutyCycleEnabled;
977977
identifyChannelsParam.MaxBands = AU915_MAX_NB_BANDS;
978978

979-
identifyChannelsParam.ElapsedTimeSinceStartUp = nextChanParams->ElapsedTimeSinceStartUp;
979+
identifyChannelsParam.ElapsedTimeSinceTxBackoffRefTime = nextChanParams->ElapsedTimeSinceTxBackoffRefTime;
980980
identifyChannelsParam.LastTxIsJoinRequest = nextChanParams->LastTxIsJoinRequest;
981981
identifyChannelsParam.ExpectedTimeOnAir = GetTimeOnAir( nextChanParams->Datarate, nextChanParams->PktLen );
982982

src/STM32CubeWL/LoRaWAN/Mac/Region/RegionCN470.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -663,10 +663,10 @@ void RegionCN470SetBandTxDone( SetBandTxDoneParams_t* txDone )
663663
#if defined( REGION_CN470 )
664664
#if (defined( REGION_VERSION ) && ( REGION_VERSION == 0x01010003 ))
665665
RegionCommonSetBandTxDone( &RegionNvmGroup1->Bands[RegionNvmGroup2->Channels[txDone->Channel].Band],
666-
txDone->LastTxAirTime, txDone->Joined, txDone->ElapsedTimeSinceStartUp );
666+
txDone->LastTxAirTime, txDone->Joined, txDone->ElapsedTimeSinceTxBackoffRefTime );
667667
#elif (defined( REGION_VERSION ) && (( REGION_VERSION == 0x02010001 ) || ( REGION_VERSION == 0x02010003 )))
668668
RegionCommonSetBandTxDone( &RegionBands[RegionNvmGroup2->Channels[txDone->Channel].Band],
669-
txDone->LastTxAirTime, txDone->Joined, txDone->ElapsedTimeSinceStartUp );
669+
txDone->LastTxAirTime, txDone->Joined, txDone->ElapsedTimeSinceTxBackoffRefTime );
670670
#endif /* REGION_VERSION */
671671
#endif /* REGION_CN470 */
672672
}
@@ -1321,7 +1321,7 @@ LoRaMacStatus_t RegionCN470NextChannel( NextChanParams_t* nextChanParams, uint8_
13211321
identifyChannelsParam.DutyCycleEnabled = nextChanParams->DutyCycleEnabled;
13221322
identifyChannelsParam.MaxBands = CN470_MAX_NB_BANDS;
13231323

1324-
identifyChannelsParam.ElapsedTimeSinceStartUp = nextChanParams->ElapsedTimeSinceStartUp;
1324+
identifyChannelsParam.ElapsedTimeSinceTxBackoffRefTime = nextChanParams->ElapsedTimeSinceTxBackoffRefTime;
13251325
identifyChannelsParam.LastTxIsJoinRequest = nextChanParams->LastTxIsJoinRequest;
13261326
identifyChannelsParam.ExpectedTimeOnAir = GetTimeOnAir( nextChanParams->Datarate, nextChanParams->PktLen );
13271327

src/STM32CubeWL/LoRaWAN/Mac/Region/RegionCN779.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,10 @@ void RegionCN779SetBandTxDone( SetBandTxDoneParams_t* txDone )
315315
#if defined( REGION_CN779 )
316316
#if (defined( REGION_VERSION ) && ( REGION_VERSION == 0x01010003 ))
317317
RegionCommonSetBandTxDone( &RegionNvmGroup1->Bands[RegionNvmGroup2->Channels[txDone->Channel].Band],
318-
txDone->LastTxAirTime, txDone->Joined, txDone->ElapsedTimeSinceStartUp );
318+
txDone->LastTxAirTime, txDone->Joined, txDone->ElapsedTimeSinceTxBackoffRefTime );
319319
#elif (defined( REGION_VERSION ) && (( REGION_VERSION == 0x02010001 ) || ( REGION_VERSION == 0x02010003 )))
320320
RegionCommonSetBandTxDone( &RegionBands[RegionNvmGroup2->Channels[txDone->Channel].Band],
321-
txDone->LastTxAirTime, txDone->Joined, txDone->ElapsedTimeSinceStartUp );
321+
txDone->LastTxAirTime, txDone->Joined, txDone->ElapsedTimeSinceTxBackoffRefTime );
322322
#endif /* REGION_VERSION */
323323
#endif /* REGION_CN779 */
324324
}
@@ -905,7 +905,7 @@ LoRaMacStatus_t RegionCN779NextChannel( NextChanParams_t* nextChanParams, uint8_
905905
identifyChannelsParam.DutyCycleEnabled = nextChanParams->DutyCycleEnabled;
906906
identifyChannelsParam.MaxBands = CN779_MAX_NB_BANDS;
907907

908-
identifyChannelsParam.ElapsedTimeSinceStartUp = nextChanParams->ElapsedTimeSinceStartUp;
908+
identifyChannelsParam.ElapsedTimeSinceTxBackoffRefTime = nextChanParams->ElapsedTimeSinceTxBackoffRefTime;
909909
identifyChannelsParam.LastTxIsJoinRequest = nextChanParams->LastTxIsJoinRequest;
910910
identifyChannelsParam.ExpectedTimeOnAir = GetTimeOnAir( nextChanParams->Datarate, nextChanParams->PktLen );
911911

0 commit comments

Comments
 (0)