spirilis 1,265 Posted March 26, 2013 Share Posted March 26, 2013 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. gamersat678 1 Quote Link to post Share on other sites
gamersat678 1 Posted March 26, 2013 Share Posted March 26, 2013 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. Quote Link to post Share on other sites
spirilis 1,265 Posted March 26, 2013 Share Posted March 26, 2013 D'oh! Good thing they're cheap Quote Link to post Share on other sites
spirilis 1,265 Posted June 2, 2013 Share Posted June 2, 2013 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. bluehash 1 Quote Link to post Share on other sites
nemetila 12 Posted June 13, 2013 Share Posted June 13, 2013 (edited) 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 June 15, 2013 by nemetila RobG 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.