spirilis / msprf24

nRF24L01+ Library for MSP430 microcontroller line
ISC License
103 stars 32 forks source link

Can't get Ike's example to transmit or receive #4

Closed deanchester closed 11 years ago

deanchester commented 11 years ago

I'm trying to get Ike's example transmitting and receiving yet I'm having no luck. It compiles successfully with:

gcc version 4.6.3 20120301

And i've wired the nRF24L01+ up correctly(triple checked the pinout of my nRF24L01+s and the wiring to the boards) but I just can't seem to get it to transmit or receive. I know the nordic chips work because I am able to use a bus pirate to communicate and check that they are working.

Any ideas on what I can do so that I can debug further?

spirilis commented 11 years ago

How is your nrf_userconfig.h ? Also are you using the same type of chips on both ends (e.g. MSP430 G2553)?

deanchester commented 11 years ago

I copied the example on from the wiki. And yes both are MSP430G2553s.

spirilis commented 11 years ago

I guess the first thing to do on the TX side is run it in mspdebug, after starting the program ("run") hit CTRL-C to stop it, then examine the "user" variable...

sym find user (copy the address) md address 2

that should dump the value. That variable gets set to the current value of msprf24_current_state() before it goes into its main loop. If it's 0, then something isn't wired right.

Also comment out the "user = msprf24_get_last_retransmits()" line down near the bottom so it doesn't get accidentally set to 0 if there is traffic going over the air.

spirilis commented 11 years ago

Did you get any further with this issue?

deanchester commented 11 years ago

Sorry for the slow response, had exams and such so not had the time to work on this. Yes the value I am getting out is 0, what should be the wiring be? Currently I have:

And the power goes to the VCC and GND pins on my launchpad board. So what is wired incorrectly as I thought I had read the pinout correctly.

spirilis commented 11 years ago

Looks like if you're using USCI_A on the G2553, P1.1 is MISO and P1.2 is MOSI. P1.3 isn't involved at all.

deanchester commented 11 years ago

Now that i've wired it correctly, when displaying the user variable I am getting 2 returned in gdb is this correct?

spirilis commented 11 years ago

Yup! That's STANDBY_I mode, the typical "rest" state the nRF sits in when it's fully powered up but nothing is happening (or you just TX'd something and it's completed so the TX queue is empty and the chip is sitting idle waiting for something to do).