24L01/SI24R1调试笔记

1、SPI MSB优先,8Bit寄存器地址与内容;

2、寄存器结构与之前使用的LT8900不同,分为R、W寄存器与特殊功能寄存器;

3、特别注意:在TX、RX、RT中断或者轮询后置1,必须写1清零清除相应的FIFO,否则第二次无法进入中断(IRQ无法拉低,维持高电平);

4、在多对一工作模式下,RX各管道设置对应唯一的地址,TX的地址统一设置TXADDR与RXPIPE0,详细设置见下图:


24L01/SI24R1调试笔记_第1张图片


说明:

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_Debug
		printf("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);				
	#endif		
	SetRF2G4Reg(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_Debug
		printf("Set RF to TX mode!\n");
	#endif
}


你可能感兴趣的:(Soft)