Skip to content

ABP why reset frame counter? #1053

Answered by mluis1
Tom1278 asked this question in Q&A
Feb 25, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

At stack initialization everything is reset to defaults and this is normal.

After the stack initialization one must restore the previous context from a non volatile memory.
As you can see in below code excerpt the stack is initialized by calling LoRaMacInitialization and then the NVM context is restored by calling NvmDataMgmtRestore.
It is to be noted that in case the restore function didn't succeed then the stack behaves like if it was the first time it was run.

LmHandlerErrorStatus_t LmHandlerInit( LmHandlerCallbacks_t *handlerCallbacks,
                                      LmHandlerParams_t *handlerParams )
{
    //
    uint16_t nbNvmData = 0;
    MibRequestConfirm_t mibReq;
    LmHan…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Tom1278
Comment options

Answer selected by mluis1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1052 on March 03, 2021 11:34.