NRF52832 ESB RADIO timing question

Hi, I have a question to ask:I am using ESB demo as the communication framework. One master corresponds to two slaves, but occasionally there are some problems. Please see the following figure first:

The figure shows some important moments, such as tx/rx ready disable signal, which I believe you can understand.When problems occur:The master sends the message, and then the slave can receive the message normally. You can see that the end/disable signals of the master and the slave are aligned. (end short with disable)

When the slave replies to the message, the master's disable signal cannot be aligned with the slave's disable signal, which is delayed by hundreds of us. This place is abnormal. When such timing occurs, our equipment will work abnormally.

I would like to ask the following questions:

1. What are the possibilities of disabling without alignment, like the above figure,had you met this before?

2. What does radio produce end signal depend on? Depends on the received payload length? If the slave sends a length = 10, but the master recognizes it as 20 due to interference, will it keep the acceptance time of 20 bytes?

3. Does the end signal generated by radio depend on a specific packet tail? If the end signal is generated only after the tail of the packet is recognized, is the scenario in the figure waiting because the tail of the packet is not received?

I would appreciate it if you could answer these questions。

Parents
  • The figure shows some important moments, such as tx/rx ready disable signal, which I believe you can understand.When problems occur:The master sends the message, and then the slave can receive the message normally. You can see that the end/disable signals of the master and the slave are aligned. (end short with disable)

    When the slave replies to the message, the master's disable signal cannot be aligned with the slave's disable signal, which is delayed by hundreds of us. This place is abnormal. When such timing occurs, our equipment will work abnormally.

    I would like to ask the following questions:

    1. What are the possibilities of disabling without alignment, like the above figure?

    2. What does radio produce end signal depend on? Depends on the received payload length? If the slave sends a length = 10, but the master recognizes it as 20 due to interference, will it keep the acceptance time of 20 bytes?

    3. Does the end signal generated by radio depend on a specific packet tail? If the end signal is generated only after the tail of the packet is recognized, is the scenario in the figure waiting because the tail of the packet is not received?

    I would appreciate it if you could answer these questions

  • Hi

    Which SDK are you working with?

    Liny said:
    1. What are the possibilities of disabling without alignment, like the above figure?

    On the PTX side the receiver will be disabled by a timer, if no ACK packet is received within a certain time. In this case there will be no close alignment between the PTX and PRX. When this problem occurs what kind of interrupt do you get on the PTX side? Does it report TX success or TX failure?

    Liny said:
    2. What does radio produce end signal depend on? Depends on the received payload length?

    Yes, if you are transmitting or receiving a packet the end signal will depend on the payload length, as well as some other radio parameters such as bitrate, address length and CRC length.

    As I said earlier, if no packet is received in a certain amount of time when a PTX device is listening for the ACK, then the radio will be disabled by a timer. In this case it will then proceed to retransmit the same packet again, unless the retransmit limit is already reached. 

    Liny said:
    If the slave sends a length = 10, but the master recognizes it as 20 due to interference, will it keep the acceptance time of 20 bytes?

    Yes. If a bit error causes the length field to be read as 20 the radio will receive all 20 bytes, and then proceed to read the CRC after the payload. In this case the CRC check should fail, causing the packet to be discarded (unless you are very unlucky and happen to read a valid CRC value by accident). 

    Please note that the radio will never receive a payload longer than the MAXLEN field ind the PCNF1 register. If the length field is longer than MAXLEN the radio will only read out a number of bytes equal to MAXLEN. 

    Liny said:
    3. Does the end signal generated by radio depend on a specific packet tail? If the end signal is generated only after the tail of the packet is recognized, is the scenario in the figure waiting because the tail of the packet is not received?

    No, there is no 'end of packet' symbol to indicate where the packet is over. The radio will assume that the packet is finished after receiving the CRC, and trigger the END event. 

    Best regards
    Torbjørn

  • thank you very much!!

    you said:"Yes. If a bit error causes the length field to be read as 20 the radio will receive all 20 bytes, and then proceed to read the CRC after the payload. In this case the CRC check should fail, causing the packet to be discarded (unless you are very unlucky and happen to read a valid CRC value by accident). 

    Please note that the radio will never receive a payload longer than the MAXLEN field ind the PCNF1 register. If the length field is longer than MAXLEN the radio will only read out a number of bytes equal to MAXLEN. 

    "

    question:could i use MAXLEN to avoid this problem?

    1.if i set MAXLEN to 20, slave send length = 30bytes

    Will the master generate an end signal after receiving 20 bytes?

    Or will the end signal be generated after receiving 30 bytes, but only 20 bytes will be read when reading?

    2.if i set master MAXLEN to 20 ,can master send 30 byte data?it's send ,not receive. 

    regards.

  • Hi

    You still didn't tell me which SDK you are using, but assuming you are using the nRF Connect SDK there is a parameter called CONFIG_ESB_MAX_PAYLOAD_LENGTH which will control the MAXLEN parameter. 

    If you set this parameter to 20 then MAXLEN would be set to the same, and any packet above 20 bytes would be truncated. 

    Liny said:

    1.if i set MAXLEN to 20, slave send length = 30bytes

    Will the master generate an end signal after receiving 20 bytes?

    Or will the end signal be generated after receiving 30 bytes, but only 20 bytes will be read when reading?

    The master will generate the end signal after receiving 20 bytes of payload and the CRC, yes, but keep in mind that the CRC check will fail since what the radio thinks is the CRC is actually parts of the payload (payload bytes number 21 and up). 

    Liny said:
    2.if i set master MAXLEN to 20 ,can master send 30 byte data?it's send ,not receive. 

    No. MAXLEN limits both how much you can send, and how much you can receive. In this case you would need to change the MAXLEN parameter before sending a packet, and then change it back when you want to receive. 

    Best regards
    Torbjørn

  • thanks for your help!!!have  a good day

Reply Children
Related