OK, I need one of you super smartguys to take a look and tell me why this puts the photon into blocking and never returns. I verified yesterday that the radio basically works with printDetails can listen using the testCarrier function but if I attempt to do anything that calls for a read or write register…blocks and that is it until a hard reset and tinker reflash.
Wired up like so w/100uF cap between VCC and GND.
SPARK Photon NRF24L01+
GND 1 (GND)
3V3 (3.3V) 2 (3V3)
D6 (CSN) 3 (CE)
A2 (SS) 4 (CSN)
A3 (SCK) 5 (SCK)
A5 (MOSI) 6 (MOSI)
A4 (MISO) 7 (MISO)
Everything halts when I call this
radio.enableDynamicPayloads();
Which is defined like this.
void RF24::enableDynamicPayloads(void)
{
// Enable dynamic payload throughout the system
write_register(FEATURE,read_register(FEATURE) | _BV(EN_DPL) );
// If it didn't work, the features are not enabled
if ( ! read_register(FEATURE) )
{
// So enable them and try again
toggle_features();
write_register(FEATURE,read_register(FEATURE) | _BV(EN_DPL) );
}
////Serial.print(printf("FEATURE=%i\r\n",read_register(FEATURE)));
// Enable dynamic payload on all pipes
//
// Not sure the use case of only having dynamic payload on certain
// pipes, so the library does not support it.
write_register(DYNPD,read_register(DYNPD) | _BV(DPL_P5) | _BV(DPL_P4) | _BV(DPL_P3) | _BV(DPL_P2) | _BV(DPL_P1) | _BV(DPL_P0));
dynamic_payloads_enabled = true;
}