Difference between revisions of "nRF52 Series Devices"

From SEGGER Wiki
Jump to: navigation, search
(ES tracing sample)
(ES tracing sample)
Line 23: Line 23:
   
 
This project was created with Embedded Studio V4.18. The Trace settings assume that a J-Link Base or higher is used. If you are using a J-Link OB make sure to reduce the SWO Baud Rate in the project settings to a supported value e.g. 4 MHz.
 
This project was created with Embedded Studio V4.18. The Trace settings assume that a J-Link Base or higher is used. If you are using a J-Link OB make sure to reduce the SWO Baud Rate in the project settings to a supported value e.g. 4 MHz.
  +
  +
'''Note:''' For the nRF52 series target specific SWO pin init is needed. This is handled in this sample in the nRF_Target.js file under ./nRF/Scripts
  +
Simply use this file in your own Embedded Studio SWO application to make sure all target specific init steps are executed.
   
 
=Softdevice=
 
=Softdevice=

Revision as of 13:43, 30 July 2019

SWO

On the nRF52 series devices from Nordic Semiconductor, SWO is supported. However, a few device specifics apply which are described in the following section.

Clock source

For most devices, the SWO clock is derived from the current MCU clock. This is also the case for the nRF52 series devices. However on these devices, the SWO clock has an additional fixed divider. So when the MCU Clock is set to maximum 64 MHz the SWO clock is only maximum half of that which is 32 MHz. Depending of the setting in the TRACECONFIG register, this value can get divided down even further.

Note: J-Link handles the current setting of this register automatically when calculating the SWO speed to be used. J-Link software version V6.30i or later is required.

Note: When selecting the CPU frequency in third party IDEs for J-Link SWO usage, select 64 MHz for the nRF52 series devices. When using Embedded Studio set the "Trace Clock Speed" to 32 MHz and "SWO Baud Rate" to 16 MHz. Keep in mind that your J-Link probe must support such speeds. An example project for Embedded Studio can be found in the following section.

Sample projects

Sample projects that demonstrate SWO usage are available for the following eval board: PCA10040

SWO Viewer Sample

Sample1

This project was created with Embedded Studio V3.40. The SWO print stream can be made visible by either using JLinkSWOViewer or Ozone with the project enclosed in the Embedded Studio project.

ES tracing sample

Sample2

This project was created with Embedded Studio V4.18. The Trace settings assume that a J-Link Base or higher is used. If you are using a J-Link OB make sure to reduce the SWO Baud Rate in the project settings to a supported value e.g. 4 MHz.

Note: For the nRF52 series target specific SWO pin init is needed. This is handled in this sample in the nRF_Target.js file under ./nRF/Scripts Simply use this file in your own Embedded Studio SWO application to make sure all target specific init steps are executed.

Softdevice

Nordic Semiconductor offers a so called softdevice which acts like a boot loader for Bluetooth related communication on ther nRF device series. If a application is programmed that is using softdevice API you will need to download the softdevice first before downloading your application.

Sample project

The latest Nordic nRF5 SDK contains numerous example projects which work out-of-the-box with Embedded Studio. In these the softdevice loading is handled automatically. To be able to use Ozone now the PC and SP must be set correctly on the bootloader/softdevice that is programmed: Start debug session with bootloader

An example Ozone project for SDK application "ble_app_blinky" for the PCA10040 eval board can be found here: Ozone project