How many peripheral instance i can use in nRF5340?

Hi,

Greetings..

I am starting developing one application using nRF5340 MCU. My concern is related to peripheral instance. In my application i want to use 5 sensor/Peripheral at the same time so my question is..

1. Can i use 5 peripheral(3 I2C instance and 2 SPI instance) at the same time  with UART(for debugging)?

     TWI0 ( i2c0 )

     TWI1 ( i2c1 )

     TWI2 ( i2c2 )

    SPI0

    SPI1

2. If your ans of first question is YES then can i implement with BLE ?

3. Can i use 2 sensors with same i2c instance? If yes please provide me example for that.

My application is regarding activity tracker so i want to more then 5 sensor in this application. Please give me best solution.

Thank You.

  • Hello

    These peripherals are available (among others) on the NRF5340

    However, several of the peripherals share the same ID and only one from those could be used at a time.

    SPIM0, SPIS0, TWIM0, TWIS0, UARTE0 share the same ID # 8, and hence only one could be used, 

    Similarly for other peripherals that share the ID, please go through the product specificaiton (e.g pg 110 and chapter for peripherals): nRF5340 (nordicsemi.com)

    Regards,
    Naeem

  • Hi,

    Thanks for the answer, 

    so i can connect only five instance at time right?

    and what about the those que?

    2. If your ans of first question is YES then can i implement with BLE ?

    3. Can i use 2 sensors with same i2c instance? If yes please provide me example for that.

     

  • G gautam said:
    so i can connect only five instance at time right?

    No, Each peripheral have different amount of instances. You should look at the block diagram of peripheral in the application core where you can see that SPIM have 5 instances but other serial peripherals have only 4 instances.

    So you should be able to use only 4 instances at a time except that SPIM have the fifth instance.

    G gautam said:
    2. If your ans of first question is YES then can i implement with BLE ?

    Not sure what you mean here, but BLE protocol stack does not use any serial peripherals, so you can use combination of these serial devices along with BLE feature.

    G gautam said:
    3. Can i use 2 sensors with same i2c instance? If yes please provide me example for that.

    That is how I2C/TWI work by specification. You can connect as many slaves as possible to the same SDA/SCL lines and since each slave can be addressed with a unique address bits, I2C/TWI master can communicate to any slave using it unique address but still using the same two pins.

Related