This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[FAQ] SIMPLELINK-CC2640R2-SDK: RTLS Known Issues and Fixes

Mastermind 47305 points

Replies: 1

Views: 176

Part Number: SIMPLELINK-CC2640R2-SDK

simplelink_cc2640r2_sdk_2_40_00_32

1. The out of box project for rtls_master and rtls_slave have build error due to the stack_library.projectspec is pointing to a wrong version of XDCTools.

To fix this, please fix the following files: 

InstallationFolder\ti\simplelink_cc2640r2_sdk_2_40_00_32\examples\rtos\CC2640R2_LAUNCHXL\blestack\rtls_master\tirtos\ccs\

rtls_master_cc2640r2lp_stack_library.projectspec

InstallationFolder\ti\simplelink_cc2640r2_sdk_2_40_00_32\examples\rtos\CC2640R2_LAUNCHXL\blestack\rtls_slave\tirtos\ccs\

rtls_slave_cc2640r2lp_stack_library.projectspec

Change:

        <property name="products" value="com.ti.rtsc.XDCtools:3.50.08.24_core"/>

To:

        <property name="products" value="com.ti.rtsc.XDCtools:3.51.01.18_core"/>

simplelink_cc2640r2_sdk_2_30_00_28

1. The TX output power was not initialized in the aoa project, which cause poor range performance when it comes to AoA.

The fix is to add the following line inside AoA.c :: static RF_RadioSetup aoaSetup =

.common.txPower                  = 0x9330,

2. There is issue regarding angle calculation in the AoA receiver project. When the I/Q signal is weak, the shift down >>10 inside AoA.c :: AngleComplexProductComp will cause the calculation to be off.

The fix is to replace content within these three functions inside AoA.c :: static inline int16_t iat2, int16_t iatan2sc, int16_t AngleComplexProductComp

static inline int16_t iat2(int32_t y, int32_t x) {
  return ((y*32+(x/2))/x)*2;  // 3.39 mxdiff
}
int16_t iatan2sc(int32_t y, int32_t x) {
  // determine octant
  if (y >= 0) {   // oct 0,1,2,3
    if (x >= 0) { // oct 0,1
      if (x > y) {
        return iat2(-y, -x)/2 + 0*32;
      } else {
        if (y == 0) return 0; // (x=0,y=0)
        return -iat2(-x, -y)/2 + 2*32;
      }
    } else { // oct 2,3
      // if (-x <= y) {
      if (x >= -y) {
        return iat2(x, -y)/2 + 2*32;
      } else {
        return -iat2(-y, x)/2 + 4*32;
      }
    }
  } else { // oct 4,5,6,7
    if (x < 0) { // oct 4,5
      // if (-x > -y) {
      if (x < y) {
        return iat2(y, x)/2 + -4*32;
      } else {
        return -iat2(x, y)/2 + -2*32;
      }
    } else { // oct 6,7
      // if (x <= -y) {
      if (-x >= y) {
        return iat2(-x, y)/2 + -2*32;
      } else {
        return -iat2(y, -x)/2 + -0*32;
      }
    }
  }
}
// Example code for processing IQ data
int16_t AngleComplexProductComp(int16_t Xre, int16_t Xim, int16_t Yre, int16_t Yim)
{
    int32_t Zre, Zim;
    int16_t angle;

    // X*conj(Y)
    Zre = Xre*Yre + Xim*Yim;
    Zim = Xim*Yre - Xre*Yim;

    // Angle. The angle is returned in 256/2*pi format [-128,127] values
    angle = iatan2sc(Zim, Zre);

    return (angle * angleconst);
}

3. Modifying the DEFAULT_ADVERTISING_INTERVAL when sending ADV_NONCONN_IND packets does not have any effect. To fix this, please make the following three changes inside AoA.c :: void AOA_run(AoA_Handle handle, uint8_t channel, AoA_AntennaConfig *config, uint8_t pktId)

Change:

RF_cmdBleAdvNc.startTrigger.pastTrig = 1;

RF_cmdNopTx.startTrigger.pastTrig = 1;


if (channel == 37)
{
   RF_cmdNopTx.startTime = RF_getCurrentTime() + RF_convertUsToRatTicks(5000);
}

to:

RF_cmdBleAdvNc.startTrigger.pastTrig = 0;

RF_cmdNopTx.startTrigger.pastTrig = 0;


if (channel == 37)
{
   RF_cmdNopTx.startTime = handle->startTime + RF_getCurrentTime() + RF_convertUsToRatTicks(5000);
}
else
{
   RF_cmdNopTx.startTime = RF_getCurrentTime() + RF_convertUsToRatTicks(500);
}

4. lib_search doesn't work for RF multi-mode on MacOS, therefore, you can't run aoa and tof examples on Mac

Regards,

Christin  

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

If the question is answered, please press the  Verify Answer button below the answer to help other users find the correct answer easily.

 

1 Reply

  • Super helpful!

    Cheers,
    Marie H.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.