nRF5340 U-Blox Nora B120 FEM module

Hello,


I have U-Blox Nora B120 dev boards. Nora B120 chip has built in Skyworks SKY66405-11 FEM IC and I want to use it.

I read in the documentation to copy folder with board to SDK folder. I did that, but my program didn't compile.

Regarding to image above (which is a screenshot from the documentation): I copied ubx_evknorab12_nrf5340  - NOT ubx_evknorab10_nrf534 as in the picture above (nora B10 does not have built-in FEM)


Then I read to modify nrf5340dk folder. I did it and my program compiled. (screenshots from the documentation below)



Documentation links:
EVK-NORA-B1 User Guide
NORA-B1 series, system integration manual



But there is a problem.
My program is a combination of modified "ble-timesync-demo" and "Multi-NUS Central" / "Peripheral UART" programs.
LINKS:
https://github.com/nordic-auko/nRF5-ble-timesync-demo
https://github.com/NordicMatt/multi-NUS

This program has been divided into 2 separate programs. One is the MASTER - data receiver which sends the synchronization and second one is the PERIPHERAL - data transmitter which receives the synchronization.

With "normal" 5340dk configuration it works properly, but on modified 5340 board config - MASTER is receiving data and sending synchronization, but PERIPHERAL isn't receiving synchronization data.


Can you help me resolve this problem?

PS: For now I am using SDK v2.5.0. but I plan to upgrade to v2.8.0 or newer. Will the configuration changes needed to run FEM on Nora B120 in SDK v2.5.0 be the same as in v2.8.0 and v2.9.1?


Best Regards

