zigbee-cc2530 Development Board protocol stack-Modify transmit power

Source: Internet
Author: User
 

CC2530 control output Power Register is txpower:

Recommended power setting:

Protocol stack The default setting is 0xd5, in order to extend the signal transmission distance, I changed the Txpower register value to 0xf5, the output power is 4.5 DBm. In the mac_radio.c file, the following modifications were made:

void Macradiosettxpower (uint8 txpower)
{
halintstate_t s;

/* If the selected dBm is out of range, use the closest available */
if (Txpower > mac_radio_tx_power_max_dbm) {
Txpower = mac_radio_tx_power_max_dbm;
}

/*
* Set the global variable reqtxpower. This variable was referenced
* by the function macradioupdatetxpower () to write the Radio register.
*
* A Looku P table is used to translate the power level to the Register
* value.
*/
Hal_enter_critical_section (s);
Re Qtxpower = Macradiodefstxpowertable[txpower];
Hal_exit_critical_section (s);

/* Update the Radio power setting */
//************** Modify *******  itself;
Reqtxpower = 0xf5;
//******  
macradioupdatetxpower ();
}

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.