Getting started with BTS-Revo

General Overview

The BTS Revo provides the possibility to log data and perform various operations over the hardware channel, enabling monitoring, control, and interaction with connected devices for testing or diagnostic purposes.

Operational Steps

Before starting any test case, the following steps need to be performed:

  1. Check the device ID: Like what was realized for the CAN and LIN capture modules, there is a rotary switch to change the ID of the device.

  2. Power the BTS Board: Provide power to the BTS board by connecting 12V to the Vpower pin and GND to the GNDpower pin.

Please check the figure below which represents The ID which is 160+ the position of rotary switch and pins corresponding to the power of BTS board.

  1. Check Network Configuration: Ensure that the PC and the BTS Revo are configured within the same IP network range.

Note

The default IP address of the BTS Revo is 10.104.3.160, where 160 corresponds to the device ID in the YAML file.

  1. Verify Connectivity: Use the ping command to check if the device is reachable from the PC.

  2. Check Firmware Version: Open the device’s web interface in a browser and verify that the latest official firmware is installed.

Functionalities

The BTS Revo offers basic functionalities, as well as some advanced features that require additional extensions.

In the following paragraph, the basic functionnalities that the BTS Revo can perform are described:

  • Open load: Simulates a cable break on the specified channel.

  • Short distance to Vbat: Connects the pin to the Vdut pin.

  • Short distance to GND: Connects the pin to the GNDdut pin.

  • PWM generation: Generates a PWM signal by specifying the duration of the signal when it is ON and when it is OFF.

  • Voltage measurement: Returns the voltage value.

  • PWM measurement: Returns the duty and the period of the PWM signal.

In the same paragraph, we specify the extensions required to enable advanced functionalities:

  • Dagger: Enables the simulation of resistance.

  • Blitz+sword: Enables current simulation and current measurement.

YAML file configuration for BTS Revo

The test bench used as an example has only one BTS REVO board with the ID 160.

In the following description, we present an example of the corresponding YAML file, illustrating various BTS functionalities along with specific test cases and real images representing each functionality:

Short to Vbat functionnality test case

from test_base import TestBase
from time import sleep
from xtr import logging, Severity
logger = logging.getLogger(__name__)
from mtf.network_port.io_controller import IoController
from mtf.enum_types import IoProperty, IoFaultyTypes

io = IoController()

# Create the test case class, that inherits from the preset TestBase class.

class TestCaptureIoVoltage(TestBase):

    def setUp(self):
        logger.info("Setup test case")
        #preconditions to set the voltage's intial value to 0
        io.io_apply_faulty("TEST_IO_1", IoFaultyTypes.ShortCutToGnd)

    # Create the tearDown() method.
    def tearDown(self):
        logger.info("Tear down test case")

    # Create the test case method that holds the main test steps.
    def test_bts_io_short_vbat(self):
        """
        Apply short to Vbat on the io channel
        and check the voltage value we got
        """

        # Short to Vbat the IO channel "TEST_IO_1"
        io.io_apply_faulty("TEST_IO_1", IoFaultyTypes.ShortcutToVbat)

        sleep(0.1)

        #check the availability of "TEST_IO_1"
        availablity = io.is_channel_available("TEST_IO_1")
        self.assertTrue(availablity, Severity.BLOCKER,
                        "TEST_IO_1 is not available")

        #get the voltage value of "TEST_IO_1"
        voltage = io.io_get_last_value("TEST_IO_1",IoProperty.Voltage)

        #Since we Short the channel to Vbat we expect a voltage of almost 12
        self.assertTrue(round(voltage) == 12, Severity.BLOCKER,
                        "The voltage value is wrong")

short to Ground functionnality test case

from test_base import TestBase
from time import sleep
from xtr import logging, Severity
logger = logging.getLogger(__name__)
from mtf.network_port.io_controller import IoController
from mtf.enum_types import IoProperty, IoFaultyTypes

io = IoController()

# Create the test case class, that inherits from the preset TestBase class.
class TestCaptureIoVoltage(TestBase):

    def setUp(self):
        logger.info("Setup test case")
        #preconditions to set the voltage's intial value to 12
        io.io_apply_faulty("TEST_IO_1", IoFaultyTypes.ShortcutToVbat)

    # Create the tearDown() method.
    def tearDown(self):
        logger.info("Tear down test case")

    # Create the test case method that holds the main test steps.
    def test_bts_io_short_gnd(self):
        """
        Apply short to Ground on the io channel
        and check the voltage value we got
        """

        # Short to ground the IO channel "TEST_IO_1"
        io.io_apply_faulty("TEST_IO_1", IoFaultyTypes.ShortCutToGnd)

        sleep(0.1)

        #check the availability of "TEST_IO_1"
        availablity = io.is_channel_available("TEST_IO_1")
        self.assertTrue(availablity, Severity.BLOCKER,
                        "TEST_IO_1 is not available")

        #get the voltage value of "TEST_IO_1"
        voltage = io.io_get_last_value("TEST_IO_1",IoProperty.Voltage)

        #Since we Short to ground the channel we expect a voltage of almost 0
        self.assertTrue(round(voltage) == 0, Severity.BLOCKER,
                        "The voltage value is wrong")

Cable break functionnality test case

from test_base import TestBase
from time import sleep
from xtr import logging, Severity
logger = logging.getLogger(__name__)
from mtf.network_port.io_controller import IoController
from mtf.enum_types import IoProperty, IoFaultyTypes

io = IoController()

# Create the test case class, that inherits from the preset TestBase class.
class TestCaptureIoVoltage(TestBase):

    def setUp(self):
        logger.info("Setup test case")
        #preconditions to set the voltage's intial value to 12
        io.io_apply_faulty("TEST_IO_1", IoFaultyTypes.ShortcutToVbat)

    # Create the tearDown() method.
    def tearDown(self):
        logger.info("Tear down test case")

    # Create the test case method that holds the main test steps.
    def test_bts_io_cable_break(self):
        """
        Apply cable break on the io channel
        and check the voltage value we got
        """
        # break the cable of the IO channel TEST_IO_1
        io.io_apply_faulty("TEST_IO_1", IoFaultyTypes.CableBreak)

        sleep(0.1)

        #check the availability of TEST_IO_1
        availablity = io.is_channel_available("TEST_IO_1")
        self.assertTrue(availablity, Severity.BLOCKER,
                        "TEST_IO_1 is not available")

        #get the voltage value of TEST_IO_1
        voltage = io.io_get_last_value("TEST_IO_1",IoProperty.Voltage)

        #Since we break the cable we expect a voltage of almost 0
        self.assertTrue(round(voltage) == 0, Severity.BLOCKER,
                        "The voltage value is wrong")