Skip to content

cpu/nrf9160: fix GPIOTE ISR#20560

Merged
Teufelchen1 merged 2 commits intoRIOT-OS:masterfrom
dylad:pr/cpu/nrf9160/fix_gpio_isr
Apr 9, 2024
Merged

cpu/nrf9160: fix GPIOTE ISR#20560
Teufelchen1 merged 2 commits intoRIOT-OS:masterfrom
dylad:pr/cpu/nrf9160/fix_gpio_isr

Conversation

@dylad
Copy link
Copy Markdown
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.

@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
@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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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 enabled auto-merge April 9, 2024 06:48
@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
@dylad
Copy link
Copy Markdown
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.

4 participants