nrf24l01+

nrf24l01+的datasheet比nrf24l01的datasheet要详细好多好多,在系统的状态机描述,以及异常情况的描述上。

nrf24l01+与nrf24l01的区别:

相比功耗有所降低。

250kbps传输模式。

数据包格式变化,添加数据长度段,实现变长数据包长度传输。

添加了no_ack,不需要应答flag。

接收端在应答的时候可以带数据了,一定程度上实现了全双工的通信。

An ACK packet can contain an optional payload from PRX to PTX. In order to use this feature, the 
Dynamic Payload Length (DPL) feature must be enabled. The MCU on the PRX side has to upload the payload by clocking it into the TX FIFO by using the W_ACK_PAYLOAD command. The payload is pending in the TX FIFO (PRX) until a new packet is received from the PTX. nRF24L01+ can have three ACK packet payloads pending in the TX FIFO (PRX) at the same time.

一个ack包可以包含一个从接收端到发送端的有效数据。需要使能Dynamic Payload Length (DPL)功能,接收端需要通过 W_ACK_PAYLOAD 命令把回送的有效数据送到

tx fifo中去。这些有效数据会一直保存在tx fifo中知道接收到新的从发送端发过来的数据包。nRF24L01+能同时保存三个应答有效数据。

Figure 7. shows how the TX FIFO (PRX) is operated when handling pending ACK packet payloads. From the MCU the payload is clocked in with the W_ACK_PAYLOAD command. The address decoder and buffer controller ensure that the payload is stored in a vacant slot in the TX FIFO (PRX). When a packet is received, the address decoder and buffer controller are notified with the PTX address. This ensures that the right payload is presented to the ACK generator.

图7显示 tx fifo在ack应答时是如何运作的。接收端通过 W_ACK_PAYLOAD 命令把回送的有效数据送到tx fifo中去,地址解码器和buf控制器确保有效数据被保存在空槽中。当接受

到一个数据包,地址解码器和buf控制器就获取到了发送端的地址,确保正确的数据被挂在正确的ack包中。

If the TX FIFO (PRX) contains more than one payload to a PTX, payloads are handled using the first in – first out principle. The TX FIFO (PRX) is blocked if all pending payloads are addressed to a PTX where the link is lost. In this case, the MCU can flush the TX FIFO (PRX) by using the FLUSH_TX command.

如果tx fifo有多个会送有效数据,先来的先发送。如果连接断开了,则tx fifo中的数据会被阻塞,这时候就需要用FLUSH_TX来清空fifo。

In order to enable Auto Acknowledgement with payload the EN_ACK_PAY bit in the FEATURE register must be set.

需要置位EN_ACK_PAY bit in the FEATURE register。


  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值