de-activating ARD

Reference: first consult as Case id. 305571
Replyed by Tobjorn

I have a working proyect in wich 485 cable communication was replaced with NRF24L01+ but I need some help:

One PTX has bi-direccional comunication with several PRX in a sequential order as original schema for 485

PTX changes address using diferent ones for each PRX and had used PIPES 0, 1 and 2 in each PRX

Data can be sent from PTX and replied from PRX as ACK payload , automatic payload length.

Most usually there are 1 to 6 bytes ack payload at 1Mhz and it works fine with 250us ARD

For 8 bytes in the ACK payload ARD needs to be increased to more than 500us  as data sheet states 

 When testing with 8bytes of course default 250us  was not  suficient and not ACK was received in PTX (never)

At first I try to deactivate the automatic retrasmition with 00 value in Reg.04 but it remains with no ACK

Default is hex 03 -> 250us ARD and max.retry 3

It works fine with hex 10 or 20 and I left 20 for 750 us and no retry


--- Please explain me the reason of having no results with 00 value.

__________________________________________________________________

Monitoring RX packets:

I have used a separeted PRX device (Monitor) setted for no ACK and with the same address as the PRX under test

In this Monitor I can found at SPI MISO the packets sent from PTX but not the normal ACK payload reply

I guess there is a diferent format but I can´t find information in data sheet

But when there is the case of default 03 value in Reg04, I can see the original packet from PTX
and the 3 retryedACK Payload after the ARD elapsed !!!

I veryfied with hex 05 in PTX Reg04 and number of packets changes to 5

It seems to be diferent packet format for PTX tx sent , ACK payload and the retryed ACK payload

--- Please explain me if there are some way to observe the ACK Payload in a separate PRX device.

I can send some captures with Saelae 8 ch and with Kingst LA1010 if someone asks.

Best Regards, Osvaldo Hojvat

Parents
  • Hello,

    We don't provide support for the nRF24L01+ anymore, but some comments:

    If you want to receive an ACK payload, the ARD delay need to be set accordingly to the ACK payload size (even if the number of retransmissions are 0).

    If you have two PRX with same address, then this will cause issues, because both PRX will try to ACK, the two ACK will collide on-air and likely cause the PTX from receiving any ACK.

    Kenneth

  • Thak you for the reply.

    I have a second PRX with same address but ACK disabled.

    Ÿou had confirmed what I guess about ARD settings.

    Data sheet do not mention that ARD is not disabled with Reg.04 = 00.

    I find  other unexpected thing 

    In some specific mensaje there is an ACK received at the expected time but there is not an IRQ at the PRX, so PRX lost ínfomation

    This arises about 3 times each 10 so it is no problem for me. Request info again.

    Best regards. Osvaldo

  • upper channels for PTX (named MIRF)

    lower for PRX (Mando)

    marked with white rectangle , there is no IRQ at PRX but there is ack and payload at PTX

  • o.hojvat said:
    I have a second PRX with same address but ACK disabled.

    A PTX can choose to disable ACK when transmitting a packet, but a PRX will always ACK if requested by a PTX.

    A PRX may not generate an interrupt if the received packet is considered the same as a previous packet from the PTX.

    Kenneth

  • Hi Kenneth

    Thank you for your comments.

    About ACK ok but no IRQ I may investigated more when I will finish solving many details in my proyect.

    About the PRX I used as Monitor ,I is working with not sending ACK as you can see in th attached pdf , LA1010 capture.

    There are .txt explaining the picture and the instructions sent for NRF setting.

    Anyway this Monitor PRX only can receive the PTX packets.

    In a before sent picture with the normal PRX and the Monito PRX , I see in the Monitor several ACK sent when retry number was 3 or five because low ARD pevents ACK at PRT

    This matter at the moment is not important to me because I guess I will no need more the Monitor PRX.

    I have an NRF board with the Tx burned beacuse a short circuit.

    I can use it in the Monitor PRX to be sure It can't Tx nothing

    Best Regards, Osvaldo

