Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. TMRh20Projects
    3. Best
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by TMRh20Projects

    • RE: Are we initializing the nRF24L01+ correctly?

      I've been suspicious of the order of operations in the begin() function of the RF24 driver.

      Specifically these lines:

        // Reset current status
        // Notice reset and flush is the last thing we do
        write_register(NRF_STATUS,_BV(RX_DR) | _BV(TX_DS) | _BV(MAX_RT) );
      
        // Set up default configuration.  Callers can always change it later.
        // This channel should be universally safe and not bleed over into adjacent
        // spectrum.
        setChannel(76);
      
        // Flush buffers
        flush_rx();
        flush_tx();
      
        powerUp(); //Power up by default when begin() is called
      
        // Enable PTX, do not write CE high so radio will remain in standby I mode ( 130us max to transition to RX or TX instead of 1500us from powerUp )
        // PTX should use only 22uA of power
        write_register(CONFIG, ( read_register(CONFIG) ) & ~_BV(PRIM_RX) );
      

      Theoretically, I think it may be best to reset the IRQ flags and flush the buffers after powering up and entering standby, but the failures are a bit sporadic, so I haven't been able to verify if this will reduce/prevent issues on resetting. A larger user base or additional testing may be able to prove it one way or the other, so thought it worth mentioning.

      posted in Development
      TMRh20Projects
      TMRh20Projects