Skip to content
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

fix #913 #914

Merged
merged 2 commits into from
Aug 28, 2023
Merged

fix #913 #914

merged 2 commits into from
Aug 28, 2023

Conversation

2bndy5
Copy link
Member

@2bndy5 2bndy5 commented Aug 14, 2023

Essentially, this reverts the algorithm used to satisfy #650 as it has proved erroneous.

Essentially, this reverts the algorithm used to satisfy #650 as it has proved erroneous on fast MCUs.
@2bndy5 2bndy5 linked an issue Aug 14, 2023 that may be closed by this pull request
@github-actions
Copy link
Contributor

Memory usage change @ 6db47d6

Board flash % RAM for global variables %
ATTinyCore:avr:attinyx5 🔺 0 - +46 0.0 - +0.56 0 - 0 0.0 - 0.0
arduino:avr:nano ❔ -12 - +42 -0.04 - +0.14 0 - 0 0.0 - 0.0
arduino:samd:mkrzero 🔺 0 - +56 0.0 - +0.02 0 - 0 0.0 - 0.0
Click for full report table
Board examples/rf24_ATTiny/rf24ping85
flash
% examples/rf24_ATTiny/rf24ping85
RAM for global variables
% examples/rf24_ATTiny/timingSearch3pin
flash
% examples/rf24_ATTiny/timingSearch3pin
RAM for global variables
% examples/GettingStarted
flash
% examples/GettingStarted
RAM for global variables
% examples/AcknowledgementPayloads
flash
% examples/AcknowledgementPayloads
RAM for global variables
% examples/ManualAcknowledgements
flash
% examples/ManualAcknowledgements
RAM for global variables
% examples/StreamingData
flash
% examples/StreamingData
RAM for global variables
% examples/MulticeiverDemo
flash
% examples/MulticeiverDemo
RAM for global variables
% examples/InterruptConfigure
flash
% examples/InterruptConfigure
RAM for global variables
% examples/scanner
flash
% examples/scanner
RAM for global variables
% examples/encodeRadioDetails
flash
% examples/encodeRadioDetails
RAM for global variables
%
ATTinyCore:avr:attinyx5 46 0.56 0 0.0 0 0.0 0 0.0
arduino:avr:nano 20 0.07 0 0.0 30 0.1 0 0.0 18 0.06 0 0.0 -12 -0.04 0 0.0 16 0.05 0 0.0 42 0.14 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:samd:mkrzero 52 0.02 0 0.0 56 0.02 0 0.0 52 0.02 0 0.0 52 0.02 0 0.0 56 0.02 0 0.0 52 0.02 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
Click for full report CSV
Board,examples/rf24_ATTiny/rf24ping85<br>flash,%,examples/rf24_ATTiny/rf24ping85<br>RAM for global variables,%,examples/rf24_ATTiny/timingSearch3pin<br>flash,%,examples/rf24_ATTiny/timingSearch3pin<br>RAM for global variables,%,examples/GettingStarted<br>flash,%,examples/GettingStarted<br>RAM for global variables,%,examples/AcknowledgementPayloads<br>flash,%,examples/AcknowledgementPayloads<br>RAM for global variables,%,examples/ManualAcknowledgements<br>flash,%,examples/ManualAcknowledgements<br>RAM for global variables,%,examples/StreamingData<br>flash,%,examples/StreamingData<br>RAM for global variables,%,examples/MulticeiverDemo<br>flash,%,examples/MulticeiverDemo<br>RAM for global variables,%,examples/InterruptConfigure<br>flash,%,examples/InterruptConfigure<br>RAM for global variables,%,examples/scanner<br>flash,%,examples/scanner<br>RAM for global variables,%,examples/encodeRadioDetails<br>flash,%,examples/encodeRadioDetails<br>RAM for global variables,%
ATTinyCore:avr:attinyx5,46,0.56,0,0.0,0,0.0,0,0.0
arduino:avr:nano,,,,,,,,,20,0.07,0,0.0,30,0.1,0,0.0,18,0.06,0,0.0,-12,-0.04,0,0.0,16,0.05,0,0.0,42,0.14,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:samd:mkrzero,,,,,,,,,52,0.02,0,0.0,56,0.02,0,0.0,52,0.02,0,0.0,52,0.02,0,0.0,56,0.02,0,0.0,52,0.02,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0

@2bndy5 2bndy5 closed this Aug 14, 2023
@2bndy5 2bndy5 reopened this Aug 14, 2023
@github-actions
Copy link
Contributor

Memory usage change @ 2e1d682

