error: static assertion failed: "Only one of the following peripherals can be enabled: SPI1, SPIM1, SPIS1, TWI1, TWIM1, TWIS1. Check nodes with status \"okay\" in zephyr.dts."

I want to enable both spi and iic simultaneously on 52840

我在prj.conf中我同时开启如上图中的两个宏,但是发现编译报错如下所示

Parents
  • Hi,

     

    You must disable CONFIG_I2C and/or CONFIG_SPI to use the NRF_TWIM1 and NRF_SPIM1 instances in your application.

    Please note that the same instance(s) cannot be used simultaneously, meaning that you must de-init SPIM1 before initing TWIM1.

     

    If at all possible, I would recommend that you use SPIM1 + TWIM2 instead.

     

    Kind regards,

    Håkon

  • OK  thanks   i have  solve  the problem as you said, thanks

  • Glad to hear that you got it working.

    Hope you have a wonderful day!

     

    Kind regards,

    Håkon

Reply Children
No Data