[riot-notifications] [RIOT-OS/RIOT] cpu/sam0_common: SPI: add support for QSPI in SPI mode (#15361)

benpicco notifications at github.com
Mon Nov 2 17:29:25 CET 2020

### Contribution description

The QSPI peripheral on sam0 can be used in two modes

 - memory mapped QSPI
 - SPI mode

Memory Mapped QSPI has the limitation that only 16 MiB of memory are mapped (0x0400 0000 – 0x0500 0000), so we can't address anything beyond that.
This means that in order to address large memory chips, we have to use SPI mode. Here the peripheral acts as a classic SPI master with MISO / MOSI lines, no Quad output capabilities.

Therefore I simply chose to extend the `periph/spi` driver with a `periph_spi_on_qspi` pseudo-module.
This gives an additional SPI device that doesn't use any SERCOM.

### Testing procedure

Filesystem tests should work (`tests/pkg_littlefs2`, `examples/filesystem`)

### Issues/PRs references

depends on #15360 for `mtd_spi_nor` to work 

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * cpu/sam0_common: SPI: cleanup
  * cpu/sam0_common: SPI: add support for SAMD20
  * cpu/sam0_common: SPI: add support for QSPI in SPI mode
  * boards/same54-xpro: add configuration for SPI flash

-- File Changes --

    M boards/same54-xpro/Makefile.dep (5)
    M boards/same54-xpro/board.c (32)
    M boards/same54-xpro/include/board.h (9)
    M boards/same54-xpro/include/periph_conf.h (20)
    M cpu/sam0_common/periph/spi.c (335)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201102/5a036db8/attachment-0001.htm>

More information about the notifications mailing list