def convert_to_signed_int_16_bit(hex_str):
    """
    Utility function to convert a hex string into a 16 bit signed hex integer value
    :param hex_str: hex String
    :return: signed 16 bit integer
    """
    val = int(hex_str, 16)
    if val > 0x7FFF:
        val = ((val+0x8000) & 0xFFFF) - 0x8000
    return val