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 (); } |