CONFIG_SPI is not set in GPIO+SPI config of nRF21540 with nRF5340

Hello,

I am using nRf21540 and nRF5340 in GPIO+SPI config, where SPI is controlled via MPSL and separate spi0 bus.

I have configured the board files based on nordic,nrf21540-fem — Zephyr Project Documentation, and Enabling GPIO+SPI mode support for nRF21540

I get following in MPSL config in hci_ipc/build/zephyr/.config file:

#
# Multiprotocol service layer (MPSL)
#
# CONFIG_MPSL_FEM_ONLY is not set
CONFIG_MPSL_FEM_ANY_SUPPORT=y
CONFIG_MPSL_FEM_NRF21540_GPIO_SUPPORT=y
CONFIG_MPSL_FEM_NRF21540_GPIO_SPI_SUPPORT=y
# CONFIG_MPSL_FEM_DEVICE_CONFIG_254 is not set
# CONFIG_MPSL_FEM_LOG_LEVEL_OFF is not set
# CONFIG_MPSL_FEM_LOG_LEVEL_ERR is not set
# CONFIG_MPSL_FEM_LOG_LEVEL_WRN is not set
# CONFIG_MPSL_FEM_LOG_LEVEL_INF is not set
# CONFIG_MPSL_FEM_LOG_LEVEL_DBG is not set
CONFIG_MPSL_FEM_LOG_LEVEL_DEFAULT=y
CONFIG_MPSL_FEM_LOG_LEVEL=3
CONFIG_MPSL_THREAD_COOP_PRIO=8
CONFIG_MPSL_TIMESLOT_SESSION_COUNT=0
# CONFIG_MPSL_ASSERT_HANDLER is not set
# CONFIG_MPSL_TRIGGER_IPC_TASK_ON_RTC_START is not set
CONFIG_MPSL_LOW_PRIO_IRQN=26
# CONFIG_MPSL_LOG_LEVEL_OFF is not set
# CONFIG_MPSL_LOG_LEVEL_ERR is not set
# CONFIG_MPSL_LOG_LEVEL_WRN is not set
# CONFIG_MPSL_LOG_LEVEL_INF is not set
# CONFIG_MPSL_LOG_LEVEL_DBG is not set
CONFIG_MPSL_LOG_LEVEL_DEFAULT=y
CONFIG_MPSL_LOG_LEVEL=3
# end of Multiprotocol service layer (MPSL)

I am setting CONFIG_SPI=y in prj.conf for app core and mcuboot, but not for hci_ipc (net core). 

Hence *.config does not have CONFIG_SPI set for netcore. Is this ok? 

Is CONFIG_MPSL_FEM_NRF21540_GPIO_SPI_SUPPORT=y sufficient to allow netcore to control gain over SPI?

Thanks

Parents
  • Hi,

    From the docs you link:

    "On nRF53 devices, SPIM0 and UARTE0 are mutually exclusive AHB bus masters on the network core as described in the Product Specification, Section 6.4.3.1, Table 22. As a result, they cannot be used simultaneously. For the SPI part of the nRF21540 interface to be functional, you must disable the UARTE0 node in the network core’s devicetree file."

    This implies tha SPI is used on the netcore => CONFIG_SPI must be set from the netcore. See how Developing with the nRF21540 EK on 5340 adds the shield configuration to the network core. I bet this shield config contains CONFIG_SPI.

    Regards,
    Sigurd Hellesvik

  • Hi Sigurd,

    Yes I have disabled UARTE0 on netcore.

    Using only spi0 on hci_ipc

    We are not using the shield config in build command method. 

    So I will set CONFIG_SPI=y on netcore / hci_ipc image explicitly on top of CONFIG_MPSL_FEM_NRF21540_GPIO_SPI_SUPPORT=y

    Hopefully that is enough.

    Follow up question, I have 

    both

    CONFIG_MPSL_FEM_NRF21540_GPIO_SUPPORT=y
    CONFIG_MPSL_FEM_NRF21540_GPIO_SPI_SUPPORT=y

    Which one will MPSL use? GPIO or SPI?

    Thanks,
    Dhara

Reply
  • Hi Sigurd,

    Yes I have disabled UARTE0 on netcore.

    Using only spi0 on hci_ipc

    We are not using the shield config in build command method. 

    So I will set CONFIG_SPI=y on netcore / hci_ipc image explicitly on top of CONFIG_MPSL_FEM_NRF21540_GPIO_SPI_SUPPORT=y

    Hopefully that is enough.

    Follow up question, I have 

    both

    CONFIG_MPSL_FEM_NRF21540_GPIO_SUPPORT=y
    CONFIG_MPSL_FEM_NRF21540_GPIO_SPI_SUPPORT=y

    Which one will MPSL use? GPIO or SPI?

    Thanks,
    Dhara

Children
Related