forked from ARMmbed/mbed-os
-
Notifications
You must be signed in to change notification settings - Fork 22
Ambiq Apollo3: Make SFE_ARTEMIS use arduino uno form factor, fix GPIO IRQ API #473
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
Open
multiplemonomials
wants to merge
24
commits into
master
Choose a base branch
from
dev/ambiq-arduino-ff-and-fix-gpio-irq
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…er behavior, I added docs and tests for it.
A8 = D8, | ||
A9 = D9, | ||
A10 = D10, | ||
p0 = 25, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't name these pins "Dx" or "Ax" because those names are defined by PinNameAliases.h. Instead I have to name the actual pin names in the enum something else.
0f9bb18
to
b5c7229
Compare
b5c7229
to
959e515
Compare
6a2de1d
to
05f37a0
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes
I'm starting to test Ambiq Apollo3 on the CI test shield. In order to do this, I first had to add arduino uno form factor support for the SFE_ARTEMIS board. This board does use the physical arduino uno form factor, but was not configured as such in Mbed, meaning the test shield project wouldn't compile. I updated PinNames.h to fix this.
With that sorted out, I investigated some failures I was seeing in the InterruptIn test. Turns out that there were two bugs in this target's implementation:
InterruptIn::_irq_handler()
withIRQ_RISE | IRQ_FALL
as the even argument, which is not valid and led to no callback getting executed.To fix the first issue, I set up a workaround where the pin is kept in interrupts-enabled-but-masked mode when no interrupt is configured, so that it can be read. To fix the second issue, I updated the HAL to read the pin state in the ISR and then send the rise or fall event accordingly. This is a little bit janky, but should work OK in most cases, and it's how STM32 HAL currently works.
Impact of changes
Migration actions required
Documentation
None
Pull request type
Test results
InterruptIn test shield test now passes (except some weird analog propagation time related stuff that I still need to debug).