Skip to content

Added EIC External Interrupt Handling#1

Merged
BitKnitting merged 2 commits into
BitKnitting:masterfrom
sommersoft:sommersoft_patch_1
Jul 3, 2018
Merged

Added EIC External Interrupt Handling#1
BitKnitting merged 2 commits into
BitKnitting:masterfrom
sommersoft:sommersoft_patch_1

Conversation

@sommersoft
Copy link
Copy Markdown
Contributor

  • Added EIC External Interrupt (EXTINT) handling for D12/PA_19. The SAMD21 datasheet actually included some info on using the EIC/EXTINT for waking up from sleep (paragraph 21.6.8, page 310).

  • Disabled PRIMASK instructions. The NVIC IRQs are not assigned by pins, but rather by peripherals (EIC, SysTick, USB, etc). If it still doesn't wake up, you can try using NVIC_SetPriority(EIC_IRQn, 0)

I didn't test this, since I'm not totally sure how you've set it up. If you powering from a computer with a data capable cable, I would expect that the USB will be unhappy after waking up (since CP may not wake up in a manner that re-establishes the CDC/MSC). File system may also be affected?

Let me know how it turns out. If you have any questions at all, don't hesitate to ask us. I am by no means an expert in this (still learning myself), and I have no shame in "elevating" any questions. 😄

@BitKnitting BitKnitting merged commit 41b1ca5 into BitKnitting:master Jul 3, 2018
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.

2 participants