Parents
  • Hello,

    I think perhaps U-blox will be able to provide the best support here... I will try to help, but you might want to start conversation with them as well.

    I checked the NORA-B1 EVK product page, and it seems that the "System Integration Manual" document you linked isn't listed.
    How did you arrive at that file? I find it quite strange that a guide involving modifying the nrf5340dk_nrf5340 target is in use when dedicated board file is already available. 

    I think we should try to stick with the dedicated board file for now and start with some simple application first.
    Could you please try the beacon sample in zephyr/samples/bluetooth/beacon?

    Best regards,

    Hieu

  • Hello,

    Bluetooth beacon sample doesn't compile on ubx_evknorab12_nrf5340_cpuapp. (on nrf5340dk_nrf5340_cpuapp it compiles).

    Terminal output:
    [.....]

    -- Including generated dts.cmake file: C:/TEST_Nordic_communication/beacon_TST/build_norab12/zephyr/dts.cmake
    Parsing C:/ncs/v2.5.0/zephyr/Kconfig
    Loaded configuration 'C:/ncs/v2.5.0/zephyr/boards/arm/ubx_evknorab12_nrf5340/ubx_evknorab12_nrf5340_cpuapp_defconfig'
    Merged configuration 'C:/TEST_Nordic_communication/beacon_TST/prj.conf'

    warning: the default selection BT_HCI_IPC (undefined) of <choice BT_HCI_BUS_TYPE> (defined at boards/shields\x_nucleo_idb05a1\Kconfig.defconfig:11, C:/ncs/v2.5.0/zephyr/boards/arm/ubx_evknorab12_nrf5340/Kconfig.defconfig:84, drivers/bluetooth/hci/Kconfig:11) is not contained in the choice

    error: Aborting due to Kconfig warnings

    CMake Error at C:/ncs/v2.5.0/zephyr/cmake/modules/kconfig.cmake:348 (message):
      command failed with return code: 1
    Call Stack (most recent call first):
      C:/ncs/v2.5.0/nrf/cmake/modules/kconfig.cmake:29 (include)
      C:/ncs/v2.5.0/zephyr/cmake/modules/zephyr_default.cmake:129 (include)
      C:/ncs/v2.5.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
      C:/ncs/v2.5.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
      CMakeLists.txt:4 (find_package)


    -- Configuring incomplete, errors occurred!
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/c57af46cb7/opt/bin/python.exe '-Bc:\TEST_Nordic_communication\beacon_TST\build_norab12' -GNinja -DBOARD=ubx_evknorab12_nrf5340_cpuapp -DNCS_TOOLCHAIN_VERSION=NONE -DBOARD_ROOT=c:/test_nordic_communication/beacon_tst '-Sc:\TEST_Nordic_communication\beacon_TST'

     *  The terminal process terminated with exit code: 1.
     *  Terminal will be reused by tasks, press any key to close it.  




    Regarding to "System Integration Manual" I found it in EVK-NORA-B1 user guide on page 24 - link [2] NORA-B1 system integration manual.


    Best regards

  • Hello,

    I tried also on NCS v2.6.1 and beacon sample compiles but my program is not working (for normal 5340dk it compiles).



    TERMINAL:

     *  Executing task: nRF Connect: Generate config ubx_evknorab12_nrf5340_cpunet for c:\_Nordic_TimeSync_MULTI\for_nrf5340_v261\timesync_sample_PERIPHERAL\timesync_sample 
    
    Building timesync_sample
    C:\Windows\system32\cmd.exe /d /s /c "west build --build-dir c:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/build_noraB12_v261 c:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample --pristine --board ubx_evknorab12_nrf5340_cpunet -- -DNCS_TOOLCHAIN_VERSION=NONE -DBOARD_ROOT=c:/_nordic_timesync_multi/for_nrf5340_v261/timesync_sample_peripheral/timesync_sample"
    
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample
    -- CMake version: 3.21.0
    -- Found Python3: C:/ncs/toolchains/cf2149caf2/opt/bin/python.exe (found suitable version "3.9.13", minimum required is "3.8") found components: Interpreter 
    -- Cache files will be written to: C:/ncs/v2.6.1/zephyr/.cache
    -- Zephyr version: 3.5.99 (C:/ncs/v2.6.1/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: ubx_evknorab12_nrf5340_cpunet
    -- Found host-tools: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/cf2149caf2/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: C:/ncs/v2.6.1/zephyr/boards/arm/ubx_evknorab12_nrf5340/ubx_evknorab12_nrf5340_cpunet.dts
    -- Found devicetree overlay: C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/app.overlay
    -- Generated zephyr.dts: C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/build_noraB12_v261/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/build_noraB12_v261/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/build_noraB12_v261/zephyr/dts.cmake
    
    warning: FPU (defined at soc/arm/nxp_imx/mcimx6x_m4/Kconfig.defconfig.mcimx6x_m4:11,
    soc/arm/nxp_s32/s32k3\Kconfig.defconfig.s32k344:11,
    soc/arm/nxp_s32\s32ze\Kconfig.defconfig.series:15, soc/arm\renesas_rzt2m\Kconfig.defconfig:15,
    arch/Kconfig:847) was assigned the value 'y' but got the value 'n'. Check these unsatisfied
    dependencies: ((SOC_MCIMX6X_M4 && SOC_SERIES_IMX_6X_M4) || (SOC_S32K344 && SOC_SERIES_S32K3XX) ||
    SOC_SERIES_S32ZE_R52 || SOC_RENESAS_RZT2M || CPU_HAS_FPU) (=n). See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_FPU and/or look up FPU in the
    menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values,
    and Kconfig - Tips and Best Practices sections of the manual might be helpful too.
    
    
    warning: NRFX_PPI (defined at C:/ncs/v2.6.1/zephyr/modules/hal_nordic\nrfx/Kconfig:160,
    modules\hal_nordic\nrfx/Kconfig:160) was assigned the value 'y' but got the value 'n'. Check these
    unsatisfied dependencies: n (=n). See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_NRFX_PPI and/or look up NRFX_PPI in the
    menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values,
    and Kconfig - Tips and Best Practices sections of the manual might be helpful too.
    
    
    warning: NRFX_TIMER3 (defined at C:/ncs/v2.6.1/zephyr/modules/hal_nordic\nrfx/Kconfig:430,
    modules\hal_nordic\nrfx/Kconfig:430, drivers/serial/Kconfig.nrfx:159) was assigned the value 'y' but
    got the value 'n'. Check these unsatisfied dependencies: (UART_0_NRF_HW_ASYNC_TIMER = 3 ||
    UART_1_NRF_HW_ASYNC_TIMER = 3 || UART_2_NRF_HW_ASYNC_TIMER = 3 || UART_3_NRF_HW_ASYNC_TIMER = 3)
    (=n). See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_NRFX_TIMER3 and/or look up
    NRFX_TIMER3 in the menuconfig/guiconfig interface. The Application Development Primer, Setting
    Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
    too.
    
    
    warning: NRFX_TIMER4 (defined at C:/ncs/v2.6.1/zephyr/modules/hal_nordic\nrfx/Kconfig:435,
    modules\hal_nordic\nrfx/Kconfig:435, drivers/serial/Kconfig.nrfx:166) was assigned the value 'y' but
    got the value 'n'. Check these unsatisfied dependencies: (UART_0_NRF_HW_ASYNC_TIMER = 4 ||
    UART_1_NRF_HW_ASYNC_TIMER = 4 || UART_2_NRF_HW_ASYNC_TIMER = 4 || UART_3_NRF_HW_ASYNC_TIMER = 4)
    (=n). See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_NRFX_TIMER4 and/or look up
    NRFX_TIMER4 in the menuconfig/guiconfig interface. The Application Development Primer, Setting
    Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
    too.
    
    Parsing C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/Kconfig
    Loaded configuration 'C:/ncs/v2.6.1/zephyr/boards/arm/ubx_evknorab12_nrf5340/ubx_evknorab12_nrf5340_cpunet_defconfig'
    Merged configuration 'C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/prj.conf'
    Configuration saved to 'C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/build_noraB12_v261/zephyr/.config'
    Kconfig header saved to 'C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/build_noraB12_v261/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38") 
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    CMake Warning at C:/ncs/v2.6.1/zephyr/CMakeLists.txt:1957 (message):
      __ASSERT() statements are globally ENABLED
    
    
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/build_noraB12_v261
    -- west build: building application
    [2/230] Generating include/generated/version.h
    -- Zephyr version: 3.5.99 (C:/ncs/v2.6.1/zephyr), build: v3.5.99-ncs1-1
    [71/230] Building C object CMakeFiles/app.dir/src/timesync/time_sync_nrf53.c.obj
    In file included from C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/src/timesync/time_sync_nrf53.c:7:
    C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/src/timesync/time_sync.h:69: warning: "TIME_SYNC_DESYNC_TIMEOUT" redefined
       69 | #define TIME_SYNC_DESYNC_TIMEOUT 120000000 /* Timeout for desynchronization [us] */
          | 
    C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/src/timesync/time_sync.h:68: note: this is the location of the previous definition
       68 | #define TIME_SYNC_DESYNC_TIMEOUT 60000000 /* Timeout for desynchronization [us] */
          | 
    [84/230] Building C object CMakeFiles/app.dir/src/main.c.obj
    FAILED: CMakeFiles/app.dir/src/main.c.obj 
    C:\ncs\toolchains\cf2149caf2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DNRF5340_XXAA_NETWORK -DPICOLIBC_LONG_LONG_PRINTF_SCANF -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/hal -IC:/ncs/v2.6.1/nrf/drivers/mpsl/clock_control -IC:/ncs/v2.6.1/zephyr/include -IC:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/build_noraB12_v261/zephyr/include/generated -IC:/ncs/v2.6.1/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.6.1/zephyr/soc/common/nordic_nrf/. -IC:/ncs/v2.6.1/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.6.1/zephyr/subsys/bluetooth -IC:/ncs/v2.6.1/zephyr/subsys/settings/include -IC:/ncs/v2.6.1/nrf/include -IC:/ncs/v2.6.1/nrf/lib/multithreading_lock/. -IC:/ncs/v2.6.1/nrf/subsys/bluetooth/controller/. -IC:/ncs/v2.6.1/zephyr/drivers/flash -IC:/ncs/v2.6.1/nrf/tests/include -IC:/ncs/v2.6.1/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.6.1/zephyr/modules/cmsis/. -IC:/ncs/v2.6.1/modules/hal/nordic/nrfx -IC:/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.6.1/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.6.1/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.6.1/modules/debug/segger/SEGGER -IC:/ncs/v2.6.1/modules/debug/segger/Config -IC:/ncs/v2.6.1/modules/crypto/tinycrypt/lib/include -IC:/ncs/v2.6.1/nrfxlib/mpsl/fem/common/include -IC:/ncs/v2.6.1/nrfxlib/mpsl/fem/nrf21540_gpio/include -IC:/ncs/v2.6.1/nrfxlib/mpsl/fem/nrf21540_gpio_spi/include -IC:/ncs/v2.6.1/nrfxlib/mpsl/fem/simple_gpio/include -IC:/ncs/v2.6.1/nrfxlib/mpsl/fem/include -IC:/ncs/v2.6.1/nrfxlib/mpsl/fem/include/protocol -IC:/ncs/v2.6.1/nrfxlib/mpsl/include -IC:/ncs/v2.6.1/nrfxlib/mpsl/include/protocol -IC:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/src/timesync -IC:/ncs/v2.6.1/nrfxlib/softdevice_controller/include -isystem C:/ncs/v2.6.1/zephyr/lib/libc/common/include -fno-strict-aliasing -O2 -imacros C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/build_noraB12_v261/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33+nodsp -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft --sysroot=C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.6.1/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.6.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.6.1=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -std=c99 -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles\app.dir\src\main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/src/main.c
    In file included from C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/src/main.c:36:
    C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/src/timesync/time_sync.h:69: warning: "TIME_SYNC_DESYNC_TIMEOUT" redefined
       69 | #define TIME_SYNC_DESYNC_TIMEOUT 120000000 /* Timeout for desynchronization [us] */
          | 
    C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/src/timesync/time_sync.h:68: note: this is the location of the previous definition
       68 | #define TIME_SYNC_DESYNC_TIMEOUT 60000000 /* Timeout for desynchronization [us] */
          | 
    In file included from C:/ncs/v2.6.1/modules/hal/nordic/nrfx/nrfx.h:38,
                     from c:\ncs\v2.6.1\zephyr\soc\arm\nordic_nrf\common\soc_nrf_common.h:14,
                     from C:/ncs/v2.6.1/zephyr/soc/arm/nordic_nrf/nrf53/soc.h:15,
                     from c:\ncs\v2.6.1\zephyr\modules\cmsis\cmsis_core_m.h:24,
                     from c:\ncs\v2.6.1\zephyr\modules\cmsis\cmsis_core.h:10,
                     from C:/ncs/v2.6.1/zephyr/include/zephyr/arch/arm/mpu/arm_mpu_v8.h:35,
                     from C:/ncs/v2.6.1/zephyr/include/zephyr/arch/arm/mpu/arm_mpu.h:19,
                     from C:/ncs/v2.6.1/zephyr/include/zephyr/arch/arm/arch.h:268,
                     from C:/ncs/v2.6.1/zephyr/include/zephyr/arch/cpu.h:19,
                     from C:/ncs/v2.6.1/zephyr/include/zephyr/kernel_includes.h:37,
                     from C:/ncs/v2.6.1/zephyr/include/zephyr/kernel.h:17,
                     from C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/src/main.c:7:
    C:/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/include/nrfx_gpiote.h:75:33: error: 'NRF_GPIOTEDT_N_ALIAS_syncpin_P_gpios_IDX_0_PH_P_gpiote_instance_IDX_0_PH_P_instance' undeclared here (not in a function)
       75 |     .p_reg        = NRFX_CONCAT(NRF_, GPIOTE, id),           \
          |                                 ^~~~
    C:/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/nrfx_common.h:168:32: note: in definition of macro 'NRFX_CONCAT_2_'
      168 | #define NRFX_CONCAT_2_(p1, p2) p1 ## p2
          |                                ^~
    C:/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/nrfx_utils_internal.h:384:34: note: in expansion of macro 'NRFX_CONCAT_2'
      384 | #define _NRFX_CONCAT_2(arg, ...) NRFX_CONCAT_2(arg, _NRFX_CONCAT_1(__VA_ARGS__))
          |                                  ^~~~~~~~~~~~~
    C:/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/nrfx_common.h:168:32: note: in expansion of macro '_NRFX_CONCAT_2'
      168 | #define NRFX_CONCAT_2_(p1, p2) p1 ## p2
          |                                ^~
    C:/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/include/nrfx_gpiote.h:75:21: note: in expansion of macro 'NRFX_CONCAT'
       75 |     .p_reg        = NRFX_CONCAT(NRF_, GPIOTE, id),           \
          |                     ^~~~~~~~~~~
    C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/src/main.c:178:42: note: in expansion of macro 'NRFX_GPIOTE_INSTANCE'
      178 | static const nrfx_gpiote_t gpiote_inst = NRFX_GPIOTE_INSTANCE(NRF_DT_GPIOTE_INST(DT_ALIAS(syncpin), gpios));
          |                                          ^~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/include/nrfx_gpiote.h:76:33: error: 'NRFX_GPIOTEDT_N_ALIAS_syncpin_P_gpios_IDX_0_PH_P_gpiote_instance_IDX_0_PH_P_instance_INST_IDX' undeclared here (not in a function)
       76 |     .drv_inst_idx = NRFX_CONCAT(NRFX_GPIOTE, id, _INST_IDX), \
          |                                 ^~~~~~~~~~~
    C:/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/nrfx_common.h:168:32: note: in definition of macro 'NRFX_CONCAT_2_'
      168 | #define NRFX_CONCAT_2_(p1, p2) p1 ## p2
          |                                ^~
    C:/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/nrfx_utils_internal.h:384:34: note: in expansion of macro 'NRFX_CONCAT_2'
      384 | #define _NRFX_CONCAT_2(arg, ...) NRFX_CONCAT_2(arg, _NRFX_CONCAT_1(__VA_ARGS__))
          |                                  ^~~~~~~~~~~~~
    C:/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/nrfx_common.h:168:32: note: in expansion of macro '_NRFX_CONCAT_2'
      168 | #define NRFX_CONCAT_2_(p1, p2) p1 ## p2
          |                                ^~
    C:/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/include/nrfx_gpiote.h:76:21: note: in expansion of macro 'NRFX_CONCAT'
       76 |     .drv_inst_idx = NRFX_CONCAT(NRFX_GPIOTE, id, _INST_IDX), \
          |                     ^~~~~~~~~~~
    C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/src/main.c:178:42: note: in expansion of macro 'NRFX_GPIOTE_INSTANCE'
      178 | static const nrfx_gpiote_t gpiote_inst = NRFX_GPIOTE_INSTANCE(NRF_DT_GPIOTE_INST(DT_ALIAS(syncpin), gpios));
          |                                          ^~~~~~~~~~~~~~~~~~~~
    In file included from C:/ncs/v2.6.1/zephyr/include/zephyr/toolchain/gcc.h:98,
                     from C:/ncs/v2.6.1/zephyr/include/zephyr/toolchain.h:50,
                     from C:/ncs/v2.6.1/zephyr/include/zephyr/kernel_includes.h:23:
    C:/ncs/v2.6.1/zephyr/include/zephyr/device.h:89:41: error: '__device_dts_ord_DT_N_ALIAS_syncpin_P_gpios_IDX_0_PH_ORD' undeclared here (not in a function)
       89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                         ^~~~~~~~~
    C:/ncs/v2.6.1/zephyr/include/zephyr/toolchain/common.h:137:26: note: in definition of macro '_DO_CONCAT'
      137 | #define _DO_CONCAT(x, y) x ## y
          |                          ^
    C:/ncs/v2.6.1/zephyr/include/zephyr/device.h:89:33: note: in expansion of macro '_CONCAT'
       89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                 ^~~~~~~
    C:/ncs/v2.6.1/zephyr/include/zephyr/device.h:216:37: note: in expansion of macro 'DEVICE_NAME_GET'
      216 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
          |                                     ^~~~~~~~~~~~~~~
    C:/ncs/v2.6.1/zephyr/include/zephyr/device.h:233:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
      233 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
          |                                  ^~~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.1/zephyr/include/zephyr/drivers/gpio.h:331:25: note: in expansion of macro 'DEVICE_DT_GET'
      331 |                 .port = DEVICE_DT_GET(DT_GPIO_CTLR_BY_IDX(node_id, prop, idx)),\
          |                         ^~~~~~~~~~~~~
    C:/ncs/v2.6.1/zephyr/include/zephyr/drivers/gpio.h:367:9: note: in expansion of macro 'GPIO_DT_SPEC_GET_BY_IDX'
      367 |         GPIO_DT_SPEC_GET_BY_IDX(node_id, prop, 0)
          |         ^~~~~~~~~~~~~~~~~~~~~~~
    C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/src/main.c:179:44: note: in expansion of macro 'GPIO_DT_SPEC_GET'
      179 | static const struct gpio_dt_spec syncpin = GPIO_DT_SPEC_GET(DT_ALIAS(syncpin), gpios);
          |                                            ^~~~~~~~~~~~~~~~
    In file included from C:/ncs/v2.6.1/zephyr/include/zephyr/arch/arm/arch.h:20:
    C:/ncs/v2.6.1/zephyr/include/zephyr/devicetree.h:238:32: error: 'DT_N_ALIAS_syncpin_P_gpios_IDX_0_VAL_pin' undeclared here (not in a function); did you mean 'DT_N_S_leds_S_led_1_P_gpios_IDX_0_VAL_pin'?
      238 | #define DT_ALIAS(alias) DT_CAT(DT_N_ALIAS_, alias)
          |                                ^~~~~~~~~~~
    C:/ncs/v2.6.1/zephyr/include/zephyr/devicetree.h:4352:9: note: in definition of macro 'DT_CAT7'
     4352 |         a1 ## a2 ## a3 ## a4 ## a5 ## a6 ## a7
          |         ^~
    C:/ncs/v2.6.1/zephyr/include/zephyr/devicetree/gpio.h:164:9: note: in expansion of macro 'DT_PHA_BY_IDX'
      164 |         DT_PHA_BY_IDX(node_id, gpio_pha, idx, pin)
          |         ^~~~~~~~~~~~~
    C:/ncs/v2.6.1/zephyr/include/zephyr/drivers/gpio.h:332:24: note: in expansion of macro 'DT_GPIO_PIN_BY_IDX'
      332 |                 .pin = DT_GPIO_PIN_BY_IDX(node_id, prop, idx),                 \
          |                        ^~~~~~~~~~~~~~~~~~
    C:/ncs/v2.6.1/zephyr/include/zephyr/drivers/gpio.h:367:9: note: in expansion of macro 'GPIO_DT_SPEC_GET_BY_IDX'
      367 |         GPIO_DT_SPEC_GET_BY_IDX(node_id, prop, 0)
          |         ^~~~~~~~~~~~~~~~~~~~~~~
    C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/src/main.c:179:44: note: in expansion of macro 'GPIO_DT_SPEC_GET'
      179 | static const struct gpio_dt_spec syncpin = GPIO_DT_SPEC_GET(DT_ALIAS(syncpin), gpios);
          |                                            ^~~~~~~~~~~~~~~~
    C:/ncs/v2.6.1/zephyr/include/zephyr/devicetree.h:238:25: note: in expansion of macro 'DT_CAT'
      238 | #define DT_ALIAS(alias) DT_CAT(DT_N_ALIAS_, alias)
          |                         ^~~~~~
    C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/src/main.c:179:61: note: in expansion of macro 'DT_ALIAS'
      179 | static const struct gpio_dt_spec syncpin = GPIO_DT_SPEC_GET(DT_ALIAS(syncpin), gpios);
          |                                                             ^~~~~~~~
    C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/src/main.c: In function 'main':
    C:/_Nordic_TimeSync_MULTI/for_nrf5340_v261/timesync_sample_PERIPHERAL/timesync_sample/src/main.c:1320:13: warning: unused variable 'errID' [-Wunused-variable]
     1320 |         int errID;
          |             ^~~~~
    [93/230] Building C object zephyr/kernel/CMakeFiles/kernel.dir/queue.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\cf2149caf2\opt\bin\cmake.EXE' --build 'c:\_Nordic_TimeSync_MULTI\for_nrf5340_v261\timesync_sample_PERIPHERAL\timesync_sample\build_noraB12_v261'
    
     *  The terminal process terminated with exit code: 1. 
     *  Terminal will be reused by tasks, press any key to close it. 


         Errors:

    C:/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/include/nrfx_gpiote.h:75:33: error: 'NRF_GPIOTEDT_N_ALIAS_syncpin_P_gpios_IDX_0_PH_P_gpiote_instance_IDX_0_PH_P_instance' undeclared here (not in a function)
    75 | .p_reg = NRFX_CONCAT(NRF_, GPIOTE, id), \

    C:/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/include/nrfx_gpiote.h:76:33: error: 'NRFX_GPIOTEDT_N_ALIAS_syncpin_P_gpios_IDX_0_PH_P_gpiote_instance_IDX_0_PH_P_instance_INST_IDX' undeclared here (not in a function)
    76 | .drv_inst_idx = NRFX_CONCAT(NRFX_GPIOTE, id, _INST_IDX), \

    C:/ncs/v2.6.1/zephyr/include/zephyr/device.h:89:41: error: '__device_dts_ord_DT_N_ALIAS_syncpin_P_gpios_IDX_0_PH_ORD' undeclared here (not in a function)
    89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)

    C:/ncs/v2.6.1/zephyr/include/zephyr/devicetree.h:238:32: error: 'DT_N_ALIAS_syncpin_P_gpios_IDX_0_VAL_pin' undeclared here (not in a function); did you mean 'DT_N_S_leds_S_led_1_P_gpios_IDX_0_VAL_pin'?
    238 | #define DT_ALIAS(alias) DT_CAT(DT_N_ALIAS_, alias)





    Best regards

  • Those are DTS errors. Look at the generated dts files in build/zephyr directories - some of the GPIOTE stuff is either missing or not enabled.

  • But why it compiles for normal nrf5340dk but not for nora B12 ? This is the same code.
    Nora added this config which 5340dk hasn't:

    nrf_radio_fem: norab12_fem {
            compatible = "skyworks,sky66112-11", "generic-fem-two-ctrl-pins";
            ctx-gpios = < &gpio1 0x8 0x0 >;
            crx-gpios = < &gpio1 0x9 0x0 >;
            tx-gain-db = < 0xa >;
            rx-gain-db = < 0x5 >;
    };


    Why it is not working for nora ?
  • I am having issue reproducing your observation, both your latest one with NCS v2.6.1, and your previous one 

    ..... said:
    warning: the default selection BT_HCI_IPC (undefined) of <choice BT_HCI_BUS_TYPE> (defined at boards/shields\x_nucleo_idb05a1\Kconfig.defconfig:11, C:/ncs/v2.5.0/zephyr/boards/arm/ubx_evknorab12_nrf5340/Kconfig.defconfig:84, drivers/bluetooth/hci/Kconfig:11) is not contained in the choice

    error: Aborting due to Kconfig warnings

    Could you please confirm that this is the board file you are using?
    https://github.com/u-blox/u-blox-sho-OpenCPU/tree/master/zephyr/boards/arm/ubx_evknorab12_nrf5340

    Please download another copy and run a compare.

    I have been hesitating to mention this, but have you contacted u-blox for more information on which board files should be used, and which SDK versions are supported with the board files?

    I would like to help you pinpoint more the issues first before recommending this, but this progress makes me think maybe it's better to check with them first.

  • I found why I had an error while compiling. In my project I have boards files, so I copied "nrf5340dk_nrf5340_cpunet" and "nrf5340dk_nrf5340_cpunet" files and changed name to "ubx_evknorab12_nrf5340_cpunet" and "ubx_evknorab12_nrf5340_cpuapp".
    Now it compiles.


    But I have question.
    How to turn on fem module ?

    For now I have this functions, but I'm not sure that is this proper way to turn on fem.

    CODE:

    #define TX_EN_PIN 8
    #define RX_EN_PIN 9

    void enable_pa() {

        nrf_gpio_cfg_output(TX_EN_PIN);
        nrf_gpio_pin_set(TX_EN_PIN);
    }
    void enable_lna() {
        nrf_gpio_cfg_output(RX_EN_PIN);
        nrf_gpio_pin_set(RX_EN_PIN);
    }

    I call this function in main() - (enable_lna() for central device and enable_pa() for peripheral device).

    My CENTRAL device mainly receives data, but also sends data sometimes.
    My PERIPHERAL device mainly sends data, but also receives data sometimes.

    Will it be good to turn on LNA (RX_EN) for CENTRAL device and PA (TX_EN) for PERIPHERAL device. I want to increase the transmission range.
    Will these settings improve the receiving range in CENTRAL and worsen the sending range and will they improve the sending range in PERIPHERAL and worsen the receiving range, or will they only improve those ranges without worsening anything?



