Testing Commands
Testing Commands.
Modules | |
sl_bt_evt_test_dtm_completed | |
Indicates that the radio has processed a test start or end command. | |
Enumerations | |
enum | test_packet_type_t { test_pkt_prbs9 = 0x0, test_pkt_11110000 = 0x1, test_pkt_10101010 = 0x2, test_pkt_11111111 = 0x4, test_pkt_00000000 = 0x5, test_pkt_00001111 = 0x6, test_pkt_01010101 = 0x7, test_pkt_pn9 = 0xfd, test_pkt_carrier = 0xfe } |
Test Packet Types. | |
enum | test_phy_t { test_phy_1m = 0x1, test_phy_2m = 0x2, test_phy_125k = 0x3, test_phy_500k = 0x4 } |
Test PHY Types. | |
Functions | |
sl_status_t | sl_bt_test_dtm_tx (uint8_t packet_type, uint8_t length, uint8_t channel, uint8_t phy) |
sl_status_t | sl_bt_test_dtm_rx (uint8_t channel, uint8_t phy) |
sl_status_t | sl_bt_test_dtm_end () |
Detailed Description
Testing Commands.
Enumeration Type Documentation
◆ test_packet_type_t
enum test_packet_type_t |
Test Packet Types.
◆ test_phy_t
enum test_phy_t |
Function Documentation
◆ sl_bt_test_dtm_tx()
sl_status_t sl_bt_test_dtm_tx | ( | uint8_t | packet_type, |
uint8_t | length, |
||
uint8_t | channel, |
||
uint8_t | phy |
||
) |
Start a transmitter test against a separate Bluetooth tester device. When the command is processed by the radio, a sl_bt_evt_test_dtm_completed event is triggered. This event indicates whether the test started successfully.
In the transmitter test, the device sends packets continuously with a fixed interval. The type and length of each packet is set by packet_type
and length
parameters. The parameter phy
specifies which PHY is used to transmit the packets. All devices support at least 1M PHY. A special packet type, test_pkt_carrier , can be used to transmit continuous unmodulated carrier. The length field is ignored in this mode.
The test may be stopped using the sl_bt_test_dtm_end command.
- Parameters
-
[in] packet_type
Enum test_packet_type_t. Packet type to transmit. Values: - test_pkt_prbs9 (0x0): PRBS9 packet payload
- test_pkt_11110000 (0x1): 11110000 packet payload
- test_pkt_10101010 (0x2): 10101010 packet payload
- test_pkt_11111111 (0x4): 11111111 packet payload
- test_pkt_00000000 (0x5): 00000000 packet payload
- test_pkt_00001111 (0x6): 00001111 packet payload
- test_pkt_01010101 (0x7): 01010101 packet payload
- test_pkt_pn9 (0xfd): PN9 continuously modulated output
- test_pkt_carrier (0xfe): Unmodulated carrier
[in] length
Packet length in bytes
Range: 0-255
[in] channel
Bluetooth channel
Range: 0-39
Channel is (F - 2402) / 2,
where F is frequency in MHz
[in] phy
Enum test_phy_t. PHY to use. Values: - test_phy_1m (0x1): 1M PHY
- test_phy_2m (0x2): 2M PHY
- test_phy_125k (0x3): 125k Coded PHY
- test_phy_500k (0x4): 500k Coded PHY
- Returns
- SL_STATUS_OK if successful. Error code otherwise.
Events
- sl_bt_evt_test_dtm_completed - This event is received when the command is processed.
◆ sl_bt_test_dtm_rx()
sl_status_t sl_bt_test_dtm_rx | ( | uint8_t | channel, |
uint8_t | phy |
||
) |
Start a receiver test against a separate Bluetooth tester device. When the command is processed by the radio, a sl_bt_evt_test_dtm_completed event is triggered. This event indicates whether the test started successfully.
Parameter phy
specifies which PHY is used to receive the packets. All devices support at least 1M PHY.
The test may be stopped using sl_bt_test_dtm_end command. This will trigger another sl_bt_evt_test_dtm_completed event, which carries the number of packets received during the test.
- Parameters
-
[in] channel
Bluetooth channel
Range: 0-39
Channel is (F - 2402) / 2,
where F is frequency in MHz
[in] phy
Enum test_phy_t. PHY to use. Values: - test_phy_1m (0x1): 1M PHY
- test_phy_2m (0x2): 2M PHY
- test_phy_125k (0x3): 125k Coded PHY
- test_phy_500k (0x4): 500k Coded PHY
- Returns
- SL_STATUS_OK if successful. Error code otherwise.
Events
- sl_bt_evt_test_dtm_completed - This event is received when the command is processed.
◆ sl_bt_test_dtm_end()
sl_status_t sl_bt_test_dtm_end | ( |
| ) |
End a transmitter or a receiver test. When the command is processed by the radio and the test has ended, a sl_bt_evt_test_dtm_completed event is triggered.
- Returns
- SL_STATUS_OK if successful. Error code otherwise.
Events
- sl_bt_evt_test_dtm_completed - Received when the command is processed by the radio and the test has ended.