Skip to content

samples: SPI sample#761

Open
PizzaAllTheWay wants to merge 1 commit into
nrfconnect:mainfrom
PizzaAllTheWay:spi-sample
Open

samples: SPI sample#761
PizzaAllTheWay wants to merge 1 commit into
nrfconnect:mainfrom
PizzaAllTheWay:spi-sample

Conversation

@PizzaAllTheWay
Copy link
Copy Markdown
Contributor

@PizzaAllTheWay PizzaAllTheWay commented Apr 21, 2026

Add SPI sample with SPIM and SPIS support for single-device loopback and two-device setups (one or two data paths). Button 2 triggers a master transfer, LED 2 toggles on slave reception.

Includes:

  • SPIM and SPIS initialization and transfer handling
  • Board configuration with default pin mappings
  • Kconfig option for configurable message string
  • Documentation with wiring guide, pin conflict notes, and testing steps for all three wiring configurations

@github-actions github-actions Bot added changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. doc-required PR must not be merged without tech writer approval. labels Apr 21, 2026
@PizzaAllTheWay PizzaAllTheWay self-assigned this Apr 21, 2026
@github-actions github-actions Bot removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Apr 22, 2026
@PizzaAllTheWay PizzaAllTheWay changed the title spi testing spi sample Apr 22, 2026
@PizzaAllTheWay PizzaAllTheWay changed the title spi sample SPI sample Apr 22, 2026
@github-actions
Copy link
Copy Markdown

You can find the documentation preview for this PR here.

@PizzaAllTheWay PizzaAllTheWay marked this pull request as ready for review April 22, 2026 18:43
@PizzaAllTheWay PizzaAllTheWay requested review from a team as code owners April 22, 2026 18:43
@PizzaAllTheWay PizzaAllTheWay changed the title SPI sample samples: SPI sample Apr 22, 2026
Copy link
Copy Markdown
Contributor

@eivindj-nordic eivindj-nordic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some overall comments not diving in to the code.

Comment thread boards/nordic/bm_nrf54l15dk/include/board-config.h Outdated
#ifndef BOARD_APP_UARTE_INST
#define BOARD_APP_UARTE_INST NRF_UARTE30
/* Application SPI master configuration */
#ifndef BOARD_APP_SPIM_INST
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need board config for the other boards as well.

Copy link
Copy Markdown
Contributor Author

@PizzaAllTheWay PizzaAllTheWay May 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, this does however mean we need a bit of refactoring of the code, because not all SoC support master and slave SPI peripherals at the same time without modifying the board (eks: nRF54LV10)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I added new boards and refactored code and documentation to fit with the new sample code

Comment thread samples/peripherals/spi/CMakeLists.txt Outdated
Comment thread samples/peripherals/spi/README.rst Outdated
Comment thread samples/peripherals/spi/README.rst
Comment thread samples/peripherals/spi/README.rst Outdated
Comment thread samples/peripherals/spi/README.rst Outdated
Comment thread samples/peripherals/spi/README.rst Outdated
Comment thread samples/peripherals/spi/README.rst Outdated
Comment thread samples/peripherals/spi/README.rst Outdated
@PizzaAllTheWay PizzaAllTheWay force-pushed the spi-sample branch 2 times, most recently from f85aa8b to 2c5a4be Compare May 4, 2026 15:12
@eivindj-nordic eivindj-nordic added this to the v3.0.0 milestone May 7, 2026
@PizzaAllTheWay PizzaAllTheWay force-pushed the spi-sample branch 4 times, most recently from 4e33698 to eb946e4 Compare May 18, 2026 08:47
Add SPI sample with SPIM and SPIS support.
Button 2 triggers a master transfer, LED 2 toggles on slave reception.

Includes:
- SPIM and SPIS initialization and transfer handling
- Board configuration with default pin mappings for all supported DKs
- Kconfig option for configurable message string
- Documentation with wiring guide, pin conflict notes, and testing steps

Signed-off-by: Martynas Smilingis <martynas.smilingis@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-required PR must not be merged without tech writer approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants