Peripheral Registers Not Visible in Keil Debug Session (NRF52840)

Hi Nordic Support,

I am facing an issue where the peripheral registers are not visible in the Keil debugger during a debug session. Only the core registers are available, and I am unable to access peripheral registers through the System Viewer.

Development Environment:

  • IDE: Keil MDK-ARM (uVision) v5.43.1.0
  • Nordic SDK: nRF5 SDK v17.1.0 
  • Debug Probe: J-Link 
  • Device: nRF52840 

Board Details:

  • Marking on PCB: 10056
  • Hardware Revision: 3.0.3

Issue Description:

  • The application builds, programs, and runs successfully.
  • During debugging, the peripheral registers are not visible in Keil's System Viewer/Peripherals window.
  • I expected to see peripherals such as GPIO, UART, TIMER, etc., but they are missing.

Could you please let me know:

  1. Is there any additional configuration required in Keil to enable the peripheral register view?
  2. Does this depend on a specific Device Family Pack (DFP) or SVD file?
  3. Is this a known issue with this board or SDK version?

Any guidance would be appreciated.

Thank you!

  • Hi!

    I don't know for the nRF5 SDK, but for the NCS (zephyr-based) installation, the SVD file exists in e.g.:

    /opt/nordic/ncs/v3.4.0/modules/hal/nordic/nrfx/bsp/stable/mdk/nrf52840.svd

    You could take a look at this file: https://github.com/nrfconnect/sdk-hal_nordic/blob/main/nrfx/mdk/nrf52840.svd ,
    I believe it is the same.
     

    Regards,

    Kristian from the VSCode extension developer team

  • Hi,

    For Keil, the MDK is installed through the use of Packs. If you are able to build an SDK sample for the nRF52840, then you should most likely already have the correct Pack installed for the nRF52840. Otherwise the build is expected to fail, or at least you should have gotten an error or warning when opening the project. Please double check still that the packs are installed and updated, and/or that you are able to install/update, before you try again. Please also check that you have a valid Keil License (otherwise some functionality is not available.)

    Unfortunately, I was unable to check today in Keil uVision whether or not I could reproduce what you see. If needed, this is hopefully something we can check in our end next week. Let us know if you still do not manage to make it work.

    Have you previously seen the peripheral registers in the Keil debugger, with an nRF5 SDK project and an nRF device? Or, is this the first time you do this with an nRF device?

    Please note that if you are working on a new project, our recommendation is to use the new nRF Connect SDK, rather than the older and now in maintenance mode nRF5 SDK. For details, please se our nRF Connect SDK and nRF5 SDK statement. To be honest, the last time I debugged a project in Keil is so long ago I cannot remember how peripheral registers were accessed, if at all.

    Regards,
    Terje

  • Hi,

    I'm new to Nordic development and this is my first time using an nRF52840 with Keil MDK. I can see the CPU registers (R0–R15, xPSR, etc.) and the Core Peripherals in the Registers window, but I cannot see the nRF52840 peripheral registers (GPIO, SPIM, TIMER, UARTE, SAADC, etc.) in the System Viewer.

    My setup:

    • MCU: nRF52840_xxAA
    • IDE: Keil μVision 5.43.1
    • Debugger: J-Link
    • Nordic Device Family Pack: 8.44.1 (also tested 8.40)
    • ARM CMSIS Pack: 5.8

    I verified that the nrf52840.svd file is present in the Nordic Device Family Pack, and I also tried loading the SVD manually through View → System Viewer, but only Core Peripherals are shown.

    The same example project works correctly in Segger Embedded Studio, where I can view all peripheral registers without any issues.

    Has anyone seen this issue with recent Keil/Nordic pack versions? Is there any additional configuration required to make the nRF52840 peripheral registers appear in the debugger?

    Thanks in advance for any guidance. I'm still getting familiar with the Nordic/Keil environment.

                                                                                                                                                                           

  • Hi Rani

    If you're new to the Nordic development scene, I would strongly advice against using the nRF5 SDK and Keil, as the SDK supporting Keil at this point is very old and only in maintenance mode, with no new features being planned. Is there a specific reason you're using Keil and the nRF5 SDK for development? See the post here for details:  nRF Connect SDK and nRF5 SDK statement 

    For new designs and especially engineers new to the Nordic scene, we strongly recommend starting out with the nRF Connect SDK, which is the stable and up to date version we recommend for development. We have great introductory courses and documentation available to get you started with it. https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/ 

    Best regards,

    Simon

Related