1.4.2 Configuring The Host Interface Module

The Meters And More Host Interface Module Configuration is located in the component with the same name.

These configuration options are shown in the following figure:
Figure 1-14. Host Interface Configuration Options

Device Used

Figure 1-15. UART Configuration

Host Interface component requires a UART Peripheral to communicate to external device.

When the selected UART to use is connected to Host Interface, the Device Used option is automatically configured for the module.

A particular requirement of Host Interface, is that it requires an RTS signal. It is not necessarily the standard RTS pin of a Serial Device. It is any input pin of device to capture changes on it during communication (more details in the specification document from the Meters And More Alliance). The RTS pin to be used, is selected in this section, and it is important to note the comment below the option, which states that the selected pin must be configured as Interrupt pin on Pin Manager.

Custom Commands

Microchip implementation of Host Interface offers the possibility to extend the commands defined in the standard.

This offers the possibility of performing additional operations, particular to user needs, using the provided channel that Host Interface uses, with the already tested logic of the Serial link for standard commands.

Custom Commands, if enabled, are defined by means of MMHI_CommandCallbackRegister Function, where the Command Identifier is defined, and the callback function to handle reception is set.

Previous function defines ID and the callback to receive events from Host Interface. If user wants to send the command to Host Interface, MMHI_SendCommandFrame Function is used.

The configuration option just states how many Custom Commands will be later set from code, as seen on the figure:
Figure 1-16. Custom Commands enabling

If number is set to ‘0’, Custom Commands cannot be used, and functions described above are not available for user.

Manufacturer Commands

Microchip already offers an extension to the standard commands, which allows to send and receive frames at PHY layer level, through PAL Module.

If this option is enabled, PAL Module adds the PAL_MMHI_TxRequest Function so Host Interface can send frames directly at PHY level.

In the same way, the Data Indication event in PAL layer is sent to the Host Interface module, so the receiver device can propagate this event thorugh the Serial link.

This option is disabled by default when the module is added to a project.

Figure 1-17. Manufacturer Commands