This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Resource allocation

Hi, 

for my nrf52840 based project, I need to following peripherals :

 2 X SPIM Master

2 TWIM Master

1X TWIS Slave 

Given the resource sharing constraint, is this configuration even possible? 

if yes , is there a recommended configuration ? ( which SPI ID's to use for ex. )

Ran 

  • You can use any peripherals given that they do not share registers in RAM.
    Since SPIM0/1, TWIM0/1, and TWIS0/1 share registers you cannot use them at the same time. You must, therefore, use only one TWIM bus. 

    By looking at the base address of an instance, found in the peripheral's Registers chapter, we can find a solution where two instances does not overlap:

    TWIM0 or TWIS0, 0x40003000
    TWIM1 or TWIS1, 0x40004000
    SPIM2                 , 0x40023000
    SPIM3                 , 0x4002F000

Related