[nRF51822] 13, talking about nRF51822 and NRF24LE1/NRF24LU1/NRF24L01 Classic 2.4G module wireless communication configuration and flow

Source: Internet
Author: User

Objective:

NRF51 can support 2.4G-based mutual communication, communication with NRF24LE1, communication with NRF24LU1, and communication with NRF24L01.

First, nRF51822 based on 2.4G and nRF51822 communication

Where nRF51 communicates with each other and is similar to the previous 51 operation Nrf24l01, it involves only a few core functions:

      • Nrf_esb_init---Initialize an ESB
      • Nrf_esb_enable---Enable ESB
      • NRF_ESB_ADD_PACKET_TO_TX_FIFO---Sending data into the Send queue

If you want to know if the sending is successful, the status can be used:

      • void Nrf_esb_tx_success (uint32_t tx_pipe, int32_t rssi)//If an ACK is received, we send another packet.
      • void nrf_esb_tx_failed (uint32_t tx_pipe)
      • void Nrf_esb_rx_data_ready (uint32_t rx_pipe, int32_t Rssi)
      • void nrf_esb_disabled (void)

The overall architecture is relatively simple:

Ii. NRF51822 and NRF24LE1/NRF24LU1/NRF24L01 Communications

The nrf51 is similar to the other three types of 2.4G module communication, which is slightly more complex than its own, and its configuration flow is as follows:

    • BOOL Nrf_esb_set_enabled_prx_pipes (uint32_t pipes)

For the Enable Receive channel, the NO. 0 bit corresponds to Channel 1, and so on, can simultaneously enable multiple channels

    • BOOL Nrf_esb_set_crc_length (nrf_esb_crc_length_t length)

Set the CRC check to make sure that the sender and receiver are consistent

    • BOOL Nrf_esb_set_output_power (nrf_esb_output_power_t Power)

Set transmit power, selectable power from 4~-20,4 to steps

    • BOOL Nrf_esb_set_channel (uint32_t Channel)

Set the frequency of the wireless communication. Wireless frequency = (2400 + channel) mhz,0 <= channel <= 125.

    • BOOL Nrf_esb_set_datarate (nrf_esb_datarate_t datarate)

Set communication rate: Optional 250kbps,1m,2m

    • NRF51822 2.4G Communication is the trouble is the address settings, and NRF24LXX series of wireless chip address is different, NRF51822 2.4G communication address is composed of two parts, configure the address need to set Basen and Prefixn register, and to specify Basen The address length in. In addition, the NRF51822 address must be first swapped in bits per byte to match the NRF24LXX series.

nRF24LE1-Side Address settings:

uint8_t Tx_address[5] = {0XE5,0XE4,0XE3,0XE2,0XE1}; Address definition

Hal_nrf_set_address (hal_nrf_tx,tx_address); Set nRF24LE1 launch Address

NRF51822-Side Address settings:

(void) nrf_esb_set_address_prefix_byte (0,0xe5);

(void) nrf_esb_set_base_address_0 (0xe1e2e3e4);

(void) nrf_esb_set_base_address_length (nrf_esb_base_address_length_4b);

    • void Nrf_esb_enable_dyn_ack (void)

Enable Dynamic Data length

ESB:enhanced Shockburst, enhanced burst mode.

Enhanced Shockbursttm mode more than Shockburst mode to confirm the data transmission signal, to ensure the reliability of data transmission. Enhancedshockburst Transceiver Mode, the use of on-chip first-in-first-out stack area, data low-speed from the microcontroller feed, but high-speed (1Mbps) emission, so as to maximize energy efficiency and RF protocol related to all high-speed signal processing on-chip, this practice has three major benefits:

    • Try to conserve energy.
    • Low system cost (high-speed RF emission is also possible for low-speed microprocessors).
    • The data has a short dwell time in the air, reduces the chance of collision and provides anti-jamming performance.

PostScript:nRF51822 running in traditional 2.4G mode can be compatible with some of the previous 2.4G modules to make a more personalized communication network. But more time nRF51822 used in the BLE field, such as Bong hand ring, Baidu bracelet and other devices. But running in ble mode requires a BLE protocol stack, which is much more complex than running in classic 2.4G mode.

@nRF51822 Basic Experiment Series:

[nRF51822] 7, basic experimental Code Analysis Daquan (top ten)

[nRF51822] 8, basic experimental code Analysis Daquan · Experimental 11-ppi

[nRF51822] 9, basic experimental code Analysis Daquan · Experimental 12-ADC

[nRF51822] 10, basic experimental code Analysis Daquan · Experimental 15-RTC

[nRF51822] 11, basic experimental Code Analysis Daquan · Lab 16-Internal Flash read/write

[nRF51822] 12, basic experimental code Analysis Daquan · Experimental 19-PWM

@beautifulzzzz -The Internet of Things & ubiquitous computing practitioners
e-mail: [Email protected]
I-blog:blog.beautifulzzzz.com

[nRF51822] 13, talking about nRF51822 and NRF24LE1/NRF24LU1/NRF24L01 Classic 2.4G module wireless communication configuration and flow

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.