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

Enables GPIO low accuracy interrupt #367

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jeanmatthieud
Copy link

using the PORT event and the pin SENSE register
Linked to issue #153

using the PORT event and the pin SENSE register.
@jeanmatthieud
Copy link
Author

jeanmatthieud commented Jun 27, 2019

With the NRF51822, it reduces the consumption of the chip of around 1mA compared to GPIO IN events.

@dlabun
Copy link
Collaborator

dlabun commented Jun 27, 2019

Did you test these changes with a SD on the chip?

@jeanmatthieud
Copy link
Author

What do you mean by SD ? (Sorry I'm not an English native)

@dlabun
Copy link
Collaborator

dlabun commented Jun 27, 2019

Soft Device, the pre-compiled Bluetooth executable

@jeanmatthieud
Copy link
Author

jeanmatthieud commented Jun 27, 2019

Yes, I only use soft device S130 with a rev 3 chip (nRF51822). I do not own nRF52 chips.

@dlabun
Copy link
Collaborator

dlabun commented Jul 3, 2019

Before this gets merged I would like to see it tested on a nRF52

@jeanmatthieud
Copy link
Author

I bought a nRF52 board, but didn't find the time to do it yet.

@sullivanzheng
Copy link

sullivanzheng commented Mar 21, 2021

@dlabun @sandeepmistry @jeanmatthieud 2 years have since passed and wondered if the arduino-nRF5 has resolved the energy consumption issue?

See this pull request still not merged, guess the nRF51822 high current consumption issue during sleep was resolved somewhere else?

@jeanmatthieud
Copy link
Author

Hi,
Sadly, I never took the time to test it on the nRF52...
But the branch was working for me on the nRF51822

@sullivanzheng
Copy link

Hi,
Sadly, I never took the time to test it on the nRF52...
But the branch was working for me on the nRF51822

Yes I used your branch. Works for me too. Thanks a lot for implementing this highly needed feature. After all, BLE without proper low energy features is nothing.

@oryjkov
Copy link

oryjkov commented Apr 20, 2021

@jeanmatthieud Thanks for the blog post and this pull request. Worked for me as well, except for attachInterruptLowAccuracy() not clearing the SENSE field, so it did not work to switch between RISING and FALLING modes. I had to add this before the switch in attachInterruptLowAccuracy().

NRF_GPIO->PIN_CNF[pin] &= ~(GPIO_PIN_CNF_SENSE_Msk);

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.

4 participants