This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nrf5340 TWIS (nrfx) support for Zephyr

Hi everybody,

We are trying to port our previous firmware from nrf52840 to nrf5340. The first issue we encountered is TWIS support. It looks like something is missing as we get the following compile errors (and many more, but for example). 

error: unknown type name 'NRF_TWI_Type'; did you mean 'NRF_TWIS_Type'?
    NRF_STATIC_INLINE void nrf_twi_shorts_set(NRF_TWI_Type *p_reg,
                                              ^~~~~~~~~~~~
                                               NRF_TWIS_Type

static const nrfx_twis_t s_twis = NRFX_TWIS_INSTANCE(1);

void i2c_isr_installer(void)
{
    IRQ_CONNECT(DT_IRQN(DT_NODELABEL(i2c1)),
                DT_IRQ(DT_NODELABEL(i2c1), priority),
                nrfx_isr, nrfx_twis_1_irq_handler, 0);
}

The rest follows the example, and was working perfectly for the nrf5284 soc. It looks like to us that the only way to use TWIS is Nordic's HAL and not Zephyr I2C slave library.

The config options:

CONFIG_I2C=y
CONFIG_I2C_NRFX=y
CONFIG_NRFX_TWI=y
CONFIG_NRFX_TWIS=y
CONFIG_NRFX_TWIS1=y

Thanks for the help in advance.

Regards,

Milan

Related