SWRA749 September   2022

 

  1.   Abstract
  2.   Trademarks
  3. 1Device Power Up
    1. 1.1 Required Voltage Rail and Signal Sequence
    2. 1.2 nSHUTDOWN and HCI_RTS
  4. 2UART Communication
  5. 3Device Initialization Procedure
  6. 4Basic Bluetooth Operations
  7. 5Bluetooth RF FCC Modes
    1. 5.1 Continuous TX
    2. 5.2 Packet RX TX
    3. 5.3 Continuous RX
  8. 6Bluetooth RF SIG Mode
  9. 7Bluetooth Low Energy Testing
    1. 7.1 Transmitter Test
    2. 7.2 Receiver Test
  10. 8Revision History

Receiver Test

The Bluetooth device will receive data from CBT and PC will calculate PER and BER from received data.

GUID-20220726-SS0I-5SMF-1CM5-J7PGKFVC6ZGC-low.jpg Figure 7-3 Source: Code V4.0
  1. Enable BLE mode:
    HCI_VS_LE_Enable 0xFD5B, 1, 1
  2. Set the type of test to run
    PER_nBER = 1 (PER=1 or BER=0)
  3. Set here the number of packets the tester transmits for PER measurements
    Tx_Packets = 1500
  4. Set RX Frequency Channel 2402 + 2*k, where k is the channel (max val is 39)
    RX_Channel = 0 (same as k)
  5. Set the RX Mode According to the options below (Default is "1"):

    # 0 - Normal mode, Open loop & no power saving

    # 1 - Wide window mode, Close loop & no power saving

    # 2 - Continuous RX, Open loop before SYNC

    # 3 - Wide window & power saving mode, Close loop & power saving
    RX_Mode = 1

  6. Set the RX Access Code to Sync on (Default is 0x71764129)
    RX_AC = 0x71764129
  7. Set payload type

    # 0 - PRBS 9

    # 1 - FOFO

    # 2 - ZOZO

    # 3 - PRBS 15

    # 4 - All Ones

    # 5 - All Zeros

    # 6 - OFOF

    # 7 - OZOZ
    PayloadType = 0x00

  8. Set length of packet fields in Bytes
    Header_Length = 2 Payload_Length = 37 CRC_Length = 3
  9. Set CRC for PRBS9 with 37 Bytes length
    CRC_Value = 0x00E221E8
  10. When traces are enabled than the Cortex is not able receive the next packet
    En_Traces = 0
  11. Set the amount of bad bits/packet to identify FA (in percent) and set Enable_BER
    FA_THR_inPer = 7
    Total_Bits_in_packet = 8 * (Header_Length + Payload_Length + CRC_Length)
    FA_THR_inBits = round((FA_THR_inPer/100) * Total_Bits_in_packet)
    
    if (PER_nBER == 1) then
    	Enable_BER = 0
    else
    	Enable_BER = 1
    endif
    
  12. Clear Sync Counter
    HCI_VS_Write_Hardware_Register 0xFF01, 0x0019324E, 0x0
    Outgoing Dump: 01 01 ff 06 4e 32 19 00 00 00
    Incoming Event: 04 0e 04 01 01 ff 00 (Command Complete Event)
  13. Update Parameters
    HCI_VS_Set_LE_Test_Mode_Parameters 0xFD77, 0x01, RX_Mode, 0, RX_AC, Enable_BER, PayloadType, Payload_Length, FA_THR_inBits, En_Traces, CRC_Value
    HCI_VS_Set_LE_Test_Mode_Parameters 0xFD77, 0x01, x01, 0x0000, 0x71764129(RX_AC), 0x00(Enable_BER), 0x00(PayloadType), 0x25(Payload_Length), 0x18(FA_THR_inBits), 0x00(En_Traces), 0x00E221E8 (CRC)
  14. Start RX Scan
    HCI_BLE_Receiver_Test 0x201d, RX_Channel

    Pause here and send data packets from the CBT Tester. Continue with scripts after sending all the packets.

  15. If testing for PER:
    if (PER_nBER == 1) then
    HCI_BLE_Test_End 0x201f

    Returns number of packets recieved, save into &Rx_Packets.

  16. Read Phy - Sync Counter Value
    HCI_VS_Read_Hardware_Register 0xFF00, 0x0019324E
    Outgoing Dump: 01 00 ff 04 4e 32 19 00
    Incoming Event: 04 0e 06 01 00 ff 00 0a 00 (Command Complete Event, Value: 0x000A)

    Returns Sync Counter Value, save into &Sync_Counter.

  17. Calculate PER = 100*(Tx_Packets - Rx_Packets)/Tx_Packets
  18. For BER:
    else
    HCI_BLE_Test_End 0x201f

    Returns number of packets recieved, save into &Rx_Packets.

  19. Read BER Results
    Hci_VS_LE_Read_Ber_Test_Results 0xFDAE

    Vendor-Specific LE_Read_Ber_Test_Results Command Complete parameters:

  20. Read Phy - Sync Counter Value
    HCI_VS_Read_Hardware_Register 0xFF00, 0x0019324E
    Outgoing Dump: 01 00 ff 04 4e 32 19 00
    Incoming Event: 04 0e 06 01 00 ff 00 0a 00 (Command Complete Event, Value: 0x000A)

    Returns Sync Counter Value, save into &Sync_Counter.

  21. Calculate Actual Syncs
    Actual_Syncs = BER_Syncs - FA_Events
  22. Calculate BER:
    # Bit Counters
    Total_Bad_Bits = Htype_Bad_Bits + Hlength_Bad_Bits + Ppart1_Bad_Bits + Ppart2_Bad_Bits + Ppart3_Bad_Bits + Ppart4_Bad_Bits + CRC_Bad_Bits
    Dropped_Packets = Actual_Syncs - Total_Good_Packets
    Detected_Packets = Actual_Syncs
    Total_Received_Bits = Total_Bits_in_packet * Detected_Packets
    
    if(Total_Received_Bits == 0) then
    BER = 100
    else
    BER = 100*(Total_Bad_Bits / Total_Received_Bits)
    endif