I tried few nRF24L01+ modules using several examples including basic one that came with the NRF library or that illustrated by several contributors. The modules only work the first time they are connected, after uploading a new program all modules fail at radio.begin() and all print details output zero info.
The power during different tries are either 2AA batteries or nRF24L01 mount (sold separately and more than one tried).
None of the modules seem to have apparent physical damage, hot etc or shorted between different pins (apologies this is my knowledge limit). During test all pins are connected firmly and correctly and simplest proof is that it does work fist time for any period of time.
I have added debug points to the NRF library and it appears write_register operations do not take effect.
The main questions I have are:
is it possible under a given settings programming arduino somehow corrupts the module firmware, and if so can it be recovered?
Is there a way to physically test the module for damage?
I can't look closer at your code right now, but I do remember that the radio can get itself jammed, somehow.
A power cycle reset clears it up. This may explain your works once observation.
It still may mean you are placing it in that state inadvertently through something in the code.
As for your questions, no and no.
Although it can get confused, you can't harm the moduke firmware and there is no reflashing or reprogramming that I know of.
And aside from seeing obvious damage, the only test available is to go back to a circuit you did not mess with and code you did not alter form examples taken from tutorials or other explainers. And see if a pair of radios works.
Did you build a pair of these and see them work just slavishly following every step of a legitimate tutorial? There are quite a few, all hammer at some essential points. among which find themselves
use adequate power and a filter capacitor of some good size
separate the two Arduino+NRF24L01 units by a few meters at least
Several Tutorials were tried in their basic layout and code. That code has undergone several modifications to replace functions or change their order (e.g. add Serial.begin(xxx) before or after or introduce delays ets) and introduce debug points in the RF24 library itself to track the probelm with no give. Both receiever and transmitter functions where tried separately and fail at the first upload, and as readio.begin() fails there is not much TX/ RX test I can follow with.
I may try a capacitor even though these are 18650 batteries with ample power and I believe are very stable.
You haven't said you ever saw the radio set performing to specifications.
So do, say that, and post the actual code and schematic you used when you enjoyed that success.
If you have never seen the radio set work, stop making changes and additions and work on getting the "hello world!" to work. Again, code you did not mess with and a schematic you followed to the letter.A link to the tutorial woukd be nice.
Code whether original or modified works if already loaded on the Arduino. Once I upload a change whilst the module is connected or possibly restart the power to the module (and arduino) radio.begin fails. This is no an isolated case but 3 modules thus far endured this problem.
This may be the key to the problem. The Arduino and the nRF do not both reset when the Arduino is reset or only the Arduino power is removed. Remove power to BOTH devices and power them both at the same time. See if that helps. Or if not possible, remove power to the nRF and Arduino and power the nRF first and then the Arduino.