This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Porting ble_thread_dyn_mtd_coap_cli from PCA10056 to PCA10059

Hello

I
have tested the example "ble_thread_dyn_mtd_coap_cli" from "nRF5_SDK_for_Thread_v0.11.0_84a130f" : this example works fine for a PCA10056 but I'd to test it on a PCA10059. When I had tried to make this project work for a PCA10059 (following the instructions given here "
devzone.nordicsemi.com/.../nrf52840-dongle -programming-tutorial "), it never worked: once the device programmed (with nRF Connect), nothing happened (the dongle is not detected once plugged into a COM port (if I push on reset button it is detected but it stays in boot mode) )
To migrate a project coming from PCA10056 towards PCA10059, what must be done in addition to only modifying BOARD_PCA10056 to BOARD_PCA10059?


Here are the characteristics of my project:

Section Placement Macros:
FLASH_PH_START=0x0
FLASH_PH_SIZE=0x100000
RAM_PH_START=0x20000000
RAM_PH_SIZE=0x40000
FLASH_START=0x27000
FLASH_SIZE=0xd5000
RAM_START=0x20002ae8
RAM_SIZE=0x3d518

Processor Definitions:
APP_TIMER_V2
APP_TIMER_V2_RTC1_ENABLED
APP_UART_DRIVER_INSTANCE=1
BOARD_PCA10059
CONFIG_GPIO_AS_PINRESET
ENABLE_FEM
FLOAT_ABI_HARD
INITIALIZE_USER_SECTIONS
MBEDTLS_CONFIG_FILE="nrf-config.h"
MBEDTLS_USER_CONFIG_FILE="nrf52840-mbedtls-config.h"
MULTIPROTOCOL_802154_CONFIG_PRESENT
NO_VTOR_CONFIG
NRF52840_XXAA
NRFX_PRS_ENABLED=0
NRF_SD_BLE_API_VERSION=7
OPENTHREAD_CONFIG_COAP_API_ENABLE
OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS=0
OPENTHREAD_CONFIG_FILE="openthread-config-wrap.h"
OPENTHREAD_MTD=1
S140
SOFTDEVICE_PRESENT
UART0_ENABLED=0
UART1_ENABLED=1



For the test, I programmed the nFR52840 DK with this program to see what is going on. But it blocks at the level of "nrf_drv_power_on_sd_enable".


Do you have any idea how to fix this problem?
Thank you

 

  • Hi,

    First of all, I would highly recommend you to switch from using nRF5 SDK for Thread v0.11.0 to using the latest nRF5 SDK for Thread and Zigbee v4.0.0 (latest release).

    I did a test with the latest SDK version, by changing BOARDS_PCA10056 to BOARDS_PCA10059, but I'm not able to run it on the dongle. It seems to run fine on the nRF52840 DK however. I think this is related to the lack of a UART port on the dongle, and/or GPIO config for LEDs and button(s). I will try to make a working version of the application for the dongle.

    Best regards,
    Jørgen

  • I did some more testing on this today, but it seems I always get a Hardfault in softdevice area when the OpenThread libraries are initialized on the Dongle. I did manage to run the application on a dongle that I erased and programmed through the debug-header, but I cannot get it to work with the bootloader present. I would highly recommend you to get a DK to do the development on, as the dongle does not provide good debug-capabilities.

  • Hi Jorgen

    Thank you for your tests.

    In reality, I have 3 DK boards and 20 dongles. My application was completely developed on the DK but I would like to incorporate it into the dongles to simulate a Thread network and use my features (I don't need the UART on the dongles). So that's why I need to be able to operate the dongle with my app.

    But I have another problem which I think is related to this one: I would like to use the bootloader on the pca10056 in order to use the DFU with the UART.
    For my tests, I programmed the pca10056 with the bootloader coming from the example "secure_bootloader_uart_mbr_pca10056_debug" and with the softdevice (s140_nrf52_7.0.1_softdevice.hex) and the "ble_thread_dyn_mtd_coap_cli_pca10056_S140" exemple. But I have also a Hardfault after calling the "otInstanceInitSingle()" function in the "thread_init" function...

    Is it possible that the problem is a linker problem ?

    I said that because I noticed that in the flash_placement.xml file I have:

      <MemorySegment name="ot_flash_data" start="0xfc000" size="0x4000">
        <ProgramSection alignment="4" keep="Yes" load="Yes" name=".ot_flash_data" address_symbol="__start_ot_flash_data" end_symbol="__stop_ot_flash_data" start = "0xfc000" size="0x4000" />
      </MemorySegment>


    This "start_ot_flash_data" address is 0xFC000. 
    But the range address of bootloader is 0xE4000 - 0xFE000 : is not that a problem?

    I tested by changing the "start_ot_flash_data" address to 0xF4000 but I still have the same problem…
    Do you think I need to change something else?

Related