This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

CARRIERs SCAN PROCEDURE With nRF24L01+

Dear Sr.,

Can't detect carrier

They are two PCB one TX Carrier and other mush Detect the carrier
--------------------------------------------------------------------------------------------------------------------------
PCB1 TX CARRIER AT Channel 2.410 Ghz (Without data). This module generate only carrier for detecting for PCB2
PCB1 SW:
5 mS
CE=0
wSPI,#00100000b ;WR CONFIG Register SELECT
wSPI,#00001010b ;EN_CRC bit3 Set=1,PWR_UP bit1 Set=1,Set as PTX bit0=0
5 mS
wSPI,#00100101b ;WR RF_CH Register SELECT
wSPI,#10 ;Channel 2.410Ghz
5 mS
wSPI,#00100110b ;WR RF_SETUP Register SELECT
wSPI,#10001110b ;Continous Carrier Tx, 2Mbis/s, 0dBm Tx
CE=1
HALT
This SW run the carrier is OK
--------------------------------------------------------------------------------------------------------------------------
PCB2 RX CARRIER AT Channel 2.410 Ghz. This module mush detect carrier from PCB
PCB2 SW:
1 munute after PCB1 power on
5 mS
CE=0
wSPI,#00100000b ;WR CONFIG Register SELECT
wSPI,#00001011b ;EN_CRC bit3 Set=1,PWR_UP bit1 Set=1,PRX bit0 Set=1
5 mS
wSPI,#00100101b ;WR RF_CH Register SELECT
wSPI,#10 ;Channel 2.410Ghz
5 mS

CE1:

CE=1
5 mS
CE=0
wSPI,#00001001b ;RD RPD Register SELECT
rSPI,RD STATUS ;RD STATUS
rSPI,RPD ;Lee RPD

All Time Bit0=0 ;For Carrier Detec mush be =1
GOTO CE1
This SW don't detect the carrier
--------------------------------------------------------------------------------------------------------------------------

What I do wrong ?

Thank

Parents
  • Hi,

    tested With PLL_LOCK Set (bit4=1) at PTX

    the register RPD continue Reset (bit0=0) at PRX. Carrier non detected

    Best regards,

    LPO

    PS: The Transceiver is RF2401PRO of NICERF from China. This claim it adopt Nordic's RF chip nRF24L01+

  • Hi,

    Hakon thanks for your replay...

    On Page 25 of 78 of nRF24L01+ Single Chip 2.4GHz Transceiver Product Specification v1.0

    6.4 Received Power Detector measurements

    Can see "If no packets are received the RPD is latched at the end of a receive period as a result of host MCU setting CE low", option necesary for me search of ocuped channels without modulation (only carriers or others diferents modulations).

    In me case they are one bucle  of 5mS between CE=1 and CE=0 on PRX mode

    Mush be > Tstby2a +Tdelay_AGC=130us + 40us but very less of 5mS ?

    Best regards,

    LPO

  • Hi,

     

    The RPD bit shall be '1' if there is energy in the current receiving channel is > -64 dBm, it is just that this bit is held for a given period if you are receiving a valid packet.

    You shall still be able to use this bit to detect energy from for instance bluetooth or wifi.

    Have you checked the current consumption (or the carrier using a spectrum analyzer) of your transmitter to see if it is actually transmitting? It should be 11 to 12 mA.

    Same with your receiver, does it show ~14 mA in RX mode?

     

    Kind regards,

    Håkon

  • Hi,

    " it is just that this bit is held for a given period if you are receiving a valid packet"

    With the specification "If no packets are received the RPD is latched at the end of a receive period as a result of host MCU setting CE low or RX time out controlled by Enhanced ShockBurst" , is no need receiving a valid packet i think.

    The spectrum analyzer indicate they are carrier, but the RPD Register continue to 00' (STATUS=0E' corect)

    I can be rong, but i think the nRF24L01+ can leve send only carrier and detect only carrier, similar to one comunication OOK

    Kind regards,

    LPO

Reply
  • Hi,

    " it is just that this bit is held for a given period if you are receiving a valid packet"

    With the specification "If no packets are received the RPD is latched at the end of a receive period as a result of host MCU setting CE low or RX time out controlled by Enhanced ShockBurst" , is no need receiving a valid packet i think.

    The spectrum analyzer indicate they are carrier, but the RPD Register continue to 00' (STATUS=0E' corect)

    I can be rong, but i think the nRF24L01+ can leve send only carrier and detect only carrier, similar to one comunication OOK

    Kind regards,

    LPO

Children
  • Yes, you are correct. This bit shall detect energy, but then it will not hold the RPD bit high for a longer period (as it would if a address match is found)

    Could you try to keep the RX on, and do not duty cycle (in 5 ms pattern), to see if this has any impact on the RPD bit read out?

     

  • Hi, I tested whit the module MIKROE-1305 whit understand genuine nRF24L01+ I think. And the results are similar.

    The energy detect funtion mush be inproved on nRF24L01+ if too only carriers or other chanels of other equipement exist and want be detected. This improviment is important when is need search free chanels on noisy ambients. Meanwile the specification mush corrected at tested cases.

    If some people had detected energy with this cip, please talk here.

    Thanks,

    LPO

  • Hi,

     

    Did you try to keep the nRF24L01+ continuously in RX mode (no switching RF channel), then read out the RPD bit in a loop to see if it changes?

    The nRF24L01+ shall draw approx. 12 mA when in RX mode.

     

    Best regards,

    Håkon

  • Thanks Hakon for your support,

    I had probed keeping the nrf24L01+ continuously in RX mode and reading the RPD in loop.
    I had probed after CE=1 10uS to 5 mS, latchind CE to 0-1 keeping the nrf24L01+ continuously in RX mode and reading the RPD in loop.
    I had probed after CE=1 10uS to 5 mS, latchind CE to 0-1-0 keeping the nrf24L01+ stamby-1 mode and reading the RPD in loop.

    All time the register 09' is 00' (Bit0=0 of RPD)

    RX an TX at 20 cm of distance with carrier receiving correcty in spectrum analycer.

    The nrf24L01+ product specification V1.0 on page 25 expain as detect the carrier bit RPD, in one contradictory form:
    "The RPD can beread out at any time while nrf24L01+ is in receive mode" and "If no packects are received the RPD is
    latched at he end of a receive period as result the host MCU setting CE low"
    If I put at end of a receive period CE low, I am no't in receive mode as is writed in first part this specification.

    Other question is what mean "a receive period", what time is this ?
    And they are others conditions ?

    The draw is 15 mA when in RX mode.

    Thanks,
    LPO

  • Hi,

     

    LPO said:

    The nrf24L01+ product specification V1.0 on page 25 expain as detect the carrier bit RPD, in one contradictory form:
    "The RPD can beread out at any time while nrf24L01+ is in receive mode" and "If no packects are received the RPD is
    latched at he end of a receive period as result the host MCU setting CE low"
    If I put at end of a receive period CE low, I am no't in receive mode as is writed in first part this specification.

    Other question is what mean "a receive period", what time is this ?
    And they are others conditions ?

     

    The first sentence states that you can read the RPD at any time while in receive mode, and it will reflect what the receiver sees in terms of signal level.

    The second sentence is referring to the latched state of the RPD while you are not in RX mode.

     

    I tested this by setting up a unmodulated carrier at channel 40, then using a nRF24LE1 device (which has the exact same radio core as nRF24L01+), with this source code, based on the nRFgo SDK v2.3 example "enhanced_shockburst" PRX:

    /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved.
     *
     * The information contained herein is confidential property of Nordic
     * Semiconductor ASA.Terms and conditions of usage are described in detail
     * in NORDIC SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
     *
     * Licensees are granted free, non-transferable use of the information. NO
     * WARRENTY of ANY KIND is provided. This heading must NOT be removed from
     * the file.
     *
     * $LastChangedRevision: 2211 $
     */
    
    /** @file
     * @brief Enhanced ShockBurst Primary Receiver example
     * @defgroup esb_prx_example Enhanced ShockBurst Primary Receiver (PRX) example
     * @{
     * @ingroup nrf_examples
     *
     * @brief This example monitors for data and writes the first byte (byte 0) of the
     * received payloads to P0.
     *
     * The example shows the minimum required setup for receiving packets from a
     * primary transmitter (PTX) device.
     *
     * The following default radio parameters are being used:
     * - RF channel 2
     * - 2 Mbps data rate
     * - RX address 0xE7E7E7E7E7 (pipe 0) and 0xC2C2C2C2C2 (pipe 1)
     * - 1 byte CRC
     *
     * The project @ref esb_ptx_example can be used as a counterpart for transmitting the data.
     *
    */
    
    //lint -e717
    //lint -e534
    //lint -e714
    //lint -e783
    
    #ifdef MCU_NRF24LE1
    #include "nrf24le1.h"
    #include "hal_clk.h"
    #endif
    
    #ifdef MCU_NRF24LU1P
    #include "nrf24lu1p.h"
    #endif
    
    #include <stdint.h>
    #include "hal_nrf.h"
    
    // Global variables
    uint8_t payload[3];
    
    void main()
    {
    #ifdef MCU_NRF24LE1
      while(hal_clk_get_16m_source() != HAL_CLK_XOSC16M)
      {
        // Wait until 16 MHz crystal oscillator is running
      }
    #endif
      
      #ifdef MCU_NRF24LU1P
      // Enable radio SPI
      RFCTL = 0x10;
      #endif
    
      // Set P0 as output
      P0DIR = 0;
      P0 = 0;
      // Enable the radio clock
      RFCKEN = 1;
    
      // Enable RF interrupt
      RF = 1;
      // Enable global interrupt
      EA = 1;
    
      // Configure radio as primary receiver (PTX)
      hal_nrf_set_operation_mode(HAL_NRF_PRX);
      hal_nrf_set_rf_channel(40);
      // Set payload width to 3 bytes
      hal_nrf_set_rx_payload_width((int)HAL_NRF_PIPE0, 3);
    
      // Power up radio
      hal_nrf_set_power_mode(HAL_NRF_PWR_UP);
    
      // Enable receiver
      CE_HIGH();
    
      for(;;)
      {
          if (hal_nrf_get_carrier_detect())
          {
              // Delay
              uint16_t i = 0xFFF;
              while (i--);
              P0 ^= 0xFF;
              
          }
      }
    }
    
    // Radio interrupt
    NRF_ISR()
    {
      uint8_t irq_flags;
    
      // Read and clear IRQ flags from radio
      irq_flags = hal_nrf_get_clear_irq_flags();
    
      // If data received
      if((irq_flags & (1<<(uint8_t)HAL_NRF_RX_DR)) > 0)
      {
        // Read payload
        while(!hal_nrf_rx_fifo_empty())
        {
          hal_nrf_read_rx_payload(payload);
        }
    
        // Write received payload[0] to port 0
        P0 = payload[0];
      }
    }
    /** @} */
    

    The RPD bit successfully detects the energy and I observe that the LEDs while in RX mode.

     

    Kind regards,

    Håkon

Related