Switching nRF2401 from RX to config mode

Note that according to the datasheet, when the '2401 is in RX mode, it will drive the DATA line as soon as DR1 goes high.

Most code I’ve seen doesn’t take this into account and sets the microcontroller IO pin that drives DATA to output before raising CS. There is therefore a possibility of both '2401 and microcontroller driving DATA at the same time. ‘Bad things’ could happen if they drive the line at different levels which could happen depending on the first bit of received data! This would mostly be a small window of (in)opportunity between testing DR1, finding it zero, deciding to change mode and setting CS, but like all such windows, someone, somewhere will hit it. Whether the chip survives such abuse, I don’t know and if it does, would the chip’s config survive?

The simplest fix is to raise CS before setting the IO pin to output. (Yes CE is lowered first, but that doesn’t stop the '2401 driving the DATA line.)

Adding a resistor between the microcontroller and '2401 would limit the current to safe levels and shouldn’t be a problem - the Nordic SPI to '2401 document uses series resistors after all.

Orin.