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. 

  • Hi,

    I'm thinking either 

    1) The module does not have external LF crystal. In that case, set this config:

    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
    2) The module does not have DCDC components. In that case, try setting this:
    CONFIG_BOARD_ENABLE_DCDC=n
  • Hi, thanks for getting back so quickly. Yeah, okay... i think you're right about the extern crystal. But,  DCDC components? Not sure what this is, having a look. 

  • Hi, upon further inspection I can see that the DVK-BL652 does have an external crystal. 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.

    I am struggling to find out what the CONFIG_BOARD_ENABLE_DCDC option is doing. Could you please explain?

    That being said, I have tried turning off the DCDC mode board option (thereby modifying 'peripheral_uart\BL652_DVK\zephyr\.config'). The result remains unchanged. 

    I should add: when inspecting SIO_17 & SIO_18, I would expect to see the flashing of LEDS as on the nRF52DK (P0.17 & P0.18). As I am not seeing this, it would infer that the device is not running the program. Would you agree?

  • I found this in the BL652 datasheet:

    So yes, if you build for bl652_dvk board, CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC will bet set to y:

    https://github.com/nrfconnect/sdk-zephyr/blob/main/boards/arm/bl652_dvk/bl652_dvk_defconfig#L27

    AntMAN said:
    I am struggling to find out what the CONFIG_BOARD_ENABLE_DCDC option is doing. Could you please explain?

    It enables DCDC mode.https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/power.html?cp=4_2_0_17_0#topic

    Have you tried doing any debugging of the sample? Does it get stuck somewhere? Any log output?

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

Related