Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

nRF52811 with AP-Protect in nRF5 SDK

For an upcoming product based on the nRF52811 chipset I wanted to prepare for the arrival of the new AP-Protect variant of that chipset and have a unified firmware that runs on both AP-Protect and non-AP-Protect variants ready.

Recently nRF5 SDK 17.1.0 was released which includes support for the AP-Protect variants of the nRF52 chipset series, so I updated my software to that version.

But as it turned out the SDK is based on the MDK 8..40.3 where only some of the AP-Protect variants of the nRF52 chipsets are supported, but not the nRF52811 yet.

But now MDK version 8.44.2 is available in the meantime which seems to have full support for the AP-Protect variant of the nRF52811.

So the question is: do you have any plans to release a new nRF5 SDK with an updated MDK version that supports all AP-Protect variants? If so, can you please share an anticipated release date?

If there are currently no plans for a new nRF5 SDK, could you please share if and how it is possible to manually update the MDK in the SDK?

I briefly looked at doing this, but I could not figure out how to do it easily for my configuration. I am using Segger Embedded Studio, but I could not import the SES module, but the GCC version in ZIP format did not have the necessary start-up files, or at least the naming was different.

Parents
  • Hi,

    I am not aware of any current plans of new nRF5 SDK release, but you can upgrade the latest version manually to use a newer MDK.

    For SES projects:

    1. Find the SES version of the MDK in the dropdown menu on https://www.nordicsemi.com/Products/Development-tools/nRF-MDK/Download#infotabs and run the emPackage file. This will install the MDK files on the system. The SDK and existing projects
    2. Find the location of the installed files. This depends on OS:
      1. For Windows: %APPDATA%\..\Local\SEGGER\SEGGER Embedded Studio\v3\packages\nRF
      2. For Mac: ~/Library/SEGGER/SEGGER Embedded Studio/v3/packages/nRF
      3. For Linux: ~/.segger/SEGGER/SEGGER Embedded Studio/v3/packages/nRF
      4. If you do not find it in among the above locations, search for a file named nRF_package.xml. It should be in a folder named "packages" on the same level as the "nRF" folder.
    3. The example projects delivered with the SDK are hard coded to use the MDK files that are delivered as part of the SDK. For upgrading the full SDK to use the new MDK files, you therefore need to copy the files from the newly installed MDK, into the corresponding SDK folders. Here's what's where:
      1. For nRF5 SDK 15.0.0 and newer, the MDK files are to be placed direcly in <sdk root folder>\modules\nrfx\mdk
      2. For nRF5 SDK 14.2.0 and older, copy files to the following folders:
        1. <sdk root folder>\components\device:
          various *.h files, found at <mdk-install>\nRF\Device\Include
        2. <sdk root folder>\components\toolchain:
          system_nrf*.c files, found at <mdk-install>\nRF\Device\Source
          system_nrf*h files, found at <mdk-install>\nRF\Device\Include
        3. <sdk root folder>\svd:
          *.svd files, found at <mdk-install>\nRF\Device\Registers
        4. You may need some additional SES specific files that were not present in nRF5 SDK prior to version 15.0.0 since SES was not supported by the SDK back then. Since this means you must have set up or ported a project to SES previously, I assume that you know what to do (if anything) with the relevant files from the MDK install directory.
        5. Furthermore, depending on nRF5 SDK version, there may be updates needed for include paths and c files included in the project, for all MDK related files to be included in the build.

    Regards,
    Terje

  • I am not aware of any current plans of new nRF5 SDK release, but you can upgrade the latest version manually to use a newer MDK

    Thank you for your feedback. I am currently in the process of evaluating the changes that are introduced by the new MDK.

    I noticed that new registers called NRFMDK have been added in modules/nrfx/mdk/nrf52811.h which are described as Reserved for Nordic MDK

    Their only usage is as part of SystemInit() for devices that are affected by configuration 249 (ie. AP-PROTECT variants) and when these registers have their uninitialized value of 0xffffffff.

    void SystemInit(void)
    {
    [...]
            if (nrf52_configuration_249() && (NRF_UICR->NRFMDK[0] == 0xFFFFFFFF || NRF_UICR->NRFMDK[1] == 0xFFFFFFFF))
            {
                nvmc_config(NVMC_CONFIG_WEN_Wen);
                NRF_UICR->NRFMDK[0] = 0;
                nvmc_wait();
                NRF_UICR->NRFMDK[1] = 0;
                nvmc_wait();
                nvmc_config(NVMC_CONFIG_WEN_Ren);
            }
    [...]
    

    Because these registers are not used anywhere else, this is like some magic hardware switch that is toggled here.

    Can you please comment what this is supposed to achieve?

  • Hi,

    Those registers are regular UICR registers that are reserved for use by the MDK, similar to how the NRFFW registers are reserved for Nordic firmware. The details of their usage are not publicly documented.

    Regards,
    Terje

Reply Children
No Data
Related