Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ANT Data transmit with maximum power using BT840XE module

nRF SDK: 16.0, Device: nRF52840, module: BTX480XE, softdevice: ANT_s340_nrf52840_6.1.1.hex

The setup:

BLE and ANT running on same device concurrently. The device is modified Nordic UART example code, added with one master and one slave ANT channels. The code constantly broadcasts data every 100ms on Tx channel. I can receive the data packets on on ANTWAREII PC application.  There is no code compile issue.

The goal:

We want to get maximum TX/RX range from the BTX480XE module by using it's power amplifier hardware.

The issue:

The code stops sending broadcast data as soon pa_lna_init() is called in the (main.c:1165). This piece of code is using Pin 6,8,17,19 in the Fanstel module to control power amplifier.

Solutions tried:

Checked pin conflict of pin#s 6,8,17,19 in the code

Check PPI, GPIOTE and related peripherals are initialized in the code.

Attached the power amplifier initialization and driver code files for reference.

pa_init_driver.rar 

Parents Reply Children
  • Sorry the module name is BT840XE by Fanstel.

  • Have you measured on pins 6,8,17,19 on the Fanstel module to check that the PA/LNA pins toggle as expected?

    Typically pins 5-8 are used for UART logging (at least for the nRF52840-DK).

  • Hi, I have changed the UART pins (6,8 were being used). The PA/LNA pins are inside the module, basically nRF52840 and LNA chip are packaged into single enclosed module. So I have no access to these pins. I have also tried disabling the UART. Also changed the RTT TX pin. Nothing works.

  • This is how I receive the data on ANTWAREII software:

    Received BROADCAST_DATA_0x4E
      :: 4e, 00-01-01-00-00-00-00-00-00
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-01-01-00-00-00-00-00-00
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02 

    It seems the TXR sends data but it somehow gets corrupted. Only a few packets reach the RXR.

  • I tried this code mentioned in the ANT forum: www.thisisant.com/.../

    uint32_t err_code = sd_ant_config_pa_lna_get(&pstAmpConfig);
        APP_ERROR_CHECK(err_code);
    
        pstAmpConfig.PA_CONFIG.bEnabled = 1;
        pstAmpConfig.PA_CONFIG.bActiveState = 1;
        pstAmpConfig.PA_CONFIG.ucGPIO = APP_PA_PIN;
    
        pstAmpConfig.LNA_CONFIG.bEnabled = 1;
        pstAmpConfig.LNA_CONFIG.bActiveState = 1;
        pstAmpConfig.LNA_CONFIG.ucGPIO = APP_LNA_PIN;
    
        nrf_ppi_channel_t ppi_set_ch;
        nrf_ppi_channel_t ppi_clr_ch;
    
        pstAmpConfig.ucGPIOTECh = 1;//nGpioTeChannelNum;
        pstAmpConfig.ucPPIChDisable = ppi_clr_ch; // 0 Value
        pstAmpConfig.ucPPIChEnable = ppi_set_ch; // 1 Value
    
        err_code = sd_ant_config_pa_lna_set(&pstAmpConfig);

    The result is this data received:

    > Opening Channel...
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-01-01-00-00-00-00-00-00
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-02-01-00-00-00-00-00-00
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-03-01-00-00-00-00-00-00
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-01-01-00-00-00-00-00-00
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-02-01-00-00-00-00-00-00
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-03-01-00-00-00-00-00-00
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-01-01-00-00-00-00-00-00
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-01-01-00-00-00-00-00-00
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-02-01-00-00-00-00-00-00
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-03-01-00-00-00-00-00-00
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-02-01-00-00-00-00-00-00
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-03-01-00-00-00-00-00-00
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-01-01-00-00-00-00-00-00
    EVENT_RX_FAIL_0x02
      :: 40, 00-01-02
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-03-01-00-00-00-00-00-00
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-01-01-00-00-00-00-00-00
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-02-01-00-00-00-00-00-00
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-03-01-00-00-00-00-00-00
    Closing Channel...
    Received BROADCAST_DATA_0x4E
      :: 4e, 00-01-01-00-00-00-00-00-00
    EVENT_CHANNEL_CLOSED_0x07
      :: 40, 00-01-07

    But I'm not sure if it actually increased the physical range or LNA simply failed to initialize. I need to test physical range to verify this.

Related