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

cpu/nrf9160: fix GPIOTE ISR #20560

Merged
merged 2 commits into from
Apr 9, 2024

Conversation

dylad
Copy link
Member

@dylad dylad commented Apr 8, 2024

Contribution description

On master, GPIO interrupts are broken for nRF9160 MCU. (Dummy handler is called and thus hardfault).
This PR renames the gpiote isr to matches the behavior of nRF53. With this, the GPIO ISR works as expected.

The second commit also enables internal pullups on all nRF9160DK boards buttons as they are required for the hardware to work.

Testing procedure

Flash tests/buttons on nrf9160dk board and play with the onboard buttons.

Issues/PRs references

None.

Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
@dylad dylad requested a review from aabadie as a code owner April 8, 2024 18:19
@github-actions github-actions bot added Area: boards Area: Board ports Area: cpu Area: CPU/MCU ports labels Apr 8, 2024
@dylad dylad added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Apr 8, 2024
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
@dylad dylad force-pushed the pr/cpu/nrf9160/fix_gpio_isr branch from cae9633 to f7d0523 Compare April 8, 2024 18:22
@riot-ci
Copy link

riot-ci commented Apr 8, 2024

Murdock results

✔️ PASSED

f7d0523 boards/nrf9160dk: enable internal pullup on buttons

Success Failures Total Runtime
10044 0 10045 13m:38s

Artifacts

@Teufelchen1
Copy link
Contributor

Does the isr patch work via this macro?

/**
* @brief Wrapper around GPIOTE ISR
*
* @note nRF53 has two GPIOTE instances available on Application Core
* but we always use the first one.
*/
#ifdef NRF_GPIOTE0_S
#define ISR_GPIOTE isr_gpiote0
#else
#define ISR_GPIOTE isr_gpiote
#endif

@dylad
Copy link
Member Author

dylad commented Apr 9, 2024

Yes, that's it. Since NRF_GPIOTE0_S is defined for nRF9160 as well, I rename the ISR vector to match this macro.

@Teufelchen1 Teufelchen1 added this pull request to the merge queue Apr 9, 2024
Merged via the queue into RIOT-OS:master with commit 6595936 Apr 9, 2024
26 checks passed
@dylad
Copy link
Member Author

dylad commented Apr 9, 2024

Thanks!

@dylad dylad deleted the pr/cpu/nrf9160/fix_gpio_isr branch April 9, 2024 09:51
@MrKevinWeiss MrKevinWeiss added this to the Release 2024.04 milestone Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants