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

How to turn radio off in proprietary mode (nrf_esb)?

We make the project where we want to connect new device (currently designing on nRf52832) to existing system made on nRF24.
It's a beacon in proprietary mode. It should periodicaly wake up, send Req, receive Ack, (sometimes another one Req/Ack) and going sleep back.

The main device on nRf24 listen the radio full time. So we just need to control the beacon.

There are we have some questions:

  • How to turn radio off in ESB mode? (for low power, when sleep)
    • I think we can use nrf_esb_suspend  or nrf_esb_disable, but i'm not sure it the right solutiuon.
  • Periodically we lost second Ack in dialog between nRF52832 and nRF24. What can lead to it?
Parents
  • There are our init function.

    uint32_t esb_init( void )
    {
        uint32_t err_code;
        
        uint8_t base_addr_0[4] = {0xE7, 0xE7, 0xE7, 0xEF};
        uint8_t base_addr_1[4] = {0xA1, 0xA2, 0xA3, 0xA4};
        uint8_t addr_prefix[8] = {0xE0, 0xA0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0 };
        
        nrf_esb_config_t nrf_esb_config         = NRF_ESB_DEFAULT_CONFIG;
         
            
        nrf_esb_config.protocol=                NRF_ESB_PROTOCOL_ESB_DPL;
        nrf_esb_config.retransmit_delay=        600;
        nrf_esb_config.bitrate=                 NRF_ESB_BITRATE_2MBPS;
        nrf_esb_config.event_handler=           nrf_esb_event_handler;
        nrf_esb_config.mode=                    NRF_ESB_MODE_PTX;
        nrf_esb_config.selective_auto_ack=      1;
        nrf_esb_config.payload_length=          4;
        nrf_esb_config.retransmit_count=        3;
        nrf_esb_config.crc=                     NRF_ESB_CRC_8BIT;
        nrf_esb_config.tx_mode=                 NRF_ESB_TXMODE_MANUAL;
    
        err_code = nrf_esb_init(&nrf_esb_config);
        VERIFY_SUCCESS(err_code);
    
        nrf_esb_enable_pipes(3);
        
        err_code = nrf_esb_set_base_address_0(base_addr_0);
        VERIFY_SUCCESS(err_code);
    
        err_code = nrf_esb_set_base_address_1(base_addr_1);
        VERIFY_SUCCESS(err_code);
        if(addr_prefix[0])
            __NOP();
        err_code = nrf_esb_set_prefixes(addr_prefix, 4); // This function configures the number of available pipes, enables the pipes, and sets their prefix addresses.
        VERIFY_SUCCESS(err_code);
        
        nrf_esb_update_prefix(0, 0xE0);
        
        err_code = nrf_esb_set_rf_channel(1);
        VERIFY_SUCCESS(err_code);
    
        return err_code;
    }

Reply
  • There are our init function.

    uint32_t esb_init( void )
    {
        uint32_t err_code;
        
        uint8_t base_addr_0[4] = {0xE7, 0xE7, 0xE7, 0xEF};
        uint8_t base_addr_1[4] = {0xA1, 0xA2, 0xA3, 0xA4};
        uint8_t addr_prefix[8] = {0xE0, 0xA0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0 };
        
        nrf_esb_config_t nrf_esb_config         = NRF_ESB_DEFAULT_CONFIG;
         
            
        nrf_esb_config.protocol=                NRF_ESB_PROTOCOL_ESB_DPL;
        nrf_esb_config.retransmit_delay=        600;
        nrf_esb_config.bitrate=                 NRF_ESB_BITRATE_2MBPS;
        nrf_esb_config.event_handler=           nrf_esb_event_handler;
        nrf_esb_config.mode=                    NRF_ESB_MODE_PTX;
        nrf_esb_config.selective_auto_ack=      1;
        nrf_esb_config.payload_length=          4;
        nrf_esb_config.retransmit_count=        3;
        nrf_esb_config.crc=                     NRF_ESB_CRC_8BIT;
        nrf_esb_config.tx_mode=                 NRF_ESB_TXMODE_MANUAL;
    
        err_code = nrf_esb_init(&nrf_esb_config);
        VERIFY_SUCCESS(err_code);
    
        nrf_esb_enable_pipes(3);
        
        err_code = nrf_esb_set_base_address_0(base_addr_0);
        VERIFY_SUCCESS(err_code);
    
        err_code = nrf_esb_set_base_address_1(base_addr_1);
        VERIFY_SUCCESS(err_code);
        if(addr_prefix[0])
            __NOP();
        err_code = nrf_esb_set_prefixes(addr_prefix, 4); // This function configures the number of available pipes, enables the pipes, and sets their prefix addresses.
        VERIFY_SUCCESS(err_code);
        
        nrf_esb_update_prefix(0, 0xE0);
        
        err_code = nrf_esb_set_rf_channel(1);
        VERIFY_SUCCESS(err_code);
    
        return err_code;
    }

Children
No Data
Related