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
 
  • I hope this helps: https://github.com/Lora-net/SWDR006. I don't see a direct support here and also in Cmake

    if(${CONFIG_HAS_SEMTECH_RADIO_DRIVERS})
    
    set(ZEPHYR_CURRENT_LIBRARY loramac-node)
    
    zephyr_library_include_directories(
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/boards
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/system
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/radio
    )
    
    zephyr_library_sources(
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/boards/mcu/utilities.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/system/systime.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/system/timer.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/system/delay.c
    )
    
    zephyr_library_sources_ifdef(CONFIG_HAS_SEMTECH_SX1272
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/radio/sx1272/sx1272.c
    )
    zephyr_library_sources_ifdef(CONFIG_HAS_SEMTECH_SX1276
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/radio/sx1276/sx1276.c
    )
    zephyr_library_sources_ifdef(CONFIG_HAS_SEMTECH_SX126X
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/radio/sx126x/sx126x.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/radio/sx126x/radio.c
    )
    
    if(${CONFIG_HAS_SEMTECH_LORAMAC})
      zephyr_library_include_directories(
        ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac
        ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region
        # required for FUOTA FragDecoder.h
        ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/apps/LoRaMac/common/LmHandler/packages
      )
    endif()
    
    zephyr_library_compile_definitions_ifdef(CONFIG_HAS_SEMTECH_SOFT_SE SOFT_SE)
    
    zephyr_library_sources_ifdef(CONFIG_HAS_SEMTECH_SOFT_SE
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/peripherals/soft-se/aes.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/peripherals/soft-se/cmac.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/peripherals/soft-se/soft-se.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/peripherals/soft-se/soft-se-hal.c
    )
    
    zephyr_library_sources_ifdef(CONFIG_HAS_SEMTECH_LORAMAC
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/LoRaMac.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/LoRaMacAdr.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/LoRaMacClassB.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/LoRaMacCommands.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/LoRaMacConfirmQueue.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/LoRaMacCrypto.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/LoRaMacParser.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/LoRaMacSerializer.c
    )
    
    zephyr_library_sources_ifdef(CONFIG_LORAWAN_FRAG_TRANSPORT_DECODER_SEMTECH
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/apps/LoRaMac/common/LmHandler/packages/FragDecoder.c
    )
    
    zephyr_library_sources_ifdef(CONFIG_HAS_SEMTECH_LORAMAC
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/Region.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionCommon.c
    )
    zephyr_library_sources_ifdef(CONFIG_LORAMAC_REGION_EU868
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionEU868.c
    )
    zephyr_library_sources_ifdef(CONFIG_LORAMAC_REGION_US915
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionBaseUS.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionUS915.c
    )
    zephyr_library_sources_ifdef(CONFIG_LORAMAC_REGION_CN779
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionCN779.c
    )
    zephyr_library_sources_ifdef(CONFIG_LORAMAC_REGION_EU433
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionEU433.c
    )
    zephyr_library_sources_ifdef(CONFIG_LORAMAC_REGION_AU915
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionBaseUS.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionAU915.c
    )
    zephyr_library_sources_ifdef(CONFIG_LORAMAC_REGION_AS923
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionAS923.c
    )
    zephyr_library_sources_ifdef(CONFIG_LORAMAC_REGION_CN470
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionBaseUS.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionCN470.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionCN470A20.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionCN470A26.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionCN470B20.c
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionCN470B26.c
    )
    zephyr_library_sources_ifdef(CONFIG_LORAMAC_REGION_KR920
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionKR920.c
    )
    zephyr_library_sources_ifdef(CONFIG_LORAMAC_REGION_IN865
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionIN865.c
    )
    zephyr_library_sources_ifdef(CONFIG_LORAMAC_REGION_RU864
      ${ZEPHYR_LORAMAC_NODE_MODULE_DIR}/src/mac/region/RegionRU864.c
    )
    
    endif()
    

  • Hi Andy,

    there is no driver code there

    I can see driver code for my SDK install:

    Maybe something went wrong in the installation?

    Try to run "west update" again, and check the folder again.

    Regards,
    Sigurd Hellesvik

  • 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

  • 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.

Related