Microchip
直播中

张变英

7年用户 183经验值
私信 关注
[问答]

MRF24J40无法同时获得多个RX

你好,我用的是MRF24J40,它是一个带有1个PAN协调器和1到8个连接设备的星形盘。PAN协调器运行Linux,并用C++编写。该设备在C中实现智能化,PAN协调器与设备之间的通信工作良好。当2个设备同时向PAN协调器发送帧时,仍然存在一个问题。PAN协调器在那时接收OR 1帧。有没有办法处理INTGPIO来处理多个RX?谢谢)

以上来自于百度翻译


      以下为原文

    Hi,

I'm using the MRF24J40 for a star PAN with 1 PAN Coordinator and 1 to 8 connected devices. The PAN Coordinator runs Linux and is written in C++. The devices are witten in C.

The communication between the PAN Coordinator and the devices works fine. There is still an issue when 2 devices send a frame to the PAN Coordinator at the same time. The PAN Coordinator receives ony 1 frame at the time. Is there a way to handle the INT GPIO to handle multiple RX ?

Thanks :)

回帖(2)

阮浙临

2019-4-22 13:17:54
RX中断一次处理一帧。我不知道有什么办法让它等待多个帧。MRF24J40中的接收FIFO仅足够深,一次处理一个最大大小的帧。发送PAN协调器的帧请求确认帧吗?如果是这样,他们都报告传输成功吗?还是报告传输失败?

以上来自于百度翻译


      以下为原文

    The Rx interrupt handles one frame at a time.  I don't know of any way to have it wait for multiple frames.  The receive FIFO in the MRF24J40 is only deep enough to handle one maximum sized frame at a time.
 
Do the devices sending frames to the PAN coordinator request an acknowledgement frame?  If so, do they both report that transmission was successful?  Or does one report an transmission failure?
举报

曹玥

2019-4-22 13:32:29
您好,是的,设备请求确认(协调员也)。我必须用嗅探器进行测试,以确认它们都报告了一个成功的传输,但我记得是这样的。我启用ACK请求,并清除RXMCR寄存器中的AcKEN位。TXNCON寄存器也被配置为帧重传。我确实有其他问题(尤其是关于如何检测传输失败),但我可能会启动一个新线程。

以上来自于百度翻译


      以下为原文

    Hello,
Yes, the devices request an acknowledgement (the Coordinator too). I have to test with my sniffer to confirm that they both report a successful transmission but I remember that it was the case. I enable ACK request and I clear the ACKEN bit in the RXMCR register. The TXNCON register is also configured for frame retransmission.
 
I do have other questions about that (especially about how to detect a transmission failure) but I'll probably start a new thread.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分