RF24 icon indicating copy to clipboard operation
RF24 copied to clipboard

NodeMCU reset issue

Open AminHasanpour opened this issue 7 years ago • 0 comments

Hello. when using NodeMCU as MCU of NRF24l01+ I'll get this on Serial-Monitor:

PRESS 'T' to begin transmitting to the other node Got payload 74286 Exception (3): epc1=0x40202298 epc2=0x00000000 epc3=0x00000000 excvaddr=0x4022f80c depc=0x00000000

ctx: cont sp: 3ffef360 end: 3ffef570 offset: 01a0

stack 3ffef500: 3ffee428 3ffe835c 3ffee428 40202293
3ffef510: 0000001d 3ffe835c 3ffee524 40201df1
3ffef520: 0001222e 3ffee428 3ffee448 40201fac
3ffef530: 00000002 3ffe835c 3ffee428 402025bc
3ffef540: 00000000 00000000 00000001 3ffee548
3ffef550: 3fffdad0 00000000 3ffee540 4020300c
3ffef560: feefeffe feefeffe 3ffee550 40100718
stack

ets Jan 8 2013,rst cause:2, boot mode:(1,7)

ets Jan 8 2013,rst cause:4, boot mode:(1,7)

wdt reset

So I searched for the problem and founded it : problem is with radio.stopListening(); function. if u open the RF24.cpp u can see that we have this line inside of stopListening() :

write_register(EN_RXADDR,read_register(EN_RXADDR) | _BV(pgm_read_byte(&child_pipe_enable[0]))); // Enable RX on pipe0

where child_pipe_enable[0] is ERX_P0 and ERX_P0 is defined as 0 in nRF24L01.h library. so I simply changed this line to :

write_register(EN_RXADDR,read_register(EN_RXADDR) | 0); // Enable RX on pipe0

and then no problem :) But whats wrong with _BV(pgm_read_byte(&child_pipe_enable[0])) ?

AminHasanpour avatar Feb 24 '18 21:02 AminHasanpour