Reply
  • Hi Kenneth

    Thank you for your comments.

    About ACK ok but no IRQ I may investigated more when I will finish solving many details in my proyect.

    About the PRX I used as Monitor ,I is working with not sending ACK as you can see in th attached pdf , LA1010 capture.

    There are .txt explaining the picture and the instructions sent for NRF setting.

    Anyway this Monitor PRX only can receive the PTX packets.

    In a before sent picture with the normal PRX and the Monito PRX , I see in the Monitor several ACK sent when retry number was 3 or five because low ARD pevents ACK at PRT

    This matter at the moment is not important to me because I guess I will no need more the Monitor PRX.

    I have an NRF board with the Tx burned beacuse a short circuit.

    I can use it in the Monitor PRX to be sure It can't Tx nothing

    Best Regards, Osvaldo

Children
  • Picture explained

    Channels have a number at the left but the order top to bottom is

    0 1 2 4 12 5 15 6 7 8 10 11


    The upper channel (0) is PTX ACK

    There are 3 ACK at the left, but they are from 3 no ACK packets (PIPE 0 Tx) , PTX IRQ by Tx sent

    They was sent for all the 6 PTX that may be used - They have same PIPE 0 address

    The only PRX working in this test is the modifyed only Rx ( no Rx ACK )

    Ch 12 (orange) is for PTX CE - There are 6 Tx packets for PRX with diferent PIPE1 address

    The sequence is Address for PIPE1
    5A 5A F1 - 5A 5A E1 - 5A 5A D1 - 5A 5A C1 - 5A 5A B1 - 5A 5A A1

    There are about 20 ms with no packets sent and the same again

    The last of the group is sent for the same address as the Test PRX

    Ch 6 (red) , position 8 , shows IRQ at the PRX - 3 at the left has 213 us delay from each CE

    There are one IRQ in the middle and one at the rigth , received at PIPE1 , with ACK requested
    but this version of PRX has not sent any ACK

    _________________________________________________________________

    _________________________________________________________________

    CODE   (Reg 0x 21 setted  to  0)

    PRX:
    ; 1) Set the PWR_UP bit and PRIM_RX bits in the CONFIG register -
    bcf CSN ; Open NRF SPI
    MOVLW B'00100000' ;20 write reg 0 - CONFIG (command 001aaaaa = write to aaaaa register
    CALL SEND
    MOVLW B'00111011' ;Bit6 low: IRQ for Rx received,bit 1 = POWER_ON ;1 byte CRC , PRX mode
    CALL SEND
    bsf CSN ; close SPI

    ; 2) Set DYNPD to 0x3F ; registro 1C
    bcf CSN ;
    MOVLW B'00111100' ;3C write reg 1C - DYNPD - b'00111100' = (0x20 + 0x1C)
    CALL SEND
    MOVLW B'00111111' ; dynamic PD all channels
    CALL SEND ;
    bsf CSN
    nop
    ; 3) Set the EN_DPL bit in the FEATURE register - ahora los tres
    bcf CSN ;
    MOVLW B'00111101' ;31 write reg 1D - FEATURE - b'00111101' = (0x20 + 0x1D)
    CALL SEND
    MOVLW B'00000111' ; dynamic PD and EN_DYN_ACK enabled ; para tx con ack con payload
    CALL SEND ;
    bsf CSN

    =================================================
    nop ; Set EN_AA to 0
    bcf CSN ;
    MOVLW B'00100001' ;0x21 write reg 01 - EN_AA enable autoack
    CALL SEND_A ; nacen activados
    MOVLW B'0000000' ;******* disable for all pipes ********
    CALL SEND_A ;
    bsf CSN
    =================================================

    nop ; .............. flush Tx fifo ..................
    bcf CSN
    movlw 0xE1 ; b'11100001'
    call SEND_A
    bsf CSN
    nop
    ;.............. flush Rx fifo ..................
    bcf CSN
    movlw 0xE2 ; b'11100001'
    call SEND_A
    bsf CSN
    nop
    ;............... clear STATUS Flags .............
    bcf CSN ; Open NRF SPI
    MOVLW B'00100111' ;27 write reg 0 - STATUS (command 001aaaaa = write to aaaaa register
    CALL SEND_A
    MOVLW B'01110000' ; rx tx max retry se borran con 1
    CALL SEND_A
    bsf CSN ; close SPI
    nop
    ;--------- cargo Nº de canal default 5 o modificado en setup (caso contrario NRF usa el 2)
    bcf CSN ; ;
    MOVLW B'00100101' ; 0x25 write reg 5 frec RF
    CALL SEND_A
    movf N_Canal,w ; default canal 5 fué leido en el inicio ; numero de canal de RF 5 o modificado
    CALL SEND_A ; sin poner nada es 2
    bsf CSN
    nop
    ; ############# def addrees segun num. de mando deseado ###############
    ; habilitar todos los pipes a usar - default solo 0 y 1 habilita el 2
    bcf CSN
    MOVLW B'00100010' ;22 write reg 2 - PIPES habilitadas
    CALL SEND_A
    MOVLW B'00000111' ; PIPES 0, 1 y 2 habilitadas
    CALL SEND_A
    bsf CSN ; close SPI
    nop
    ; set address wide de 5 paso a 3 bytes
    bcf CSN
    MOVLW B'00100011' ;23 write reg 3 - para cant bytes de addreee
    CALL SEND_A ; acepta de 3 a5
    MOVLW B'00000001' ; 3 bytes 0k
    CALL SEND_A
    bsf CSN ; close SPI
    nop
    ; Txaddress no se usa en PRX

    ; ............... Set RX Address PIPE0 , 1 y 2 en el inicio - no se modifican ...............
    ; RX PIPEs addr - esto indentifica a cada mando y si es para PIPE1 y PIPE2
    ; para PIPE0 , el mismo para todos los mandos
    bcf CSN
    MOVLW B'00101010' ;2A write reg A - PIPE0 addr
    CALL SEND_A
    MOVLW 0x3B ; LSB
    CALL SEND_A
    MOVLW 0x5A ;
    CALL SEND_A
    MOVLW 0x5A ;
    CALL SEND_A
    bsf CSN

    ; set addr. PIPE1 - cambia LSB según el num. de mando elegido (10-12-13-14-15-20)
    ;;; call ControlNumMando ; tarda 7us
    ;;; swapf Mdo,w ; (de 0 a 5)
    movlw 0xA1 ;;;************** mando 10 fijo ;;;; addlw 0xA1
    movwf Arg1 ; ( A1-B1-C1-D1-E1-F1)
    bcf CSN
    MOVLW B'00101011' ;2B write reg B - PIPE1 addr
    CALL SEND_A
    movf Arg1,w ; LSB 0xA1 fijo
    CALL SEND_A ;
    MOVLW 0x5A ; uso 5A - lo mismo que para PIPE0
    CALL SEND_A ; pero podria poner algo disntinto
    MOVLW 0x5A ; es mas confuso y no tiene ventajas
    CALL SEND_A ; mas simple en el MIRF - menos bytes
    bsf CSN ; para cambiar en cada call y Tx del MIRF
    nop
    ; set addr. PIPE2
    bcf CSN
    MOVLW B'00101100' ;2C write reg C - PIPE2 addr
    CALL SEND_A
    incf Arg1,w ; LSB queda 0xA2
    CALL SEND_A ; los otros Bytes son 5A = a los de PIPE1
    bsf CSN ; - no se pueden cambiar
    ; Tx address no interesa en PRX
    ; ................ fin SetAddr ............

    ;.... elijo frec datos 2M 1M 250K
    nop
    bcf CSN
    movlw 0x26 ; reg 6
    CALL SEND_A
    movlw b'00000110' ; 1M aumenta el alcance 2m , de 6m a 8m aprox
    ; ; movlw b'00001110' ; 2M
    ;; movlw b'00100110' ; 250k ;;; NO ANDA _> aumentar ARD en MIRF
    CALL SEND_A
    bsf CSN
    nop
    ;............................


    ; ****************** fin de copiadas- adapted from MandoRx , ajusted for mando 10 address ***********
    ; 4) Set CE high
    bsf CE ; set RF ON for Rx - queda fijo en alto para modo PRX

    ______________________________________________________________

    Address used for Mando 10 are the same here for this RX only - no ACK

    PIPE0 5A 5A 3B

    PIPE1 5A 5A A1

    PIPE2 5A 5A A2

Related