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

TWIS instances

Hi,

I have a situation where I have to create 4 TWIS instances on nRF52832.

sdk_config.h only shows 2 TWIS instances.

// <q> TWIS0_ENABLED  - Enable TWIS0 instance
 

#ifndef TWIS0_ENABLED
#define TWIS0_ENABLED 0
#endif

// <q> TWIS1_ENABLED  - Enable TWIS1 instance
 

#ifndef TWIS1_ENABLED
#define TWIS1_ENABLED 1
#endif

Is it ok if I add other instances (TWIS2_ENABLED and TWIS3_ENABLED) in sdk_config myself (haven't tried it yet)

If not, how can I access 4 TWIS devices if I only create 1 instance of TWIS?

Parents Reply
  • as long as the total capacitance on the bus is not too high

    Indeed.

    Note that this is a standard I2C thing - not specific to Nordic.

    I2C is designed for short connections between chips on the same PCB - so, as says, capacitance should not normally be a problem.

    But a common case where problems do often arise is when prototyping and attaching dev kits together with long wires. Solderless breadboards are particularly notorious for having high capacitance.

    if you connect a scope to the bus you can see if the signalling looks OK

    Absolutely!

    An oscilloscope is an indispensable tool here!

    If capacitance issues do occur there are some ways to handle it

    there are also chips available for "extending" I2C buses where capacitance becomes a problem ...

    I would suggest adding a single slave at a time and make sure it all runs nicely

    Absolutely!

    As a general rule, always start simple - and work up...

Children
No Data
Related