Difference between revisions of "Nordic Semiconductor nRF5340"

From SEGGER Wiki
Jump to: navigation, search
(Minimum requirements)
(Streaming trace)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__TOC__
 
__TOC__
  +
==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 ==
 
== Reset ==
 
===APP core===
 
===APP core===
Line 23: Line 37:
 
The project has been tested with the minimum requirements mentioned above and a ''nRF5340-DK Rev. 0.11.0'' board.
 
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.
 
The sample project comes with a pre-configured project file for Ozone that runs out-of-the box.
In order to rebuild the sample project, [https://www.segger.com/embedded-studio.html SEGGER Embedded Studio] can be used. The recommended version to rebuild the projects is ES V6.30. But the examples are all pre-build and work out-of-the box with Ozone, so rebuilding is not necessary.
 
   
 
[[Media:Nordic_nRF5340_APP_TracePins.zip | Nordic_nRF5340_APP_TracePins.zip]]
 
[[Media:Nordic_nRF5340_APP_TracePins.zip | Nordic_nRF5340_APP_TracePins.zip]]
   
'''Note:''' The example is shipped with a compiled .JLinkScriptfile (.pex), should you need the original source, please get in touch with SEGGER directly via our support system: https://www.segger.com/ticket/.
+
'''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 project as reference: [https://wiki.segger.com/Tracing_on_ST_STM32F407_(SEGGER_Cortex-M_Trace_Reference_Board) Tracing on SEGGER_Cortex-M_Trace_Reference_Board]
+
To create your own .JLinkScriptfile you can use the following guide as reference: [[How_to_configure_JLinkScript_files_to_enable_tracing]]
   
 
==== Specifics/Limitations ====
 
==== Specifics/Limitations ====

Latest revision as of 15:03, 4 August 2023

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