Jump to content
43oh

nrf24L01 registers/commands and functions(work in progress)


Recommended Posts

Which pin are you using for the IRQ line?  Is it set up properly (and e.g. if you're using P2.6 or P2.7 you have cleared the P2SEL and P2SEL2 bits for them right?)

 

The library should take care of configuring the pin as input and enabling IRQs (and msprf24_init() enables the GIE bit), but you do need to make sure it's specified in nrf_userconfig.h

 

For debugging purposes before the app goes into LPM4, run "user = msprf24_current_state();" (with user being that volatile variable defined up top for debugging purposes) and examine it with the debugger.  It should be >0 if the transceiver is present and hooked up.

Link to post
Share on other sites
  • Replies 34
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

nrf24L01.h Contains command and register address definitions. nrf24L01.c Contains functions (tx not tested but should work, rx not tested) regs.h Contains settings for the MSP430 and the n

Official release, sans documentation for the moment-   https://github.com/spirilis/msprf24     Lots of cleanup/changes compared to that .zip file, which I'm going to purge for now (no copyright n

Still working on this, got a pretty complete library coming together although I've been swamped in SPI hell due to it not working right ... Finally figured it out, USICKPH has to be 1. Also yanked US

Which pin are you using for the IRQ line?  Is it set up properly (and e.g. if you're using P2.6 or P2.7 you have cleared the P2SEL and P2SEL2 bits for them right?)

 

The library should take care of configuring the pin as input and enabling IRQs (and msprf24_init() enables the GIE bit), but you do need to make sure it's specified in nrf_userconfig.h

 

For debugging purposes before the app goes into LPM4, run "user = msprf24_current_state();" (with user being that volatile variable defined up top for debugging purposes) and examine it with the debugger.  It should be >0 if the transceiver is present and hooked up.

Figured it out! Totally forgot to check the current state in the state machine. Thanks for pointing this out. Just so everyone (internet) knows, ensure that you follow typical esd procedures, as it seems these nrf24L01 chips are prone, in at least my experience, to shocking (and the resulting death). Had two bad chips (thankfully bought 4). Also had mosi and miso swapped. Leds are now happily blinking.

Link to post
Share on other sites
  • 2 months later...

Added a feature that has nothing at all to do with the nRF24; 9-bit SPI functions, all drivers now have an spi_transfer9() (takes int, returns int) which is implemented appropriately (using a crude bitbang driver for the 9th bit on USCI chipsets).  This is a courtesy to support 9-bit LCD screens when using them in conjunction with this library.

Link to post
Share on other sites
  • 2 weeks later...

Thank you Spirilis your awesome work.  :thumbup:

 

I tested your code (msprf24) with my MSP430 Launchpad (MSP430G2553) and my Stellaris LaunchPad (Enrf24). It works great.

I have a MSP-EXP430FR5739 too, so I added support for it (msprf24). Only RF24_SPI_DRIVER_USCI_B is supported now.

I used MSP-EXP430FR5739@8MHz as PTX and MSP430G2553@16MHz as PRX. It works. Here is my modified msprf24.c file.

 

I read somewhere that Auto ACK doesn't work at 250kBs air data rate. I tested your code at 250kBs and 1MBs and in both cases the auto ACK worked well (ch = 0, max TX power). I have this cheap modules from eBay: http://www.ebay.com/itm/2PCS-Arduino-NRF24L01-2-4GHz-Wireless-Transceiver-Module-New-/170819064718?pt=LH_DefaultDomain_0&hash=item27c59c138e

 

At 1MBs the distance limit is about 40feet with 1-2 walls.

I will test the limit at 250kBs too.

 

-------------------------------------------------------------------------------------------------------------------------------------------

Update1:

I have done the distance limit test at 250 kBs. The limit is exactly the same as it was at 1MBs. I dont know why.

 

------------------------------------------------------------------------------------------------------------------------------------------

Update2:

I used TA0 on PTX to measure T_ESB(Time Enhanced Shock-Burst

Edited by nemetila
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...