Nordic Semiconductor nRF5340

From SEGGER Knowledge Base
(Redirected from nRF5340)
Jump to navigation Jump to search

The Nordic Semiconductor nRF5340 series are 32-bit wireless microcontrollers based on the Arm® Cortex®-M33 processor.

Flash Banks

APP Core

Flash Bank Base address Size J-Link Support
Internal Flash 0x00000000 1024 KB YES.png
UICR User 0x00FF8000 256 B YES.png
UICR OTP 0x00FF8100 768 B YES.png

NET Core

Flash Bank Base address Size J-Link Support
Internal Flash 0x01000000 256 KB YES.png
UICR User 0x01FF8000 2 KB YES.png

AHB-AP Protection

By default, the AHB-AP is protected. The J-Link will ask for a mass erase to disable the protection.

Note:

The unprotected state will only last until one of the following conditions are met:

  • Power-on reset
  • Brown-out reset
  • Watchdog-timer reset
  • Pin reset

To keep the AHB-AP unprotected after these conditions, firmware interaction is necessary.

For more information refer to https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf5340%2Fdebugandtrace.html&anchor=access_port_protection.

Reset

APP core

Standard reset strategy is performed.

NET core

Standard reset strategy is performed.

Tracing

This article describes how to get started with trace on the Nordic nRF5340 MCU. This article assumes that there is already a basic knowledge about trace in general (what is trace, what different implementations of trace are there, etc.). If this is not the case, we recommend to read Trace chapter in the J-Link User Manual (UM08001). The Nordic nRF5340 MCU implements tracing via pins, so a J-Trace can be used for tracing.

Minimum requirements

In order to use trace on the Nordic nRF5340 MCU devices, the following minimum requirements have to be met:

  • J-Link software version V7.50 or later
  • Ozone V3.24a or later (if streaming trace and / or the sample project from below shall be used)
  • J-Trace PRO for Cortex-M HW version V1.0 or later

To rebuild the project our IDE Embedded Studio can be used. The recommended version to rebuild the projects is V6.30. But the examples are all prebuild and work out-of-the box with Ozone, so rebuilding is not necessary.

Sample project

Streaming trace

The following sample project (for Nordic nRF5340-DK Rev. 0.11.0) is designed to be used with J-Trace PRO and Ozone to demonstrate streaming trace. The project has been tested with the minimum requirements mentioned above and a nRF5340-DK Rev. 0.11.0 board. The sample project comes with a pre-configured project file for Ozone that runs out-of-the box.

Nordic_nRF5340_APP_TracePins.zip

Note: The example is shipped with a compiled .JLinkScriptfile, should you need the original source, please get in touch with SEGGER directly via our support system: https://www.segger.com/ticket/.

To create your own .JLinkScriptfile you can use the following guide as reference: How_to_configure_JLinkScript_files_to_enable_tracing

Specifics/Limitations

The Nordic Semiconductor nRF5340 MCU uses a traceclock that is independent from the CPU clock. By hardware it is limited to maximum 32 MHz TCLK.

  • As for many other MCUs from Nordic, the trace clock for this MCU is not linked to the CPU clock.
  • The Nordic nRF5340-DK comes without a trace pin header. It has to be soldered onto the board by the user.
  • For the eval board to support maximum trace clock of 32 MHz modifications to be board are necessary. Solder bridges SB27-30 need to be cut. However be aware that this also disables the VCOM features of the on board J-Link!

Trace is only available on the Application core on this device. The Network core offers no trace logic.

Tested Hardware

This sample project was tested on a Nordic nRF5340-DK evaluation board.

nRF5340-DK