-
Notifications
You must be signed in to change notification settings - Fork 2k
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
cpu/nrf53: add I2C and SPI support #19798
Conversation
d715883
to
e846df8
Compare
boards/nrf5340dk-app/include/board.h
Outdated
|
||
#define BOARD_QSPI_PIN_CS GPIO_PIN(0, 18) | ||
#define BOARD_QSPI_PIN_WP GPIO_PIN(0, 15) | ||
#define BOARD_QSPI_PIN_HOLD GPIO_PIN(0, 16) |
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.
Doccheck wants this documented 😕
I can confirm that SPI and I2C are still working fine on nRF52(840) - please squash directly |
e846df8
to
36fffe2
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.
doccheck is still not happy - the /** @} */
on nrf5340dk-app/include/periph_conf.h:115
has no matching partner
36fffe2
to
02854cb
Compare
Rebased. |
8484fc1
to
f1c3476
Compare
I've retried I2C with bme680 sensor on a custom board:
Also tested |
@benpicco could you confirm that I didn't break anything again on nRF52 please ? |
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.
nRF52 is still working fine
bors merge |
19777: cpu/avr8_common: Prepare for rework ISR r=benpicco a=nandojve ### Contribution description This prepares for rework how ISR is handled for AVR-8 platform. It is not expected changes on the behavior but tests on other boards were welcome to avoid regressions. #### Improvements * Split UART state from ISR states. Now it is necessary two variables and GPIORx registers are automatically selected when available. * UART states now supports up to 8 UARTs. * Added AVR8_ISR macro do clean-up and hide internals related to ISR processing. This allows changes on ISR without any other changes on drivers. ### Testing procedure Tests were conducted using atmega328p-xplained-mini and atxmega-a1u-xpro and the zigduino board was only built. The example thread_duel was used to test regressions. 19798: cpu/nrf53: add I2C and SPI support r=benpicco a=dylad ### Contribution description This PR provides support for nRF53 SPI and I2C. It also moves common structs from each nRF CPU folder to `cpu/nrf5x_common` to avoid duplication. Moreover, since nRF9160 and nRF5340 have shared IRQ for UART/SPI/I2C. Both this families now use a common file to register and manage these interrupts. Note that nRF9160 have different name for its interrupts than nRF5340 but they have the same purpose. ### Testing procedure Since some structs were moved around, I think this PR should be carefully tested against nRF52, nRF53 and nRF9160 to avoid any issues. On nRF5340DK-APP, SPI can be tested with its onboard SPI flash. ### Issues/PRs references Co-authored-by: Gerson Fernando Budke <nandojve@gmail.com> Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
Build failed (retrying...): |
Damn, I'll provide an I2C configuration for nrf5340dk-app... |
f1c3476
to
e65f245
Compare
1e32634
to
fbb3b2c
Compare
bors try |
tryBuild failed: |
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
fbb3b2c
to
b050ad3
Compare
bors merge |
19798: cpu/nrf53: add I2C and SPI support r=benpicco a=dylad ### Contribution description This PR provides support for nRF53 SPI and I2C. It also moves common structs from each nRF CPU folder to `cpu/nrf5x_common` to avoid duplication. Moreover, since nRF9160 and nRF5340 have shared IRQ for UART/SPI/I2C. Both this families now use a common file to register and manage these interrupts. Note that nRF9160 have different name for its interrupts than nRF5340 but they have the same purpose. ### Testing procedure Since some structs were moved around, I think this PR should be carefully tested against nRF52, nRF53 and nRF9160 to avoid any issues. On nRF5340DK-APP, SPI can be tested with its onboard SPI flash. ### Issues/PRs references Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
Build failed: |
bors merge |
19798: cpu/nrf53: add I2C and SPI support r=benpicco a=dylad ### Contribution description This PR provides support for nRF53 SPI and I2C. It also moves common structs from each nRF CPU folder to `cpu/nrf5x_common` to avoid duplication. Moreover, since nRF9160 and nRF5340 have shared IRQ for UART/SPI/I2C. Both this families now use a common file to register and manage these interrupts. Note that nRF9160 have different name for its interrupts than nRF5340 but they have the same purpose. ### Testing procedure Since some structs were moved around, I think this PR should be carefully tested against nRF52, nRF53 and nRF9160 to avoid any issues. On nRF5340DK-APP, SPI can be tested with its onboard SPI flash. ### Issues/PRs references Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
bors cancel |
Canceled. |
Unfortunately I can reproduce the error locally, this is not a false positive. I'll provide a fix and run a full compile test locally too. |
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
New commit added, I removed all |
bors try |
@@ -19,7 +19,8 @@ endif | |||
ifneq (,$(filter uwb-core_dpl,$(USEMODULE))) | |||
USEPKG += mynewt-core | |||
USEMODULE += mynewt-core_os | |||
ifneq (,$(filter nrf5%,$(CPU))) | |||
# don't pull nrf53 into the list | |||
ifneq (,$(filter nrf51 nrf52,$(CPU))) | |||
USEMODULE += mynewt-core_nrf5x_hal |
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.
This one also has support for nrf5340
and nrf91xx
- but why does it use vendor specific code in the first place?
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 don't know. I never really used neither nimble nor mynewt.
I also don't understand why this didn't occur sooner...
I'll look at nimble support for nRF53 in RIOT at some point but let's focus on basic stuff first.
bors merge |
Build succeeded! The publicly hosted instance of bors-ng is deprecated and will go away soon. If you want to self-host your own instance, instructions are here. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Thanks @benpicco ! |
tryTimed out. |
Contribution description
This PR provides support for nRF53 SPI and I2C.
It also moves common structs from each nRF CPU folder to
cpu/nrf5x_common
to avoid duplication.Moreover, since nRF9160 and nRF5340 have shared IRQ for UART/SPI/I2C. Both this families now use a common file to register and manage these interrupts. Note that nRF9160 have different name for its interrupts than nRF5340 but they have the same purpose.
Testing procedure
Since some structs were moved around, I think this PR should be carefully tested against nRF52, nRF53 and nRF9160 to avoid any issues.
On nRF5340DK-APP, SPI can be tested with its onboard SPI flash.
Issues/PRs references