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

NRF52 SDK 15.0 usable input Interrupts limited to 1 by NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS #10949

Closed
anton-veretenenko opened this issue Jul 3, 2019 · 6 comments

Comments

@anton-veretenenko
Copy link

Description

Target
NRF5x

Version
mbed-os rev #7482462434d5 (tags: latest, mbed-os-5.13.0)
NRF SDK 15.0

After updating to mbed 5.13 I have lost all my input interrupts except 1.
Currently only 1 pin can be used for input interrupt with InterruptIn with default config.
nrfx_gpiote.c driver checks for NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS in "channel_port_alloc" function.
NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS is set to 1 by sd_config.h for target.

Example

InterruptIn btn1(11);
InterruptIn btn2(12);

For btn2 "nrfx_gpiote_in_init" in nrfx_gpiote.c will return NRFX_ERROR_NO_MEM leaving this interrupt not initialized without any error message.

Making custom target with

"macros_add": ["NRFX_GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS=8"]

resolves this issue with higher limit set to 8.

Should we think about vendor sdk when working with mbed?

Additional resources
https://devzone.nordicsemi.com/f/nordic-q-a/34882/wrong-configuration-for-ble_app_hrs_freertos-example-in-sdk-15-0/134040

Issue request type

[ ] Question
[ ] Enhancement
[ X] Bug
@40Grit
Copy link

40Grit commented Jul 3, 2019

@anton-veretenenko Able to make a PR to fix?

@trowbridgec @AGlass0fMilk

@anton-veretenenko
Copy link
Author

Not sure how to do it correctly yet. Limit can be set as high as 32 available GPIOs but then it just reserves memory for all pins even when not used.

facchinm added a commit to arduino/ArduinoCore-nRF528x-mbedos that referenced this issue Sep 10, 2019
facchinm added a commit to arduino/ArduinoCore-nRF528x-mbedos that referenced this issue Sep 10, 2019
@40Grit
Copy link

40Grit commented Oct 3, 2019

@0xc0170 We are running into this issue ourselves now on a customer project.

@j3hill

@40Grit
Copy link

40Grit commented Oct 3, 2019

@ciarmcom
Copy link
Member

ciarmcom commented Oct 2, 2020

Thank you for raising this detailed GitHub issue. I am now notifying our internal issue triagers.
Internal Jira reference: https://jira.arm.com/browse/IOTOSM-2219

@adbridge
Copy link
Contributor

adbridge commented Jun 7, 2021

As there has been no update on this for 18 months I am going to close this. Please re-open if this is still an issue.

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

No branches or pull requests

4 participants