Performance Tuning

These examples and library demonstrate basic communications with the Module. As you can see, in sendMessage in zm_phy_spi.c the processor waits between sending the SREQ and receiving the SRSP. This can be approx. 400uSec. If you need to cede control to another process in that time (for example in an RTOS or similar) then you can separate sendMessage into two parts, one sending the message and the other called when the SRSP is received. This is also how the UART interface works.

In af.c the method afSendData normally performs a Synchronous Request Message and then waits to receive a AF_DATA_CONFIRM message. In this file there is an option, AF_DATA_CONFIRM_HANDLED_BY_APPLICATION, which if defined will return from the method immediately after the SRSP is received. It is then up to the application to track that AF_DATA_CONFIRM messages are received for all sent messages. This is handy to do in a more performance oriented system since it spends less time waiting on the network.