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

How can I use SPI and I2C interrupt at the same program in nRF52832?

Hi,

As well know, nRF52832 have more then one SPI and TWI interface.

How can I use SPI and TWI interface in the same program? for example, use SPI-0 and TWI-1.

Thank you,

Ives

Parents
  • Hi,

    1. You need to enable both peripherals in the project sdk config file.
    2. Add the proper source files for both peripherals. This usually consists of the drivers for the peripherals.
    3. Add the path to the source files to the projects settings.
    4. Initialize the peripherals in the project 
    5. Use them Slight smile

    The easiest approach is to merge the example projects in the SDK together. For example twi_scanner + SPIM example.

    best regards

    Jared 

Reply
  • Hi,

    1. You need to enable both peripherals in the project sdk config file.
    2. Add the proper source files for both peripherals. This usually consists of the drivers for the peripherals.
    3. Add the path to the source files to the projects settings.
    4. Initialize the peripherals in the project 
    5. Use them Slight smile

    The easiest approach is to merge the example projects in the SDK together. For example twi_scanner + SPIM example.

    best regards

    Jared 

Children
Related