NRF24L01 ack problem

Hi

im having problems with ACK - my transmitter is set to repeat trasnmission for 15 times and then the MAX_RT irq appeard. I dont know why - all the adresses are equal - i mean an adresses of Tx_addr, RxP0 and reciver’s RXP0, the freq channels are the same, then length of data also is set to 16b for each side

here’s my code for transmitter (pic16f684)

unsigned  char txAddr[5]={0x34,0x43,0x10,0x10,0x01};

status = SPI_write_reg(0x20,0x0e);  
	status = SPI_write_reg(0x21,0x01); 	
	status = SPI_write_reg(0x22,0x01);   
	status = SPI_write_reg(0x23,0x03);	
	status = SPI_write_reg(0x24,0xFF);	
	status = SPI_write_reg(0x25,0x02);	 
	status = SPI_write_reg(0x26,0x07);	
	status = SPI_write_reg(0x27,0x70);	
	SPI_write_buffer(0x30,txAddr,5);
	SPI_write_buffer(0x2A,txAddr,5);  
        SPI_write_reg(0x31,0x10);

and for receiver (at91sam7s128)

status = SPI_write_reg(0x20,0x0f);  
	status = SPI_write_reg(0x21,0x01); 	
	status = SPI_write_reg(0x22,0x01);   
	status = SPI_write_reg(0x23,0x03);	
	status = SPI_write_reg(0x24,0xFF);	
	status = SPI_write_reg(0x25,0x02);	 
	status = SPI_write_reg(0x26,0x07);	
	status = SPI_write_reg(0x27,0x70);	
	SPI_write_buffer(0x2A,txAddr,5);  
        SPI_write_reg(0x31,0x10);

when ack is off all works fine, maybe i missed something in my configuration ?

Keep in mind that with auto-ack, the RX will act as a TX briefly when it acknowledges a packet. It does not appear that you have changed the TX address of your RX unit in your code, which would make sense for the TX unit not getting the acknowledgement back.

thx for help, i missed it somehow, now it seems to “work”, but the results are wrose then without ack - i got while loop which sends a one 16 bytes length packet to the recevier, and i got view on the terminal, when im using ack, i can see that not all packets are recived, there are a lot of pauses with receivng, (within that pause, i mean, receiver behave as there is no incomming packet) When i set no ack - on the terminal i can see all packets which were send. Have you got any clues why that thing happens ?

For one thing, you’re setting the retransmit delay to its maximum value in the ARD field of the SETUP_RETR register. When you write the register, you should be sending the value 0x30 instead of 0xFF. Also, the value you’re writing to the RF_DR bit of the RF_SETUP register is 0, which means you’re sending at 1 Mbps. Change this to a 1 and you’ll send at double the rate (you would then be writing 0x0F to the register instead of 0x07).