IRQ pin stay low after several hours of use



  • I have an arduino pro mini 5V connected to an nrf24l01+

    my code is

    #define MY_DEBUG
    #define MY_RADIO_RF24
    #define MY_RX_MESSAGE_BUFFER_FEATURE
    #define MY_RF24_IRQ_PIN (2)
    #define MY_REPEATER_FEATURE
    
    #include <MySensors.h>
    
    MyMessage msg(0, V_CUSTOM);
    
    void setup()
    {
    }
    
    void presentation()
    {
    	sendSketchInfo("Test", "1.0");
    	present(0,  S_CUSTOM);
    }
    
    void loop()
    {
    }
    
    void receive(const MyMessage &myMsg)
    {
    	if (myMsg.type == V_CUSTOM && myMsg.sensor == 0) {
    		send(msg.set(F("pong")));
    	}
    }
    
    

    i send every minute a message to the node. But after some time the node is not responding.
    When i check the IRQ pin in the arduino (pin 2) and the nrf24l01+, this one is low. It means the nrf24l01+ has been received the last message but the interrupt has not been trigger.

    How can i fix this issue ? do you have a clue ?

    Thank you for your help



  • When reception is not working, the status register value is 0x40, so RX_DR stay set.
    I think the clear of RX_DR is not working very well. i will try to add

    RF24_setStatus(_BV(RF24_RX_DR))
    

    at the end of RF24_irqHandler function



  • @snyfir
    with this fix, everything work fine 😃


Log in to reply
 

Suggested Topics

  • 3
  • 6
  • 2
  • 6
  • 5

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts