1.1 PHY TX Test Console

The PLC PHY Tx Test Console is an application example that demonstrates the complete performance of the Microchip Meters And More PHY Layer, avoiding timing limitations in the PC host. That way, users can perform more specific PHY tests (e.g., short time interval between consecutive frames).

The following table shows the available PHY Tx Test Console projects:

Table 1-1. PHY Tx Test Console projects
PathBoards
smartenergy_metersandmore_apps\apps\phy_apps\phy_tx_test_console\firmware\pic32cx_mtg_ek_pl460.XPIC32CXMTG-EK + PL460-EK
smartenergy_metersandmore_apps\apps\phy_apps\phy_tx_test_console\firmware\pic32cx_mtsh_db_pl460.XPIC32CXMTSH-DB + PL460-EK
smartenergy_metersandmore_apps\apps\phy_apps\phy_tx_test_console\firmware\sam_d20_xpro_pl460.X SAMD20-XPRO+ PL460-EK

The PHY Tx Test Console application offers an interface to the user by means of a command line console. In this console, the user can configure Transmission parameters, enable Sniffer mode, perform Tx Calibration, or review current configuration. The following figure shows the console configuration menu:

Figure 1-1. PHY Tx Test Console Menu

Following sections detail each of the available options in this menu.

Select Attenuation Level

Pressing ‘0’ opens this menu:
Figure 1-2. Set Attenuation

Valid range is 00 to 1F, where 00 means no attenuation, 1F means 31dB attenuation and any value in between is the value itself in dB. FF is a special value which means setting PLC Driver in transmission mode, but injecting no signal.

Select Time period between messages to transmit

Pressing ‘1’ opens this menu:
Figure 1-3. Time between messages

Valid range is from 2100 to 9999999999 microseconds. This is the time the transmitter will wait between the end of a transmitted frame and the start of the next one.

Actual maximum time depends on timers resolution, and if provided value is greater than such, it is truncated to the maximum available value.
Figure 1-4. Max time between messages

Select Data to transmit

Pressing ‘2’ opens this menu:
Figure 1-5. Select Data Length
First, data length is set. After setting length, data mode is prompted.
Figure 1-6. Select Data Mode
Options are:
  • 0 - Random Data. Transmitted bytes are selected randomly.
  • 1 - Fixed Data. The sequence [0x30, 0x31, …, 0x39, 0x030, 0x31, …] is sent, up to number of bytes selected in the previous step.

Select Branch Mode

Pressing ‘3’ opens this menu:
Figure 1-7. Select Branch
Options are:
  • 0 - Autodetect. Impedance is detected on first transmission and branch automatically selected.
  • 1 - High Impedance. This branch is used regardless of the actual impedance in line.
  • 2 - Very Low Impedance. This branch is used regardless of the actual impedance in line.

Enable PHY PLC Sniffer mode

Pressing ‘4’ enables this functionality:
Figure 1-8. Set Sniffer Mode

As seen on the capture, pressing ‘x’ exits Sniffer Mode and returns to main menu.

When a frame is received in Sniffer Mode, received data and related parameters are shown.
Figure 1-9. Frame Received in Sniffer
Figure shows the following:
  • Frame number (000001). Counter sequentially incremented at each received frame.
  • Received Raw Data. Data as received in PHY layer, no decoding is done.
  • Related parameters:
    • Frame length.
    • CRC correctness.
    • Received Signal Leven, in dBμV.
    • Link Quality Indicator and the corresponding SNR in dB.
    • SNR measured in frame Header.
    • SNR measured in frame Payload.
    • Distance between frame start and Mains zero-cross (NB) [See NB definition and usage in Meters And More Specs].
    • Frame duration, in μs.
    • Time between previous and current frame, in μs.

Phy Tx Calibration

Phy Tx Console application allows to perform a calibration to set the correct values to PLC Coupling parameters.

Coupling parameters are set by default to match PL460-EK characteristics, but a new calibration needs to be performed in case another Coupling configuration is used.

Coupling parameters are divided in 3 sets of values:
  • RMS values for High Impedance
  • RMS values for Low Impedance
  • Threshold values for Branch switching

Refer to PLC Coupling documentation for information regarding Coupling parameters and how to set proper values.

Pressing ‘5’ opens the “RMS values for High Impedance” calibration option:
Figure 1-10. RMS High Impedance Calibration selection
When DUT Connected as stated in menu, press ‘s’. After some seconds, results are printed on screen:
Figure 1-11. RMS High Impedance Calibration Results
Pressing ‘6’ opens the “RMS values for Low Impedance” calibration option:
Figure 1-12. RMS Low Impedance Calibration selection
When DUT Connected as stated in menu, press ‘s’. After some seconds, results are printed on screen:
Figure 1-13. RMS Low Impedance Calibration Results
Pressing ‘7’ opens the “Thresholds for Branch switching” calibration option:
Figure 1-14. Branch Switching Thresholds Calibration selection
When DUT Connected as stated in menu, press ‘s’. After some seconds, results are printed on screen:
Figure 1-15. Branch Switching Thresholds Calibration Results

View TX configuration values

Pressing ‘v’ opens the Current Configuration Values view:
Figure 1-16. View Current Configuration Parameters

Execute transmission application

Pressing ‘e’ starts transmission of frames using current configuration:
Figure 1-17. Frame Transmission Mode
Transmission information is printed on console, including:
  • Frame Counter.
  • Transmitted Raw Data.
  • Transmission result.
  • RMS Calc Value. See PLC Coupling documentation for more information about this parameter.

Pressing ‘x’ exits this mode and shown the Main Menu again.

Enable/Disable ECHO console

Pressing ‘c’ Enables/Disables echo from keyboard input in Console.

By default, echo is enabled to visually verify inputs.