[imxrt1050-evkb] Fix GPIO interrupts#2786
Conversation
bradjc
left a comment
There was a problem hiding this comment.
This seems bad. Why are the nvic interrupts not all enabled by default? Particularly why does the chip init look like:
tock/chips/imxrt10xx/src/lib.rs
Lines 228 to 235 in 3c9468e
which does not enable all interrupts? Compare to the sam4l chip init:
Lines 81 to 85 in 3c9468e
Tock assumes all interrupts are enabled at the interrupt controller level, and relies on individual peripherals to disable interrupts on a per-peripheral basis. That avoids all issues like this. Did we need to special case this chip for some reason?
3c9468e to
d6b4d6b
Compare
|
I reversed the changes and enabled all interrupts. Please @valexandru test the gpio interrupt. |
|
Yes, it works now, after enabling the interrupts in lib.rs. Thank you @alexandruradovici for making the changes while I was away. |
|
This PR was included in a batch that successfully built, but then failed to merge into master. It will not be retried. Additional information: {"message":"1 review requesting changes and 1 approving review by reviewers with write access.","documentation_url":"https://docs.github.com/articles/about-protected-branches"} |
|
bors r+ |
2786: [imxrt1050-evkb] Fix GPIO interrupts r=hudson-ayers a=valexandru ### Pull Request Overview This pull request fixes gpio interrupts on the i.MX RT 1052 EVKB. While I was testing the buttons example on the i.MX RT 1052 EVKB, I discovered that the interrupts are not enabled by default. However, if I set up a delay of 1000 ms so that a different interrupt is triggered before the gpio one, the gpio interrupts will work. Therefore, in order to prevent this, we have to specifically enable the interrupt in the nvic. This seems to be a bug in the i.MX RT 1052 EVKB board and requires to manually enable the interrupts in the nvic. ### Testing Strategy This pull request was tested using an iMX. RT 1052 EVKB board. ### TODO or Help Wanted This pull request needs feedback. ### Documentation Updated - [x] Updated the relevant files in `/docs`, or no updates are required. ### Formatting - [x] Ran `make prepush`. Co-authored-by: Alexandru Radovici <msg4alex@gmail.com>
Pull Request Overview
This pull request fixes gpio interrupts on the i.MX RT 1052 EVKB.
While I was testing the buttons example on the i.MX RT 1052 EVKB, I discovered that the interrupts are not enabled by default. However, if I set up a delay of 1000 ms so that a different interrupt is triggered before the gpio one, the gpio interrupts will work. Therefore, in order to prevent this, we have to specifically enable the interrupt in the nvic.
This seems to be a bug in the i.MX RT 1052 EVKB board and requires to manually enable the interrupts in the nvic.
Testing Strategy
This pull request was tested using an iMX. RT 1052 EVKB board.
TODO or Help Wanted
This pull request needs feedback.
Documentation Updated
/docs, or no updates are required.Formatting
make prepush.