Reply
  • I found why I had an error while compiling. In my project I have boards files, so I copied "nrf5340dk_nrf5340_cpunet" and "nrf5340dk_nrf5340_cpunet" files and changed name to "ubx_evknorab12_nrf5340_cpunet" and "ubx_evknorab12_nrf5340_cpuapp".
    Now it compiles.


    But I have question.
    How to turn on fem module ?

    For now I have this functions, but I'm not sure that is this proper way to turn on fem.

    CODE:

    #define TX_EN_PIN 8
    #define RX_EN_PIN 9

    void enable_pa() {

        nrf_gpio_cfg_output(TX_EN_PIN);
        nrf_gpio_pin_set(TX_EN_PIN);
    }
    void enable_lna() {
        nrf_gpio_cfg_output(RX_EN_PIN);
        nrf_gpio_pin_set(RX_EN_PIN);
    }

    I call this function in main() - (enable_lna() for central device and enable_pa() for peripheral device).

    My CENTRAL device mainly receives data, but also sends data sometimes.
    My PERIPHERAL device mainly sends data, but also receives data sometimes.

    Will it be good to turn on LNA (RX_EN) for CENTRAL device and PA (TX_EN) for PERIPHERAL device. I want to increase the transmission range.
    Will these settings improve the receiving range in CENTRAL and worsen the sending range and will they improve the sending range in PERIPHERAL and worsen the receiving range, or will they only improve those ranges without worsening anything?



