-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ce(LOW) in startWrite #11
Comments
Per the datasheet, the CE pin is used to control transmission, and whether or not the radio stays in Standby-II or returns to Standby-I mode: See section 6.1.5 I would be interested to know whether adding |
Yes, your're right. It was the pulse length. On a Teensy 3.0 with 96 MHz and Paul Stoffregen's optimized digitalWrite function, the sequence However, in my project I have a requirement that effectively prohibits me to use There is a terrific library for handling SPI transfers through DMA on the Teensy3 at https://github.com/crteensy/DmaSpi. I will try to integrate it into your code and I'll let you know about the results. |
Hi. I am adapting your library to work with Chipkit's Uno32 and only could make it work by adding the delayMicroseconds(10) to the same spot, as the Chipkit gives a shorter than 10uS pulse with only the ce(HIGH); ce(LOW); pair. As soon as I finish basic tests how can I send you my modified code ? |
Thanks for the extra info. I believe the issue and fix is similar to what I have done on the RPi, being converting the radio.write() to use writeFast, then toggle the CE pin LOW after sending is completed or failed. This should work around the need for a delay. Haven't been able to do much lately, but I will be taking a quick look at it soon. Also code changes can always be submitted via GitHub forks/pull requests. |
Modified write() to use startFastWrite, then toggle CE after completion to remove need for a delay on some boards. Added delay to startWrite for non-Arduino boards. Removed receive buffer flushes. This prevents an issue in the RF24Network library, where payloads would be received, but flushed when a transmission takes place prior to reading. Should address issues #7 and #11
Ok, I think commit 1d18015 will address the issue. I've added a delay to startWrite for non-Arduino and Teensy boards, and have modified the standard radio.write() to remove the need for a delay on all boards. It passes all my tests, so hopefully this will do the trick. *Edit to add: jbliesener You may be best off using startFastWrite(); and just leaving the radio in standby-II mode. |
I have a question about that
ce(LOW)
in line 689 of RF24.cpp. What is it for?The state diagram on page 21 of the NRF24L01 datasheet tells us that CE needs to be high to remain in transmit mode. My version of the GettingStarted example freezes in the write method, as neither TX_DS nor MAX_RT come up in the status register, as long as CE is low.
The code works as soon as I comment out line 689.
The text was updated successfully, but these errors were encountered: