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

Configuring TWIS

Hello

I'm using the NRF52832 with softdevice 132.  My SDK version is 15.3.  My platform is WIndows 10.  

I am having trouble configuring the TWIS.  I've followed the instructions in the info center.  They are vague at best.  I could use a step by step procedure.

In addition, I'm using the template example and am doing my best to configure the NRFX directives.  I've tried to source some of the code from the master/slave example in the peripheral examples folder.  However, this code is configured using the older NRF_DRV  directives. 

thanks

Shawn  

Parents
  • Hello,

    I am sorry. We don't have step by step guides for all of our peripherals, but the examples typically is a good starting point to getting started. 

     

    I've tried to source some of the code from the master/slave example in the peripheral examples folder.  However, this code is configured using the older NRF_DRV  directives. 

     What example is that? The spis example? It doesn't use the old drivers. They actually use the nrfx drivers, but they typically use a wrapper (the non-nrfx names). I believe this is only for backwards compatibility. 

    Take the spis example, you can see that from main() it calls:

    nrf_drv_spis_init() -> nrfx_spis_init()

    You can of course skip the wrappers if you want to.

    One thing to be aware of when you configure the sdk_config.h defines is that there is a file called apply_old_config.h. This can cause some confusion if you have both the old driver defines, and the new NRFX defines defined differently. Take a look in that file, apply_old_config.h, and you will understand.

    Best regards,

    Edvin

  • Hello Edwin,

    The example I was referring to is "twi_master_with_twis_slave." 

    When I examine apply_old_config.h, most of the code under the TWI and TWIS sections is greyed out.  Does mean I failed to configure the TWIS peripheral correctly?

  • Gerber said:
    When I examine apply_old_config.h, most of the code under the TWI and TWIS sections is greyed out.  Does mean I failed to configure the TWIS peripheral correctly?

     No. It either means that TWI is not defined, but you have the NRFX_TWI defines instead, or it could simply be an IDE bug. 

    What I meant to highlight is that whether you use the NRFX defines or the "old " defines (the old names), it will use the nrfx drivers either way, as long as you use one of the latest SDKs.

    If you are in doubt, I can take a look at your sdk_config.h. But as long as the peripheral works, it is using the nrfx drivers.

Reply Children
Related