This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

MAX_RT interrupt still happens even if retransmit is off

Dear Nordic,

I met a problem while using nRF24L01+ about MAX_RT interrupt.

In my codes, I disabled RF HW retransmit (hal_nrf_set_auto_retr(0, RF_RETRANS_DELAY);) because I use our software codes to handle retransmit. Therefore, RF should not report "HAL_NRF_MAX_RT" interrupt. However, I still receive "HAL_NRF_MAX_RT" in very rare situations. I saw twice so far for a very long time.

My question is since RF module auto retransmition is off, why does nRF24L01+ still report "HAL_NRF_MAX_RT" interrupt?? Is this nRF24L01+ bug? Or how could I do to get rid of these
MAX_RT interrupt?

  • Hi

    That looks fine, I guess it's a slightly different implementation of the hal_nrf libraries. 

    Did you add the dynamic ACK configuration?

    If yes, did it change the behavior?

    If it still doesn't work, can you send me the code you use to upload packets, and a printout of your config register after you have configured the device?

    Best regards
    Torbjørn

  • Hi Torbjorn,

    I check my code. I use `hal_nrf_write_tx_pload()` to send payload.

    I want to try your codes, but I found my nRF libraries does not have `hal_nrf_write_tx_payload_noack(..)` this function. Could you paste this function to me?

    Another question: I saw you call `hal_nrf_set_rx_payload_width(HAL_NRF_PIPE0, 8);`. My question is since we already enable dynamic payload `hal_nrf_enable_dynamic_payload(true);`, why do we still need to call set payload width?

    By the way, the data rate in my test is 250K bps (yours is HAL_NRF_2MBPS). I think this will not affect anything, but still mention this difference.

  • Hi 

    The function looks like this:

    void hal_nrf_write_tx_payload_noack(const uint8_t *tx_pload, uint8_t length)
    {
      hal_nrf_write_multibyte_reg(W_TX_PAYLOAD_NOACK, tx_pload, length);
    }

    It is identical to the normal TX function, except the command byte is 0xB0 (W_TX_PAYLOAD_NOACK) instead of 0xA0 (W_TX_PAYLOAD).

    harryAI said:
    Another question: I saw you call `hal_nrf_set_rx_payload_width(HAL_NRF_PIPE0, 8);`. My question is since we already enable dynamic payload `hal_nrf_enable_dynamic_payload(true);`, why do we still need to call set payload width?

     You are correct. There is no need to set the payload length when using dynamic payload length, and this line can safely be removed from the code. 

    harryAI said:
    By the way, the data rate in my test is 250K bps (yours is HAL_NRF_2MBPS). I think this will not affect anything, but still mention this difference.

     Thanks for the information. I agree this should not make a difference in this case. 

    Best regards
    Torbjørn

  • In my library, I did not find `W_TX_PAYLOAD_NOACK`, but I find `WR_NAC_TX_PLOAD` below. I think the definition of `W_TX_PAYLOAD_NOACK` is the same as`WR_NAC_TX_PLOAD`, right? Please double confirm in case any unexpected issue happens.

    #define WR_NAC_TX_PLOAD 0xB0

  • Hi

    As long as the value is 0xB0 the name is irrelevant, so you can use that define, yes Slight smile

    Best regards
    Torbjørn

Related