NRF24L01 - All registers read as 0x08!!!!

Go To Last Post
19 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi:

Loaded the Arduino test program that reads all the registers of NRF24L01 after initializing the transreceiver. The console gives the following output.

RF24/examples/GettingStarted/
ROLE: Pong back
*** PRESS 'T' to begin transmitting to the other node
STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0x0808080808 0x0808080808
RX_ADDR_P2-5 = 0x08 0x08 0x08 0x08
TX_ADDR = 0x0808080808
RX_PW_P0-6 = 0x08 0x08 0x08 0x08 0x08 0x08
EN_AA = 0x08
EN_RXADDR = 0x08
RF_CH = 0x08
RF_SETUP = 0x08
CONFIG = 0x08
DYNPD/FEATURE = 0x08 0x08
Data Rate = 2MBPS
Model = nRF24L01
CRC Length = 8 bits
PA Power = PA_MIN

The RX_ADDR P0-1 is set to 0xF0F0F0F0E1 and 0xF0F0F0F0E2 in the program, but reads back as shown.

Is there something that I might have missed/done wrong?

Thanks in advance,
Ravi Upadhyaya

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are you even sure the low-level SPI interface is working? I wouldn't progress to the high level until you have proven the lowest level of the interface. A 'scope or logic analyser is invaluable for checking that SPI is "working right".

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Clawson:

Yes - I have tested the SPI interface via a logic analyzer and it is working. I can see the clock, the CSN, the Data on the logic analyzer. No problems there.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok. So step up a level and look at the code you're using to display the number. When it gets the byte from SPI, is it right?

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It is the standard NRF test code posted at some of the Arduino forums for testing NRF24F01. Plugged in another NRF24F0L receiver and executed the code. The result is different - and the values are as initialized. Does this indicate that I have one bad NRF24L01??????

RF24/examples/GettingStarted/
ROLE: Pong back
*** PRESS 'T' to begin transmitting to the other node
STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
RX_ADDR_P0-1 = 0xe7e7e7e7e7 0xf0f0f0f0d2
RX_ADDR_P2-5 = 0xc3 0xc4 0xc5 0xc6
TX_ADDR = 0xe7e7e7e7e7
RX_PW_P0-6 = 0x00 0x20 0x00 0x00 0x00 0x00
EN_AA = 0x3f
EN_RXADDR = 0x03
RF_CH = 0x4c
RF_SETUP = 0x07
CONFIG = 0x0f
DYNPD/FEATURE = 0x00 0x00
Data Rate = 1MBPS
Model = nRF24L01+
CRC Length = 16 bits
PA Power = PA_HIGH

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ravi.upadhyaya wrote:
Plugged in another NRF24F0L receiver ... The result is different - and the values are as initialized. Does this indicate that I have one bad NRF24L01?

It would certainly be a possible explanation.

I'd want some more evidence before saying it's conclusive.

eg, look at the SPI for both "working" and "non-working" parts - what's the difference.

It's possible that your interface is marginal in some respect(s) - so both nRFs are actually good, but one "just happens" not to work.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do you suggest I take screen shots of the Logic Analyzer trace for both the boards and see the difference?

Quote:

It's possible that your interface is marginal in some respect(s) - so both nRFs are actually good, but one "just happens" not to work.

May be :(

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

When I was testing my SPI read/write code with the nRF24L01+ I wrote to the registers and checked the returned values with the debugger.

Leon Heller G1HSM

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Please find attached the LA trace of the two NRF boards. They surely look different!!

Attachment(s): 

Last Edited: Fri. Sep 26, 2014 - 11:11 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ravi.upadhyaya wrote:
Do you suggest I take screen shots of the Logic Analyzer trace for both the boards and see the difference?

Yes :!:

(or data capture or whatever your LA can do)

ravi.upadhyaya wrote:
Please find attached the LA trace of the two NRF boards. They surely look different!!

You forgot to attach them.
But, if they're different, your next step should be clear...:!:

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry! Had difficulty in attaching the docx - apparently it rejects docxs but accepts docs.

Succeeded after saving the docx as doc.

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Anyhow, what do you see in your study of your traces :?:

In particular, how do they compare to the datasheet specifications :?:

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Very few people here are going to access a .DOC file because of macro viruses. You are far better getting your word processor to print it to a PDF file then post that.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The Logic traces of the good board matches what the data sheet mentions - I can write and read the registers and am able to see the data in the MOSI and MISO ports. The bad-board the MOSI is reading LO all the time.

Thanks for the tip Clawson. Will ensure the future doc uploads will not be .doc :D

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dang. It sounds like you have a deceased NRF24L0+.

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ravi.upadhyaya wrote:
The bad-board the MOSI is reading LO all the time.

Is that because the Master is faulty - never takes it high - or the slave is faulty - short to ground :?:

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hang on - something doesn't make sense here!

First, On Sep 02, 2014 - 01:06 PM, ravi.upadhyaya wrote:
I have tested the SPI interface via a logic analyzer and it is working. I can see the clock, the CSN, the Data on the logic analyzer. No problems there.
Then, on Sep 04, 2014 - 06:21 PM, ravi.upadhyaya wrote:
The bad-board the MOSI is reading LO all the time.

:?

So has something else gone wrong since Sep 02, or did you just miss the fact that MOSI was stuck low :?:

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sorry for a delayed response. It was a bad nRF. Bought a couple of nRF more and the registers read all right on both of them. Next step is to communicate between the two. I am sure it will not be smooth sailing.

 

Thanks for all your suggestions and responses. 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ravi.upadhyaya wrote:

Sorry for a delayed response. It was a bad nRF. Bought a couple of nRF more and the registers read all right on both of them. Next step is to communicate between the two. I am sure it will not be smooth sailing.

 

Thanks for all your suggestions and responses. 

 

 

 

Wow. Having a dead one certainly complicates the testing.

 

It was a little puzzling the first time, wondering if the mistake was in sending or receiving. Compare your code carefully with published examples. I still keep the first 2 devices I made, my "Nordic Trainers" on hand, and when confused with something, it's easy to try communicating with my nordic trainers, "Tommy and Timmy."

 

Something had me stumped for a long time: In xMega E5 series parts, as soon as you start PWM on TCC4, SPI stops working. "Have I forgotten EVERYTHING about making these stupid things work?" Nope, they work just as I thought they did, the E5 part doesn't.

 

One catch, if your test sender is sending the same message over and over again, your receiver will see it only once. "Enhanced Shockburst" is mistaking the same message sent again for a repeat of the message sent again. Put a byte in the message that just counts messages and it will work like you expect.

 

 

If you don't know my whole story, keep your mouth shut.

If you know my whole story, you're an accomplice. Keep your mouth shut. 

Last Edited: Sat. Sep 27, 2014 - 01:28 PM