嗨,所有,我使用两个MRF89XA模块以两种方式进行
通信,使用16字节分组的包模式。这里是我的IRQ配置:这里是我发送一个包的方法,一旦FIFO被装入待机模式:没有延迟,什么都不发送和接收。由于延迟,数据被发送和接收。为什么需要这种延迟,而我没有看到在示例中需要这种延迟?勒欧
以上来自于百度翻译
以下为原文
Hi all,
I'm using two MRF89XA modules to communicates in both ways, using packet mode with 16 Bytes packets.
Here are my IRQ configura
tion :
registerConfig [FTXRXIREG] = IRQ0_RX_STDBY_FIFOEMPTY
| IRQ1_RX_STDBY_FIFOFULL | IRQ1_TX_TXDONE | IRQ1_FIFO_FULL_BIT
| IRQ1_FIFO_EMPTY_BIT | IRQ1_NO_FIFO_OVERRUN_OCCURED; // 0x9C
registerConfig [FTPRIREG] = AUTO_SYNCRO_WORD_DETECT | STOP_FILLING_FIFO
| TX_DONE | IRQ0_TX_START_FIFONOTEMPTY | DEF_IRQPARAM1
| IRQ1_RSSI_IRQ_LESS | IRQ1_PLL_NOT_LOCKER |IRQ1_PLL_LOCK_PIN_ON; // 0x39
Here is the way I send a packet once the FIFO is filled in standby mode :
MRF89AX_IRQ0_F = 0;
MRF89AX_IRQ1_F = 0;
MRF89AX_transmitterMode();
// __delay_ms(10);
while (!MRF89AX_RS.TxDone);
MRF89AX_RS.TxDone = 0;
MRF89AX_RS.ISMModeTxRx = 1;
MRF89AX_IRQ0_F = 0;
MRF89AX_IRQ1_F = 0;
MRF89AX_standByMode();
MRF89AX_receiverMode();
Without the delay, nothing is sent and received. With the delay, the data is sent and received.
Why is this delay required while I haven't seen that it is required in examples ?
Léo
0