RF Test Code Experience

Source: Internet
Author: User

The requirement here is to complete a cc2540 RF test program. The implementation function controls the change of RF emission frequency for the Development Board keys.

First was told to use PTM to do this test program, and then I went to the PTM introduction document, the address is Http://processors.wiki.ti.com/index.php/PTM

After reading that the PTM was born for testing, its main principle is: first configured as Network Processor mode, when the protocol stack into the PTM mode, HCI directly exposed to the UART. Popular Point said at this time the serial port is not a common serial port, it can be used to receive special instructions, here specifically HCL COMMANDS,HCI layer will be special instructions to the Layer API use, is directly control the link layer or physical layer it.

After thinking that I want to write the test program and this PTM is not exactly the same, because I do not need a serial port, my test program (ie, the application) is directly on the Development Board, not the Network Processor configuration, but Single-device configuration. And I checked the HCI layer-related APIs to discover APIs that send and receive data in DTM mode, such as

extern hcistatus_t Hci_le_transmittertestcmd (uint8 txfreq, uint8 datalen, uint8 pktpayload);

extern hcistatus_t Hci_le_receivertestcmd (uint8 rxfreq);

extern hcistatus_t hci_le_testendcmd (void);

So I directly use these APIs, but finally found that if the two board for testing, how to receive data? The Hci_le_transmittertestcmd () function returns after sending is always 0, while the Hci_le_receivertestcmd () receive return is also always 0. And then on the Internet to check a lot of information and did not solve.

Another route:

This external function is found in the HCI API:

extern hcistatus_t Hci_ext_modemtesttxcmd (uint8 cwmode,uint8 txfreq);

extern hcistatus_t Hci_ext_modemtestrxcmd (uint8 rxfreq);

extern hcistatus_t hci_ext_endmodemtestcmd (void);

From the function of the name can be seen to have LE and EXT points, yes, they are different, LE is the standard protocol stack, and EXT is the manufacturer's own expansion, different manufacturers of Bluetooth solutions may have different extensions, here is the expansion of TI company.

Two ways to test the detection, because the extended API does not have the transmission of packets, the following to use the Spectrum Analyzer test:

RF Test Code Experience

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.