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.

AM2431: About the tick used in LWIP

Part Number: AM2431

Tool/software:

The SDK i use is mcu_plus_sdk_am243x_08_03_00_18

I would like to ask whether it is necessary to set the current tick to 1ms when using LWIP?

The phenomenon in my project is that when the tick is set to 10ms, various polling times in LWIP seem to have increased.

For example, the following polling .

static int LWIPIF_LWIP_start(struct netif *netif)

{

ClockP_Params_init(&clkPrms);
clkPrms.start = 0;
clkPrms.period = ENETLWIPAPP_POLL_PERIOD;(#define ENETLWIPAPP_POLL_PERIOD      500)
clkPrms.args = &hLwip2Enet->pollLinkSemObj;
clkPrms.callback = &LWIPIF_LWIP_postPollLink;
clkPrms.timeout = ENETLWIPAPP_POLL_PERIOD;

/* Creating timer and setting timer callback function*/
status = ClockP_construct(&hLwip2Enet->pollLinkClkObj,
&clkPrms);

}

This polling is used to detect the link status. Currently, my tick is 10ms, so the polling cycle here becomes 5s.

My question is:

  1. if I want to use LWIP, do I need to set the current tick to 1ms?

  2. If I set the tick to 10ms, how should I adjust the polling interval for the related polling operations?

  • Hi ,

    Thanks for your query.

    mcu_plus_sdk_am243x_08_03_00_18

    Any specific reason for using old SDK?

    The phenomenon in my project is that when the tick is set to 10ms, various polling times in LWIP seem to have increased

    Can you try with "tick to 1ms" and "#define ENETLWIPAPP_POLL_PERIOD      5000" and let me know if you notice same behavior ?

    If I set the tick to 10ms, how should I adjust the polling interval for the related polling operations?

    I will check on this and get back to you.

    Regards

    Ashwani

  • HI Ashwani,

    Thank you for your reply.

    Any specific reason for using old SDK?
    >Yes, it is a requirement of our company.

    Can you try with "tick to 1ms" and "#define ENETLWIPAPP_POLL_PERIOD      5000" and let me know if you notice same behavior ?

    >I tried tick=1ms, ENETLWIPAPP_POLL_PERIOD=5000, and the same behavior occurred.

  • >Yes, it is a requirement of our company.

    If this a new project, I would suggest to use latest SDK baseline AM243x MCU+ SDK: Ethernet And Networking

    >I tried tick=1ms, ENETLWIPAPP_POLL_PERIOD=5000, and the same behavior occurred.

    I will check on my setup (which is latest baseline) and update you.

    I tried tick=1ms,

    Forget to ask.... which tick you are mentioning about is it dma poll or enet polling tick?

    various polling times in LWIP seem to have increased.

    Can you provide more details here?

    when the tick is set to 10ms

    Can you share the code changes (location) for this?

    Regards

    Ashwani