This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF24L01+ IRQ stays low after first call

Hi i'm very frustated with myself not the modules , i could make a pair of them to work perfectly in a pic 16F886 , now due to other project i have to use a dspic33fj64mc202 and i already moved the nRF24L01+ library to the dspic , i first test in the dspic the interruption on falling edge it worked fine , then i tried the spi module and worked fine as well , when i tried the whole program just to turn on a led when the interrupt rutine triggers , it doesn't work as i espected , i send something with my working transceiver as a tx , and receive in the dspic , the irq pin changes from high to low and stays forever low , this doesn't allow the interrupt rutine to trigger , and i can't find the problem , please if you could give me some help it would be awesome, thank you very much .

  • I don't see any reason why it shouldn't work on the dspic. I assume the communication between the dspic and the nRF24 is OK ? You can read and write registers on the NRF24 ?

    The CE pin is controlled properly ?

    My suggestion is to record the SPI transaction using a logic analyzer and compare what you have on the PIC and on the DSPIC.

    Have you tested with the same NRF24 chip/board or they are different boards ( on your test with PIC and DSPIC) ?

  • Thank you very much for your answer. I fortunately have a 4 channel oscilloscope with spi trigger & decode option, it works great to observe the spi signals, I'm using the same nrf24l01+ module on the receiver with pic and then in the receiver with dspic, the other nrf24l01+ module is always in the transmitter, so my actual problem I think is about the interrupt in the receiver, when I watch the irq on the oscilloscope it is normally high, when I send something with the transmitter the irq line on the receiver switches to low and stays low forever, causing the interrupt routine not to execute neither once, therefore the irq flag never clears since the clear irq flag is inside the interrupt routine.
    If you could suggest another try since I've already compare the spi signals in the pic and dspic and they seemed to be the same during power on so I guess the module must be configured the same way in both cases but during irq in the pic I see spi signal but in the dspic no spi signal just the irq line going low. Thanks a lot for your time I appreciate it a lot.

  • I have no more idea for now. I will check with our nRF24L01+ experts to see what they can suggest, but it will take sometime since most people already on vacation. One suggestion is to actually connect the IRQ pin to a pull up resistor and disconnect from the dspic. I suspect that the dspic may actually pull the line down. If you try to use the dspic to set up the nRF24L01+ as PTX would it be able to transmit something, and would you get any interrupt for example TX_DS ?

  • Man thanks a lot for your time to answer, fortunately half an hour ago I discovered the problem, it had to do with the dspic external interrupt edge polarity it was set Low to High, i changed it to High to low and start working perfectly, thanks again very much for your help. Have a very nice new year

  • I glad that it works now :) But after you change that polarity mode, the IRQ pin actually can get from Low to High which it couldn't before ? Meaning the pin was pulled down by the dspic ?

Related