This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM4378: NDK boot time

Expert 1070 points
Part Number: AM4378

Hello,

I am using NDK_3_61_01_01 and the configuration editor (XGCONF).  Everything at this point is working.

What I do see is that it takes a while for the network to become viable.  In other words, if I try to perform a connect on the network before it is completely ready (initialized) it throws a system error and the application terminates.  If I wait several seconds, and then try to connect everything is fine.

Is there a mechanism in the NDK that tells me when I can proceed with such network activity?

Thanks for the help.

  • Hi Ler,

    Have you tried to add a hook function to get stack initialization status? You may also refer to section 4.4 Initialization Procedure in NDK API reference guide (SPRU524K).

    Regards,

    Garrett

  • Hello Garrett,

    I can add a stackInitHook function.  Any suggestions on what I can call/add within that function to verify a viable network?

    Thank you.

    LER

  • LER,

    See the NDK initialization procedure:

    6. Boot the stack with the configuration by calling NC_NetStart( hCfg, pfnStart, pfnStop, pfnNetIP ) with a
    handle to the configuration, plus pointers to the three generated functions for start, stop, and IP
    address change operations. The NC_NetStart() function does not return until the stack session has
    terminated.

    7. After some preliminary initialization, the NC_NetStart() function creates a new thread that calls the
    generated NetworkOpen() function.

    8. Run the Network Open (Global.networkOpenHook) hook function if one is configured.
    9. The NetworkOpen() function creates task threads for its networking requirements.

    So you can add a network ready status flag in the 'Network open hook' which associates to NetworkOpen() funciton, then start your application if the flag is set.

    Did you try to adjust your network task priority from the .cfg file to see if it helps?

    Regards,
    Garrett

  • Thanks Garrett.  I believe this answers my question.