LR1110 on nRF52840 board

Hello
I have a custom board with LR1110 Lora radio
I'm getting errors that driver is not supported when I define the spi1 for it

    lora0: lora@0 {
        compatible = "semtech,lr1110"; <--Unknown node type "nordic,lr1110"
And even though there is the lr1110 directory under C:\ncs\v3.0.1\modules\lib\loramac-node\radio\lr1110 there is no driver code there
So what are my options?
How do I integrate it into the Zephyr driver ecosystem ? 
My goals is to use the Zephyr lorawan API 
Thanks
 
Parents Reply
  • Sigurd

    I have the same set of files  - see below screenshot

    The problem is that I cannot select "semtech,lr1110" in the "compatible" section when I define the lora0 dts node
    The following semtech devices can be selected: sx1272,sx1261,sx1276 but there is no lr1110
    How do I get around that?

    Rajeev,

    The SWDR006  driver also does not exist in the SDK, so could you please clarify your instructions


    Thank you

Children
  • When you say "cannot be selected", can you share the build logs with the error saying this?

  • Sorry didn't make myself clear
    This is what I'm referring to

    Here are the errors I get in the bulid
    I do have CONFIG_LORA=y

    CONFIG_SPI=y
    CONFIG_SPI_NRFX=y
    CONFIG_SPI=y

    in the prj.conf 

    No SOURCES given to Zephyr library: loramac-node

    Excluding target from build.
    - zephyr/drivers/spi/CMakeFiles/drivers__spi.dir/spi_nrfx_spim.c.obj -c C:/ncs/v2.6.2/zephyr/drivers/spi/spi_nrfx_spim.c
    In file included from C:/ncs/v2.6.2/zephyr/include/zephyr/toolchain.h:50,
    from C:/ncs/v2.6.2/zephyr/include/zephyr/sys/util.h:18,
    from C:/ncs/v2.6.2/zephyr/include/zephyr/devicetree.h:26,
    from C:/ncs/v2.6.2/zephyr/include/zephyr/device.h:12,
    from C:/ncs/v2.6.2/zephyr/include/zephyr/drivers/spi.h:24,
    from C:/ncs/v2.6.2/zephyr/drivers/spi/spi_nrfx_spim.c:7:
    C:/ncs/v2.6.2/zephyr/include/zephyr/toolchain/gcc.h:87:36: error: static assertion failed: "/soc/spi@40003000 defined without sleep state"
    87 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG)
    | ^~~~~~~~~~~~~~
    c:\ncs\v2.6.2\zephyr\soc\arm\nordic_nrf\common\soc_nrf_common.h:235:9: note: in expansion of macro 'BUILD_ASSERT'
    235 | BUILD_ASSERT(!IS_ENABLED(CONFIG_PM_DEVICE) || \
    | ^~~~~~~~~~~~
    C:/ncs/v2.6.2/zephyr/drivers/spi/spi_nrfx_spim.c:625:9: note: in expansion of macro 'NRF_DT_CHECK_NODE_HAS_PINCTRL_SLEEP'
    625 | NRF_DT_CHECK_NODE_HAS_PINCTRL_SLEEP(SPIM(idx)); \
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.2/zephyr/drivers/spi/spi_nrfx_spim.c:692:1: note: in expansion of macro 'SPI_NRFX_SPIM_DEFINE'
    692 | SPI_NRFX_SPIM_DEFINE(0);
    | ^~~~~~~~~~~~~~~~~~~~
    [218/960] Building C object modules/nrf/subsys/bluetooth/controller/CMakeFiles/..__nrf__subsys__bluetooth__controller.dir/hci_driver.c.obj
    ninja: build stopped: subcommand failed.

  • Thanks for the clarifications.

    Yes, I agree with your first first impression: While there are lr1110 source code to be found in the SDK, this is not linked up against any Zephyr driver, and you can therefore not use it like you try to.

    Instead, you would have to add the driver in a Zephyr way. See DevAcademy on Lesson 7 – Device driver development.

Related