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

Access to the peripheral registers in debug mode

HI Im trying to reduce the power consumption of my nrf52840 based device. And now I need to read peripheral register in debug mode but cant do it.I guess it is enabling in  project seting because   In example projects I am able to see it.  For instance saadc peripheral example.  I'm using SEGGER Embedded Studio for ARM Release 3.34a  Build 2018022300.35192 and nRF5_SDK_15.0.0.

Can you help me to enable this functionality.  

It is in my project This what I see in

Parents
  • Hi,

    Your project is probably missing the debug_register_definition_file. I am not sure how you set it in the SES GUI, but it should work to open the project file (.emProject) in an editor and adding the following line (you can compare with a example project file from the SDK):

          debug_register_definition_file="../../../../../../modules/nrfx/mdk/nrf52840.svd"

  • Einar,

    You are right in my project file I'm missing it but after when I add it. Again it does not show the registers.
    Can you check if there are more missing configurations

    <configuration
    Name="Common"
    arm_architecture="v7EM"
    arm_core_type="Cortex-M4"
    arm_endian="Little"
    arm_fp_abi="Hard"
    arm_fpu_type="FPv4-SP-D16"
    arm_linker_heap_size="2048"
    arm_linker_process_stack_size="0"
    arm_linker_stack_size="1024"
    arm_linker_treat_warnings_as_errors="No"
    arm_simulator_memory_simulation_parameter="RWX 00000000,00100000,FFFFFFFF;RWX 20000000,00010000,CDCDCDCD"
    arm_target_device_name="nrf52840_xxAA"
    arm_target_interface_type="SWD"
    c_preprocessor_definitions="NO_VTOR_CONFIG;CONFIG_APP_IN_CORE;NRF52_SERIES;NRF52840;NRF52840_XXAA;S140;SOFTDEVICE_PRESENT;NRF_SD_BLE_API_VERSION=6;BOARD_PCA10056;CONFIG_GPIO_AS_PINRESET"
    c_user_include_directories="src/CloudGWCom;src/power_management;src/Parser;src/STM/include;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/mem_manager;src/SensorDrivers;include;common/include;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/experimental_log/src;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/experimental_memobj;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/balloc;../nrf5_sdk/nRF5_SDK_15.0.0/components/softdevice/s140/headers/nrf52/;../nrf5_sdk/nRF5_SDK_15.0.0/modules/nrfx;../nrf5_sdk/nRF5_SDK_15.0.0/modules/nrfx/mdk;../nrf5_sdk/nRF5_SDK_15.0.0/modules/nrfx/hal;../nrf5_sdk/nRF5_SDK_15.0.0/modules/nrfx/templates/nRF52840;../nrf5_sdk/nRF5_SDK_15.0.0/components/toolchain/cmsis/include;../nrf5_sdk/nRF5_SDK_15.0.0/components/toolchain/gcc;../nrf5_sdk/nRF5_SDK_15.0.0/components/toolchain/cmsis/dsp/GCC;../nrf5_sdk/nRF5_SDK_15.0.0/components/boards;../nrf5_sdk/nRF5_SDK_15.0.0/integration/nrfx;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/log;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/util;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/delay;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/timer;../nrf5_sdk/nRF5_SDK_15.0.0/modules/nrfx/drivers/include;../nrf5_sdk/nRF5_SDK_15.0.0/integration/nrfx/legacy;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/timer;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/uart;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/bsp;../nrf5_sdk/nRF5_SDK_15.0.0/components/softdevice/common;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/experimental_section_vars;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/experimental_log;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/strerror;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/fstorage;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/mutex;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/serial;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/queue;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/atomic;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/atomic_fifo;../nrf5_sdk/nRF5_SDK_15.0.0/external/cJSON;..//external/micro-ecc;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/experimental_memobj;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/balloc;../nrf5_sdk/nRF5_SDK_15.0.0/external/fprintf;../nrf5_sdk/nRF5_SDK_15.0.0/components/ble/common;../nrf5_sdk/nRF5_SDK_15.0.0/components/ble/ble_services/ble_lbs;../nrf5_sdk/nRF5_SDK_15.0.0/components/ble/nrf_ble_gatt;../nrf5_sdk/nRF5_SDK_15.0.0/components/ble/nrf_ble_qwr;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/pwr_mgmt;../nrf5_sdk/nRF5_SDK_15.0.0/components/softdevice/s140/headers;../nrf5_sdk/nRF5_SDK_15.0.0/components/ble/ble_advertising;../nrf5_sdk/nRF5_SDK_15.0.0/components/ble/ble_services/ble_nus;../nrf5_sdk/nRF5_SDK_15.0.0/components/ble/ble_link_ctx_manager;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/button;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/atomic_flags;../nrf5_sdk/nRF5_SDK_15.0.0/components/libraries/fifo;"
    debug_additional_load_file="../nrf5_sdk/nRF5_SDK_15.0.0/components/softdevice/s140/hex/s140_nrf52_6.0.0_softdevice.hex"
    debug_start_from_entry_point_symbol="No"
    debug_target_connection="J-Link"
    debug_register_definition_file="../../../../../../modules/nrfx/mdk/nrf52840.svd"
    gcc_debugging_level="Level 3" linker_output_format="hex"
    macros="CMSIS_CONFIG_TOOL=../../../../../../external_tools/cmsisconfig/CMSIS_Configuration_Wizard.jar"
    linker_printf_width_precision_supported="Yes"
    linker_section_placement_file="$(ProjectDir)/flash_placement.xml"
    linker_section_placement_macros="FLASH_PH_START=0x0;FLASH_PH_SIZE=0x100000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x40000;FLASH_START=0x26000;FLASH_SIZE=0xf8000;RAM_START=0x200032c8;RAM_SIZE=0x3f000"
    linker_section_placements_segments="FLASH RX 0x0 0x100000;RAM RWX 0x20000000 0x40000"
    project_directory=""
    project_type="Executable" />

  • You have do adjust the path in the line I suggested so that it matched your project file location relative to the file it points to (the path I pasted matched the location of BLE projects files in the SDK).

    Referring to the other paths in your project file (e.g. debug_additional_load_file) it seems that it should be something like the following (but please correct yourself if it is not the case):

          debug_register_definition_file="../nrf5_sdk/nRF5_SDK_15.0.0/modules/nrfx/mdk/nrf52840.svd"

Reply Children
No Data
Related