Children
  • It's great that you have figured out the issue.

    As for the control of the FEM, by default, BLE applications built in NCS use the SoftDevice Controller and the Multiprotocol Service Layer, MPSL, by default. MPSL has FEM control integrated, and you don't have to worry about controlling FEM on your own. Please read more about it here: Developing with Front-End Modules.

    Further question on using the FEM would be a different topic, so please open a new case for it. We try to keep each case focused on one topic only.

  • Nora B12 in FEM module has built-in amplifier with 4 modes.
    In my previous question I meant about controlling these modes.
    Are there any functions for it or do I have to do it manually like I did above?

    As I said previously one of my devices mainly receives data (but sometimes sends data) other one
    mainly sends data (but sometimes receives data) and I want to improve transmission range (that's why I chose Nora B120).


    Will it be necessary to implement a mechanism for switching HIGH/LOW states on pins P1.08 (TX_EN) and P1.09 (RX_EN) when the device is sending or receiving data or maybe it will be enough to
    - turn HIGH on TX_EN (and LOW on RX_EN) in the device that mainly sends data
    and
    - turn HIGH on RX_EN (and LOW on TX_EN) in the device that mainly receives data.

    [ If that matters, would it affect the transmission range significantly or only slightly? ]
    Or maybe in current NCS versions it happens automatically and there is no need to set it up ?


    I also repeat the question:
    If I set P1.08 (TX_EN) to HIGH and P1.09 (RX_EN) to LOW then the transmitting range should increase, but will the receiving range/sensitivity decrease or remain the same?
       and
    If I set P1.08 (TX_EN) to LOW and P1.09 (RX_EN) to HIGH then the receiving range/sensitivity should increase, but will the transmitting range decrease or remain the same?




  • As I said in my last answer, the MPSL layer can take care of controlling all those modes automatically, and I would like to request again that further questions on FEM control be asked in a new case.

Related