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.

what is the different of ZMacInit() and MAC_Init() function



Dear Support:

Nowadays, we do a test about the high temperature environment.

we found in the high temperature above 95 ℃, the init time of the zstack of v1.2.2a will be 80ms, but if it in the normal temperature it is only 35ms.

and the current consuming is very important for us.

So we check the source code and found if I used function MAC_Init() to replace ZMacInit() and the init time is keep in 35ms.

and what I want to know is what the function ZMacInit() do can changed the executing time between the different temperature.

I found the ZMacInit() function call MAC_Init(); and MAC_InitDevice();

can you show me what will be the answer for this problem?

  • Hi,

    The ZMac API is an abstraction of the high-level MAC API, it is meant to be used on the application side instead of using the MAC APIs on the application side directly. The execution times are different because ZMacInit() contains more code than MAC_Init(), as you mentioned ZMacInit() makes a call to MAC_Init() as well as other functions.

    I would recommend against using MAC APIs directly in your application, that is why the ZMac API exists.

    As far as temperature affecting execution time, my guess is that it has something to do with the clock frequency changing with temperature.