24L01/SI24R1調試筆記

來源:互聯網
上載者:User

1、SPI MSB優先,8Bit寄存器地址與內容;

2、寄存器結構與之前使用的LT8900不同,分為R、W寄存器與特殊功能寄存器;

3、特別注意:在TX、RX、RT中斷或者輪詢後置1,必須寫1清零與清除相應的FIFO,否則第二次無法進入中斷(IRQ無法拉低,維持高電平);

4、在多對一工作模式下,RX各管道設定對應唯一的地址,TX的地址統一設定TXADDR與RXPIPE0,詳細設定見:


說明:

The PRX, using multiceiver and Enhanced ShockBurst, receivespackets from more than one PTX. To
ensure that the ACK packet from the PRX is transmitted to the correct PTX, thePRX takes the data pipe
address where it received the packet and uses it as the TX address whentransmitting the ACK packet.
Figure 12. is an example of how address configuration could be for the PRX andPTX. On the PRX the
RX_ADDR_Pn, defined as the pipe address, must be unique. On the PTX the TX_ADDRmust be the same
as the RX_ADDR_P0 and as the pipe address for the designated pipe.

   No other data pipe can receivedata until a complete packet is received by a data pipe that has detected its

address. When multiple PTXs are transmitting to a PRX, the ARD canbe used to skew the auto retransmission
so that they only block each other once.


詳細請參見24L01 DS.


附:Demo設定TX ,RX

void SetRF_RX_Mode(void){uint16_t GetCurrRFChNo;Cls_CE();ClearRXFifo();SetRF2G4Reg(SETUP_AW,ADDR_WIDTH);  SetRF2G4Reg(RX_PW_P0,32);SetRF2G4Reg(RX_PW_P1,32);WriteRFADDR(RX_ADDR_P0,TX_ADDRESS,5);WriteRFADDR(RX_ADDR_P1,TX_ADDRESS1,5); SetRF2G4Reg(EN_AA,0x003);   SetRF2G4Reg(EN_RXADDR,0x03);   
SetRF2G4Reg(FEATURE, 0x04);      SetRF2G4Reg(DYNPD,0x03); SetRF2G4Reg(RF_CH,0x40);SetRF2G4Reg(RF_SETUP,0x07);     SetRF2G4Reg(CONFIG,0x0f);Set_CE();#ifndef RF_Debugprintf("Set RF to RX mode!\n");#endif}void SetRF_TX_mode(void){   uint16_t GetCurrRFChNo;Cls_CE();ClearTXFifo(); SetRF2G4Reg(SETUP_AW,ADDR_WIDTH);  SetRF2G4Reg(FEATURE, 0x04);      #if 0  WriteRFADDR(TX_ADDR,TX_ADDRESS,5);  WriteRFADDR(RX_ADDR_P0,TX_ADDRESS,5);#else  WriteRFADDR(TX_ADDR,TX_ADDRESS1,5);  WriteRFADDR(RX_ADDR_P0,TX_ADDRESS1,5);#endifSetRF2G4Reg(EN_AA,0x01);   SetRF2G4Reg(EN_RXADDR,0x01);   SetRF2G4Reg(DYNPD,0x01);  SetRF2G4Reg(RF_CH,0x40);SetRF2G4Reg(SETUP_RETR,0x13);   SetRF2G4Reg(RF_SETUP,0x07);     SetRF2G4Reg(CONFIG,0x0e);CurrentRF_Mode = RFTXD_Mode;Set_CE();#ifndef RF_Debugprintf("Set RF to TX mode!\n");#endif}

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.