Board flash % RAM for global variables %
ATTinyCore:avr:attinyx5 🔺 0 - +46 0.0 - +0.56 0 - 0 0.0 - 0.0
arduino:avr:nano ❔ -12 - +42 -0.04 - +0.14 0 - 0 0.0 - 0.0
arduino:samd:mkrzero 🔺 0 - +16 0.0 - +0.01 0 - 0 0.0 - 0.0
Click for full report table
Board examples/rf24_ATTiny/rf24ping85
flash
% examples/rf24_ATTiny/rf24ping85
RAM for global variables
% examples/rf24_ATTiny/timingSearch3pin
flash
% examples/rf24_ATTiny/timingSearch3pin
RAM for global variables
% examples/GettingStarted
flash
% examples/GettingStarted
RAM for global variables
% examples/AcknowledgementPayloads
flash
% examples/AcknowledgementPayloads
RAM for global variables
% examples/ManualAcknowledgements
flash
% examples/ManualAcknowledgements
RAM for global variables
% examples/StreamingData
flash
% examples/StreamingData
RAM for global variables
% examples/MulticeiverDemo
flash
% examples/MulticeiverDemo
RAM for global variables
% examples/InterruptConfigure
flash
% examples/InterruptConfigure
RAM for global variables
% examples/scanner
flash
% examples/scanner
RAM for global variables
% examples/encodeRadioDetails
flash
% examples/encodeRadioDetails
RAM for global variables
%
ATTinyCore:avr:attinyx5 46 0.56 0 0.0 0 0.0 0 0.0
arduino:avr:nano 20 0.07 0 0.0 30 0.1 0 0.0 18 0.06 0 0.0 -12 -0.04 0 0.0 16 0.05 0 0.0 42 0.14 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:samd:mkrzero 16 0.01 0 0.0 16 0.01 0 0.0 16 0.01 0 0.0 16 0.01 0 0.0 16 0.01 0 0.0 16 0.01 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
Click for full report CSV
Board,examples/rf24_ATTiny/rf24ping85<br>flash,%,examples/rf24_ATTiny/rf24ping85<br>RAM for global variables,%,examples/rf24_ATTiny/timingSearch3pin<br>flash,%,examples/rf24_ATTiny/timingSearch3pin<br>RAM for global variables,%,examples/GettingStarted<br>flash,%,examples/GettingStarted<br>RAM for global variables,%,examples/AcknowledgementPayloads<br>flash,%,examples/AcknowledgementPayloads<br>RAM for global variables,%,examples/ManualAcknowledgements<br>flash,%,examples/ManualAcknowledgements<br>RAM for global variables,%,examples/StreamingData<br>flash,%,examples/StreamingData<br>RAM for global variables,%,examples/MulticeiverDemo<br>flash,%,examples/MulticeiverDemo<br>RAM for global variables,%,examples/InterruptConfigure<br>flash,%,examples/InterruptConfigure<br>RAM for global variables,%,examples/scanner<br>flash,%,examples/scanner<br>RAM for global variables,%,examples/encodeRadioDetails<br>flash,%,examples/encodeRadioDetails<br>RAM for global variables,%
ATTinyCore:avr:attinyx5,46,0.56,0,0.0,0,0.0,0,0.0
arduino:avr:nano,,,,,,,,,20,0.07,0,0.0,30,0.1,0,0.0,18,0.06,0,0.0,-12,-0.04,0,0.0,16,0.05,0,0.0,42,0.14,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:samd:mkrzero,,,,,,,,,16,0.01,0,0.0,16,0.01,0,0.0,16,0.01,0,0.0,16,0.01,0,0.0,16,0.01,0,0.0,16,0.01,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0

@TMRh20
Copy link
Member

TMRh20 commented Aug 28, 2023

My testing indicates this is an issue on all boards. It doesn't seem to matter the speed, anytime the radio receives a packet and the IRQ is raised, could be at the same time the MCU is polling for available();. This fix seems to work on all devices as well, from RPi to AVR devices.

@2bndy5 2bndy5 marked this pull request as ready for review August 28, 2023 08:15
@2bndy5
Copy link
Member Author

2bndy5 commented Aug 28, 2023

Updated OP. Thanks for testing this, I was having trouble reproducing this.

@2bndy5
Copy link
Member Author

2bndy5 commented Aug 28, 2023

I am [optimistically] curious how this will effect the promiscuous scanner branch's mods...

@TMRh20
Copy link
Member

TMRh20 commented Aug 28, 2023

I am getting similar results to the original with the promiscuous scanner branch testing with Due and Nano, so at least there are no problems with it.

@2bndy5 2bndy5 merged commit 01e6ccb into master Aug 28, 2023
167 of 196 checks passed
@2bndy5 2bndy5 deleted the revert-650 branch August 28, 2023 08:39
@2bndy5
Copy link
Member Author

2bndy5 commented Aug 28, 2023

I rebased the promiscious-scanners branch on master. My hope is that the "slower" available() will be better with the SPIDEV driver.

@2bndy5
Copy link
Member Author

2bndy5 commented Sep 26, 2023

Should we publish a release with this fix for Arduino?

I'm thinking the slower available() will allow for timely reception of network messages during network.update()'s while (radio.available()) loop. 🤷🏼‍♂️

@TMRh20
Copy link
Member

TMRh20 commented Sep 27, 2023

Yeah maybe, we aren't likely to have too many upcoming changes to RF24 and its probably best to get it in there.

@2bndy5
Copy link
Member Author

2bndy5 commented Sep 27, 2023

ATTinyCore is failing to install in CI. I'm not entirely sure why though. It shouldn't prevent releases from completing, however the badge in README will display red.

@2bndy5
Copy link
Member Author

2bndy5 commented Sep 28, 2023

Update: I was able to fix the ATTinyCore install problem in CI on advice from SpenceKonde. Turns out that the Arduino CLI tool had some kind of breaking change after v0.33.0 which can only be observed from Github Action runners. Thus our CI is pinned to using Arduino CLI v0.33.0 (in the reusable workflow: nRF24/.github@6e04aae).

@2bndy5
Copy link
Member Author

2bndy5 commented Oct 13, 2023

Another update on ATTinyCore install in CI:

arduino/arduino-cli#2345 tracks the problem reported. The fix is merged, so now I'm just posting a reminder to update the reusable workflow when the new Arduino CLI version is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Receiving data on a closed pipe.
2 participants