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
  • Hi Anita

    I am a bit confused whether or not you need the nRF52832 to be the TWI master or slave. 

    Do you really have 4 TWI master devices that all need to talk to the nRF52, or do you have 4 TWI slaves that you are trying to connect to the nRF52?

    Normally your controller (ie the nRF52) would be the master on the bus, and your sensors would be slaves. 
    In this configuration you can use a single master on the nRF52 device to communicate to all your slaves, since TWI allows a single bus to be shared between devices. 

    Best regards
    Torbjørn

Reply
  • Hi Anita

    I am a bit confused whether or not you need the nRF52832 to be the TWI master or slave. 

    Do you really have 4 TWI master devices that all need to talk to the nRF52, or do you have 4 TWI slaves that you are trying to connect to the nRF52?

    Normally your controller (ie the nRF52) would be the master on the bus, and your sensors would be slaves. 
    In this configuration you can use a single master on the nRF52 device to communicate to all your slaves, since TWI allows a single bus to be shared between devices. 

    Best regards
    Torbjørn

Children
Related