Welcome to the Low Power RF & Wireless Connectivity Section of the TI E2E Support Community. Ask questions, share knowledge, explore ideas, and help solve problems with fellow engineers. To post a question, click on the forum tab then "New Post".
Hi,
I'm new to using eZ430-rf2500 development kit.
If I want to change the transmit power of the transreceiver, do I use smartrf studio to do so? (there seems to be a way to do it from there)
After that, how do i integrate the settings from smartrf studio into the hardware?
Thanks in advance!
Well you have a CC1110 based device but the radio is a CC1101.
8051 MCU + CC1101 Radio == CC1110
Its quite confusing because TI uses the same nomenclature for their MCU+Radio and Radio only chips.
mark sonn Correct, SimpliciTi always uses a hardcoded power table, which is an array called mrfiRFPowerTable. It writes the first entry of this array in the power register of the radio by calling the smpl_init() function. If you call the smpl_ioctl function then another value of this array is written into radio register. The design note DN013 gives you a list of all possible values. If you want to amplify the output power by 10 dbm then you have to write the value 0xC0 in the register. Keep in mind that this doubles the current consumption
Correct, SimpliciTi always uses a hardcoded power table, which is an array called mrfiRFPowerTable.
It writes the first entry of this array in the power register of the radio by calling the smpl_init() function.
If you call the smpl_ioctl function then another value of this array is written into radio register.
The design note DN013 gives you a list of all possible values.
If you want to amplify the output power by 10 dbm then you have to write the value 0xC0 in the register. Keep in mind that this doubles the current consumption
I changed the transmit power to the lowest preset value but the range was still more than I need:
pwr = IOCTL_LEVEL_0; SMPL_Ioctl(IOCTL_OBJ_RADIO, IOCTL_ACT_RADIO_SETPWR, &pwr);
So I looked at the CC1101 PATABLE settings and changed it to the lowest setting which is -30dBm:
pwr = 0x03; SMPL_Ioctl(IOCTL_OBJ_RADIO, IOCTL_ACT_RADIO_SETPWR, &pwr);
but after testing, the range appears to be unchanged. Why is this not reducing the range? How short of a range is possible with this device?
Thanks.
You have to modify the mrfiRFPowerTable array in the mrfi_radio.c file, which has by default 3 values. You call the
SMPL_Ioctl(IOCTL_OBJ_RADIO, IOCTL_ACT_RADIO_SETPWR, &pwr); function to write a value of this array in the radio register. The pwr variable is just the index of this array and not the value that you write in the array.And I dont know what range you need. But a -9 dbm decrease of the output power is already enough to limit it to 3-4 meters range.
In the unrestricted CCS, mrfi => radios => family5 => mrfi_radio.c is ecluded from the build. I included it, but I am getting these errors:
error: symbol "MRFI_Sleep" redefined: first defined in "./simpliciti/Components/mrfi/mrfi.obj"; redefined in "./simpliciti/Components/mrfi/radios/family5/mrfi_radio.obj"error: symbol "MRFI_PostKillSem" redefined: first defined in "./simpliciti/Components/mrfi/mrfi.obj"; redefined in "./simpliciti/Components/mrfi/radios/family5/mrfi_radio.obj"error: symbol "MRFI_SetLogicalChannel" redefined: first defined in "./simpliciti/Components/mrfi/mrfi.obj"; redefined in "./simpliciti/Components/mrfi/radios/family5/mrfi_radio.obj"error: symbol "MRFI_Rssi" redefined: first defined in "./simpliciti/Components/mrfi/mrfi.obj"; redefined in "./simpliciti/Components/mrfi/radios/family5/mrfi_radio.obj"
..........
I took a look in mrfi.c:
/* ----- Radio Family 5 ----- */#elif (defined MRFI_RADIO_FAMILY5)# include "radios/family5/mrfi_radio.c"# include "radios/family5/mrfi_radio_interface.c"
Should I remove the radio family 5 includes?
I tried including all files in this family5 folder (including mrfi_radio_interface.c) but build failed with this error:
--obj_directory="simpliciti/Components/mrfi/radios/family5" "../simpliciti/Components/mrfi/radios/family5/mrfi_radio_interface.c""../simpliciti/Components/mrfi/radios/family5/mrfi_radio_interface.c", line 114: error: identifier "mrfiRIFIState_t" is undefined"../simpliciti/Components/mrfi/radios/family5/mrfi_radio_interface.c", line 122: warning: function declared implicitly>> Compilation failure"../simpliciti/Components/mrfi/radios/family5/mrfi_radio_interface.c", line 133: warning: function declared implicitly"../simpliciti/Components/mrfi/radios/family5/mrfi_radio_interface.c", line 136: warning: function declared implicitly"../simpliciti/Components/mrfi/radios/family5/mrfi_radio_interface.c", line 153: warning: function declared implicitly"../simpliciti/Components/mrfi/radios/family5/mrfi_radio_interface.c", line 170: warning: function declared implicitly"../simpliciti/Components/mrfi/radios/family5/mrfi_radio_interface.c", line 189: error: identifier "mrfiRIFIState_t" is undefined"../simpliciti/Components/mrfi/radios/family5/mrfi_radio_interface.c", line 196: warning: function declared implicitly"../simpliciti/Components/mrfi/radios/family5/mrfi_radio_interface.c", line 216: warning: function declared implicitly"../simpliciti/Components/mrfi/radios/family5/mrfi_radio_interface.c", line 235: error: identifier "mrfiRIFIState_t" is undefined"../simpliciti/Components/mrfi/radios/family5/mrfi_radio_interface.c", line 241: warning: function declared implicitly"../simpliciti/Components/mrfi/radios/family5/mrfi_radio_interface.c", line 256: warning: function declared implicitly"../simpliciti/Components/mrfi/radios/family5/mrfi_radio_interface.c", line 273: error: identifier "mrfiRIFIState_t" is undefined"../simpliciti/Components/mrfi/radios/family5/mrfi_radio_interface.c", line 278: warning: function declared implicitly"../simpliciti/Components/mrfi/radios/family5/mrfi_radio_interface.c", line 300: warning: function declared implicitly"../simpliciti/Components/mrfi/radios/family5/mrfi_radio_interface.c", line 317: error: identifier "mrfiRIFIState_t" is undefined"../simpliciti/Components/mrfi/radios/family5/mrfi_radio_interface.c", line 322: warning: function declared implicitly"../simpliciti/Components/mrfi/radios/family5/mrfi_radio_interface.c", line 369: warning: function declared implicitly5 errors detected in the compilation of "../simpliciti/Components/mrfi/radios/family5/mrfi_radio_interface.c".gmake: *** [simpliciti/Components/mrfi/radios/family5/mrfi_radio_interface.obj] Error 1
Any ideas?
Dont include it to the build. The source code is included by some other other file.
Thanks for your help. I was able to change the value in the table to 0x03 and rebuild sucessfully. After testing, I still am getting about 10 meters without dropping any packets and about 15 meters with some packet loss. Ideally I would like the range to be about 3-4 meters, but this is ok. I guess I'm out of options for creating a smaller range right?
Then you didnt change the value successfully. The range should be almost 0 with that value. Make sure that you included the mrfi.c file to the build. This file includes the mrfi_radio.c code.
Also double check your SMARTRF_SETTING_xxx settings as well.
Bruce Mitchell Also double check your SMARTRF_SETTING_xxx settings as well.
Which setting were you referring to?
#define SMARTRF_RADIO_CC430#define SMARTRF_SETTING_FSCTRL1 0x08#define SMARTRF_SETTING_FSCTRL0 0x00#ifdef ISM_EU// 869.525MHz# define SMARTRF_SETTING_FREQ2 0x21# define SMARTRF_SETTING_FREQ1 0x71# define SMARTRF_SETTING_FREQ0 0x7A#else# ifdef ISM_US// 902MHz (CHANNR=20->906MHz)# define SMARTRF_SETTING_FREQ2 0x22# define SMARTRF_SETTING_FREQ1 0xB1# define SMARTRF_SETTING_FREQ0 0x3B# else# ifdef ISM_LF// 433.92MHz# define SMARTRF_SETTING_FREQ2 0x10# define SMARTRF_SETTING_FREQ1 0xB0# define SMARTRF_SETTING_FREQ0 0x71# else# error "Wrong ISM band specified (valid are ISM_LF, ISM_EU and ISM_US)"# endif // ISM_LF# endif // ISM_US#endif // ISM_EU#define SMARTRF_SETTING_MDMCFG4 0x7B#define SMARTRF_SETTING_MDMCFG3 0x83#define SMARTRF_SETTING_MDMCFG2 0x13#define SMARTRF_SETTING_MDMCFG1 0x22#define SMARTRF_SETTING_MDMCFG0 0xF8#define SMARTRF_SETTING_CHANNR 0x00#define SMARTRF_SETTING_DEVIATN 0x42#define SMARTRF_SETTING_FREND1 0xB6#define SMARTRF_SETTING_FREND0 0x10#define SMARTRF_SETTING_MCSM0 0x18#define SMARTRF_SETTING_FOCCFG 0x1D#define SMARTRF_SETTING_BSCFG 0x1C#define SMARTRF_SETTING_AGCCTRL2 0xC7#define SMARTRF_SETTING_AGCCTRL1 0x00#define SMARTRF_SETTING_AGCCTRL0 0xB2#define SMARTRF_SETTING_FSCAL3 0xEA#define SMARTRF_SETTING_FSCAL2 0x2A#define SMARTRF_SETTING_FSCAL1 0x00#define SMARTRF_SETTING_FSCAL0 0x1F#define SMARTRF_SETTING_FSTEST 0x59#define SMARTRF_SETTING_TEST2 0x81#define SMARTRF_SETTING_TEST1 0x35#define SMARTRF_SETTING_TEST0 0x09#define SMARTRF_SETTING_FIFOTHR 0x47#define SMARTRF_SETTING_IOCFG2 0x29#define SMARTRF_SETTING_IOCFG0D 0x06#define SMARTRF_SETTING_PKTCTRL1 0x04#define SMARTRF_SETTING_PKTCTRL0 0x05#define SMARTRF_SETTING_ADDR 0x00#define SMARTRF_SETTING_PKTLEN 0xFF#endif // SMARTRF_CC430_H
You use the default settings of the chronos project. I can confirm that it is possible to decrease the range of the chronos watch based on those settings.
The problem is the code with that you change the pa_table setting.
Do you change it after you called smpl_init? Did you include the mrfi.c file to the build process?
Sorry, I though there was a SMARTRF param for PA table, entry 0;
My bad.
Sorry.
What would you say is the range now that you changed the parameters ?
Do you have any idea of the power consumption when sending packets out ?
Thanks
mark sonn Do you change it after you called smpl_init? Did you include the mrfi.c file to the build process?
I have tried changing the first entry in mrfiRFPowerTable from 0x0F to 0x03 and commenting out the above two lines, but didn't seem to help:
mrfi_radio.c is excluded while mrfi.c is included (this is the way it came on the unrestricted license). I have verified that changing pwr from level 2 to level 0 does decrease the range, but I thought with the setting of 0x03 I would be getting a range much smaller than 10 meters. I don't know why I can't get the range smaller than that like you suggest it should be.
Pfister Frederic What would you say is the range now that you changed the parameters ? Do you have any idea of the power consumption when sending packets out ? Thanks