-
Notifications
You must be signed in to change notification settings - Fork 1.2k
nrf54l - Enable ppi and gpiote support #4568
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
Conversation
I submitted this as a draft PR as I am unsure whether the approach is desirable. Also, the nrf54l15 comes in two packages (QFN48 and CSP47), each with a different number of GPIO pins. The latter does not have P1_15. I ignored it for now, because I didn't want to introduce a new feature flag. Also, should the |
Please add signed - by from the original pr. I'll take a look to the content tomorrow. |
28ea0e4
to
44bd544
Compare
@dmitry-tarnyagin - I updated the PR to include "Signed-off-by" lines. Let me know if it is incorrect. |
GPIOTE30_CH2, | ||
GPIOTE30_CH3, | ||
|
||
// GPIO port 2 |
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.
Typo? GPIO port 0
|
||
|
||
// GPIO port 2 | ||
// GPIO port 0 |
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.
Typo? GPIO port 2
embassy-nrf/src/ppi/mod.rs
Outdated
#[cfg(not(feature = "_nrf54l"))] | ||
impl_group!(PPI_GROUP3, 3); | ||
#[cfg(not(feature = "_nrf51"))] | ||
#[cfg(not(feature = "_nrf54l"))] |
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.
I found an error here later. Should be
#[cfg(not(any(feature = "_nrf51", feature = "_nrf54l")))]
, same below.
#![no_std] | ||
#![no_main] | ||
|
||
use defmt::info; |
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.
Not sure about policies for examples. Can defmt be used w/o a config option?
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.
It seems so. My approach for the examples is to copy them from the nrf52840 and adjust them for the nrf54l15 PDK. I have a 54l15 PDK and a 52840 DK, and I test the same examples on both to confirm the code works on different hardware. It's not complete, to be sure, but it's what I have available. The gpiote
example does not have a 52840 counterpart. I added it to troubleshoot the wait_for_*()
methods and left it because it is simple.
@nerwalt It's perfectly fine for me, and thank you for pushing it :). I'm not touching nRF54L at the moment, however it's one of our main platforms generally, and rust support is important for us. Please ping me for review, I'm available and glad to participate in this process. |
f2fec2e
to
34434ea
Compare
34434ea
to
2161c80
Compare
3dc4cc0
to
e82d549
Compare
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.
As with #4572, I think maybe this could be resolved at the PAC level so that all nrf variants has >= 1 gpiote instance?
e82d549
to
445548b
Compare
I am confused about what needs to be modified at the PAC level (for this PR). All nrf variants have at least one GPIOTE instance. Some have one for each security environment (domain), but there is still only one available to the application at any given time. Only the nrf54l has more than one available to the application (assuming all power domains are in play). This new dimension can only be handled at the HAL level. |
Updated buffered_uarte for new ppi support Adding gpiote examples Signed-off-by: Dmitry Tarnyagin <[email protected]> Signed-off-by: Vegard Eriksen <[email protected]> Signed-off-by: Tyson Lawrence <[email protected]>
445548b
to
4965a7a
Compare
Pulls pieces from 4393 and fixes a few things (e.g. channel numbers, port settings, etc.).
Does not use the extend crate.
Adds examples that work on the nrf54l15 PDK.