Programming External Device wilth Peripheral UART (nRF Connect SDK)

I am programming an external device with the same code loaded onto the nRF5 DK. The sample works on the DK, It broadcasts and I can connect. However, when I program an external device, the programming (via jtag P20) seemingly is successful, however, the device does not appear to broadcast. Am I missing something here? Can you think of any reason this might not be working as expected? (FYI, the external nRF52832 device is the onboard BL652). 

Thanks. 

Parents Reply Children
  • If I run the debug, i do get warning messages, but... these are exactly the same as what I see when I run the program on the nRF52DK. The only difference is it doesnt want to run. Everything seems to be set up correclty (as far as I can tell), 

    The program displays 'problems'upon build:

    [{
    	"resource": "/c:/nordic/myapps/peripheral_uart/src/main.c",
    	"owner": "C/C++",
    	"code": "54",
    	"severity": 8,
    	"message": "too few arguments in invocation of macro \"Z_FOR_LOOP_1\"",
    	"source": "C/C++",
    	"startLineNumber": 124,
    	"startColumn": 4,
    	"endLineNumber": 124,
    	"endColumn": 11
    },{
    	"resource": "/c:/nordic/myapps/peripheral_uart/src/main.c",
    	"owner": "C/C++",
    	"code": "54",
    	"severity": 8,
    	"message": "too few arguments in invocation of macro \"Z_FOR_LOOP_1\"",
    	"source": "C/C++",
    	"startLineNumber": 154,
    	"startColumn": 4,
    	"endLineNumber": 154,
    	"endColumn": 11
    },{
    	"resource": "/c:/nordic/myapps/peripheral_uart/src/main.c",
    	"owner": "C/C++",
    	"code": "54",
    	"severity": 8,
    	"message": "too few arguments in invocation of macro \"Z_FOR_LOOP_1\"",
    	"source": "C/C++",
    	"startLineNumber": 171,
    	"startColumn": 4,
    	"endLineNumber": 171,
    	"endColumn": 11
    },{
    	"resource": "/c:/nordic/myapps/peripheral_uart/src/main.c",
    	"owner": "C/C++",
    	"code": "54",
    	"severity": 8,
    	"message": "too few arguments in invocation of macro \"Z_FOR_LOOP_1\"",
    	"source": "C/C++",
    	"startLineNumber": 217,
    	"startColumn": 3,
    	"endLineNumber": 217,
    	"endColumn": 10
    },{
    	"resource": "/c:/nordic/myapps/peripheral_uart/src/main.c",
    	"owner": "C/C++",
    	"code": "54",
    	"severity": 8,
    	"message": "too few arguments in invocation of macro \"Z_FOR_LOOP_1\"",
    	"source": "C/C++",
    	"startLineNumber": 247,
    	"startColumn": 4,
    	"endLineNumber": 247,
    	"endColumn": 11
    },{
    	"resource": "/c:/nordic/myapps/peripheral_uart/src/main.c",
    	"owner": "C/C++",
    	"code": "54",
    	"severity": 8,
    	"message": "too few arguments in invocation of macro \"Z_FOR_LOOP_1\"",
    	"source": "C/C++",
    	"startLineNumber": 270,
    	"startColumn": 3,
    	"endLineNumber": 270,
    	"endColumn": 10
    },{
    	"resource": "/c:/nordic/myapps/peripheral_uart/src/main.c",
    	"owner": "C/C++",
    	"code": "54",
    	"severity": 8,
    	"message": "too few arguments in invocation of macro \"Z_FOR_LOOP_1\"",
    	"source": "C/C++",
    	"startLineNumber": 275,
    	"startColumn": 3,
    	"endLineNumber": 275,
    	"endColumn": 10
    },{
    	"resource": "/c:/nordic/myapps/peripheral_uart/src/main.c",
    	"owner": "C/C++",
    	"code": "54",
    	"severity": 8,
    	"message": "too few arguments in invocation of macro \"Z_FOR_LOOP_1\"",
    	"source": "C/C++",
    	"startLineNumber": 286,
    	"startColumn": 3,
    	"endLineNumber": 286,
    	"endColumn": 10
    },{
    	"resource": "/c:/nordic/myapps/peripheral_uart/src/main.c",
    	"owner": "C/C++",
    	"code": "54",
    	"severity": 8,
    	"message": "too few arguments in invocation of macro \"Z_FOR_LOOP_1\"",
    	"source": "C/C++",
    	"startLineNumber": 405,
    	"startColumn": 2,
    	"endLineNumber": 405,
    	"endColumn": 9
    },{
    	"resource": "/c:/nordic/myapps/peripheral_uart/src/main.c",
    	"owner": "C/C++",
    	"code": "54",
    	"severity": 8,
    	"message": "too few arguments in invocation of macro \"Z_FOR_LOOP_1\"",
    	"source": "C/C++",
    	"startLineNumber": 469,
    	"startColumn": 4,
    	"endLineNumber": 469,
    	"endColumn": 11
    },{
    	"resource": "/c:/nordic/myapps/peripheral_uart/src/main.c",
    	"owner": "C/C++",
    	"code": "54",
    	"severity": 8,
    	"message": "too few arguments in invocation of macro \"Z_FOR_LOOP_1\"",
    	"source": "C/C++",
    	"startLineNumber": 594,
    	"startColumn": 2,
    	"endLineNumber": 594,
    	"endColumn": 9
    },{
    	"resource": "/c:/nordic/myapps/peripheral_uart/src/main.c",
    	"owner": "C/C++",
    	"code": "54",
    	"severity": 8,
    	"message": "too few arguments in invocation of macro \"Z_FOR_LOOP_1\"",
    	"source": "C/C++",
    	"startLineNumber": 632,
    	"startColumn": 4,
    	"endLineNumber": 632,
    	"endColumn": 11
    },{
    	"resource": "/c:/ncs/v2.0.0/zephyr/CMakeLists.txt",
    	"owner": "nrf-connect",
    	"severity": 4,
    	"message": "__ASSERT() statements are globally ENABLED",
    	"source": "cmake",
    	"startLineNumber": 1803,
    	"startColumn": 1,
    	"endLineNumber": 1803,
    	"endColumn": 2147483647
    },{
    	"resource": "/c:/ncs/v2.0.0/zephyr/modules/hal_nordic/nrfx/Kconfig",
    	"owner": "nrf-connect",
    	"severity": 4,
    	"message": "NRFX_UARTE0 (defined at C:\\ncs\\v2.0.0\\zephyr\\modules\\hal_nordic\\nrfx\\Kconfig:347,",
    	"source": "kconfig",
    	"startLineNumber": 347,
    	"startColumn": 1,
    	"endLineNumber": 347,
    	"endColumn": 2147483647
    }]

    And the debug console displays the following errors:

    Error: c:/ncs/toolchains\v2.0.0\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-nm-no-py.exe failed! statics/global/functions may not be properly classified: Error: spawn c:/ncs/toolchains\v2.0.0\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-nm-no-py.exe ENOENT
        Expecting `nm` next to `objdump`. If that is not the problem please report this.
    Error: objdump failed! statics/globals/functions may not be properly classified: Error: spawn c:/ncs\toolchains\v2.0.0\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-objdump-no-py.exe ENOENT    ENOENT means program not found. If that is not the issue, please report this problem.Launching gdb-server: "C:\\Program Files\\SEGGER\\JLink\\JLinkGDBServerCL.exe" -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device nRF52832_xxAA -select usb=483019567 -rtos "C:\\Program Files\\SEGGER\\JLink\\GDBServer\\RTOSPlugin_Zephyr.dll"
        Please check TERMINAL tab (gdb-server) for output from C:\Program Files\SEGGER\JLink\JLinkGDBServerCL.exe

    Again, the same messages are generated for each build (nRF52 DK & DVK-BL652). 

  • Laird provide a jtag programming application note for use with the DVK. However it uses nrf5 SDK, and shows a change required to the s132 soft device. This is similar to what you previously stated. However, I cannot find the options to modify the connect SDK, I'm looking in Kconfig, I assume this is correct? The settings are as follows:

    nrf_clock_lf_cfg_t const clock_lf_cfg = 
    {
        .source         =   0;
        .rc_ctiv        =   16,
        .rc_temp_ctiv   =   2,
        .accuracy       = NRF_SDH_CLOCK_LF_XTAL_ACCUARCY
    }

    I have been assuming these settings to be correct, but would like to check. 

  • AntMAN said:
    However, I cannot find the options to modify the connect SDK, I'm looking in Kconfig, I assume this is correct? The settings are as follows:

    For nRF Connect SDK you need to set 

    # 32kHz clock source
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_500PPM=y

    If you build for board bl652_dvk, this will already be set for you. https://github.com/nrfconnect/sdk-zephyr/blob/main/boards/arm/bl652_dvk/bl652_dvk_defconfig#L27

    AntMAN said:
    As for the settings you have mentioned, I have looked at the kconfig - and they already seem to be setup correctly for the corresponding board.

    Yes, I agree.

    AntMAN said:
    If I run the debug,

    Have you tired debugging using the Ozone? Do you get the same errors there?

  • Hi,

    so, I have followed a tutorial for programming using nfr5SDK, this involves programming the softdevice in addition to the example code. This worked! Lovely. It was my (lack of) understanding that the Connect SDK did not require programming the soft device... is this correct? Or was this the step I was missing? 

  • AntMAN said:
    It was my (lack of) understanding that the Connect SDK did not require programming the soft device... is this correct?

    Correct. In the nRF5-SDK the SoftDevice .hex need to be flashed together with your application.hex

    In nRF Connect SDK, it's all linked into a single .hex file

Related