Laird 453-00062-K1 Application Note Download Page 9

https://www.lairdconnect.com/ 

© Copyright 2021 Laird Connectivity, Inc.  

All Rights Reserved 

Americas

: +1-800-492-2320 

Europe

: +44-1628-858-940 

Hong Kong

: +852 2923 0610 

  Use pyOCD to start a GDB server with the module. The command line options are: pyocd gdbserver -t <TARGET> 

where <TARGET> can be nrf51, nrf52 or nrf52840. 

  If there is an issue during debugging, it could be related to the flash programming speed.  

The speed can be increased or reduced by using the -f <FREQUENCY> option. Try starting at 5M and decrementing by 
1. If programming still fails at 1 MHz then the setup of the programming board and target module should be 
investigated. Speeds can also be increased up to 8M for faster debugging. 

  Launch ARM GCC GDB from where your files to debug are located. 

  Connect from GDB to the server by sending the following command: target remote localhost:3333. 

You are now able to load/debug code on the target device. It is possible that external toolchains can be set up to allow 
debugging through a GUI. This is outside the scope of this document. 

 

The BT510 module can be programmed directly from a Zephyr RTOS build tree. For details and an example of how to do this, 
follow the instructions on the Zephyr documentation site

https://docs.zephyrproject.org/latest/boards/arm/bt510/doc/bt510.html

 

A boards file is included with Zephyr which maps the sensors/peripherals and GPIOs out for software development. We 
recommend that a complete application should have the application firmware and the mcuboot bootloader programmed so that 
the software on the unit can be upgraded in the field (for example, using Bluetooth). The design of such an upgrade system is 
outside the scope of this document. Details and information on this can be found on the Zephyr project website. 

 

The USB-SWD Programmer features a UART (J1) which can be used to connect to modules and other devices. A jumper 
must be fitted on J35 to route the pins to the UART interface, otherwise they are disconnected. Note that this is a UART 
interface which is exposed to the host PC, no external USB/PC UART cable needs to be connected to this PC for access of 
the UART by the PC. 

Note:

   Power is supplied via this interface (and subject to the same constraints as listed in th

Supplying Power to External 

Module/Device

 section) on the V

DD

 pin at the level set by the switches. There is a solder bridge (SB2) which can be 

cut to prevent this if it is not desired. 

The UART operates over the voltage range of 0v to V

DD

 (set by the switches) as a TTL UART and is not compatible with an 

RS232 UART. Connecting RS232 lines directly to the UART interface is likely to cause irreparable damage to the 
programming board and devices to which it is connected. A voltage level translation circuit is required for this operation which 
is outside the scope of this document. 

 

The pinout of this connector is displayed on the board, and is as follows: 

Pin 

Function 

Perspective (USB-SWD Programmer Board) 

Ground 

 

Summary of Contents for 453-00062-K1

Page 1: ...rt ARM 9 pin debug connector for connecting to modules 10 pin IDC connector for use with Tag Connect TC2050 IDC cable for connecting to BT510 sensors this port is not for connecting to any other devices UART with optional hardware flow control on the module side only supporting the following baud rates 1200 2400 4800 9600 14400 19200 38400 57600 115200 230400 460800 921600 1000000 3 3v or 1 8v out...

Page 2: ...aded from the MBED website https os mbed com docs mbed os v6 8 program setup windows serial driver html Once downloaded launch the installer and follow the instructions on screen to install the driver on your system Administrator access is required for the install to complete Once installed the USB SWD programmer is usable and a serial port should be visible along with a CMSIS debug interface The ...

Page 3: ...e recommend that you keep this switch on 1 8v if devices operating at less than 3 3v are connected This prevents any power passing from the USB SWD programmer board to the target device before the USB SWD programmer board s reference voltage circuitry has updated with the voltage being synchronised to all power systems on the board The USB SWD programmer has various volatile and non volatile optio...

Page 4: ...on from the connected device and puts this information into the LASTDEV TXT file Open LASTDEV TXT after USB drive refreshes It is populated with information from the attached module Note If readback protection is enabled then this information cannot be retrieved Table 2 displays the supported configuration options non volatile these are persistent even when the USB SWD programmer is powered off fo...

Page 5: ...that are specified for writing before programming via drag and drop programming as the default when the programming board is powered up does not change active configuration See volatile configuration for details After USB mass storage device refresh open DETAILS TXT check the Page erasing line should be 1 for non vol last_off cfg Disables listing the details of the last device programmed erased qu...

Page 6: ...tached device to retrieve information on the device which includes silicon revision flash RAM size and other details If readback protection is enabled then this information cannot be retrieved To read module information follow these steps 1 Attach the target device to the USB SWD programmer 2 Plug the SWD programmer into the PC with a micro USB cable 3 Ensure the programmer is set to the correct t...

Page 7: ...If the QSPI chip has a register command for enabling QSPI mode then this must be set enabled by code on the nRF52840 prior to downloading a hex file QSPI flash programming is only available on nRF52840 based modules and begins at the memory mapped address for QSPI access on the nRF52840 0x12000000 If the USB SWD programmer board needs to supply power to the target device ensure that the voltage ou...

Page 8: ...arget module If there is an issue during programming it could be related to the flash programming speed the speed can be reduced by using the f FREQUENCY option Try starting at 5M and decrementing by 1 If programming still fails at 1 MHz then the setup of the programming board and target module should be investigated Note When using pyOCD SPI QSPI flash devices cannot be programmed pyOCD can be us...

Page 9: ...ut for software development We recommend that a complete application should have the application firmware and the mcuboot bootloader programmed so that the software on the unit can be upgraded in the field for example using Bluetooth The design of such an upgrade system is outside the scope of this document Details and information on this can be found on the Zephyr project website The USB SWD Prog...

Page 10: ...erted facing downwards into the USB SWD programmer board with the components of the USB SWD programming facing upwards The Bx600 expects a baud rate of 9600 with flow control enabled by default Due to silicon constraints of the nRF51 the SWD programmer should be operating at 3 3v otherwise the flash of the nRF51 silicon in the connected BL600 module cannot be written to The Pinnacle 100 developmen...

Page 11: ...this mode the USB SWD programmer board acts as a passthrough device for the signals and supplies power to the BT510 To use the USB SWD programmer board in passthrough mode Set the USB SWD programmer board to supply power to the target module at 3 3v Connect the BT510 up to the programmer board by using the TagConnect TC 2050 IDC cable Remove the back plate from the BT510 remove the battery insert ...

Page 12: ...ctors and the USB cable from the board Place a jumper on the BOOTLOADER header near the USB port Plug in the micro USB cable Both the red and green LEDs illuminate at this point to indicate that the unit is in bootloader mode Remove the jumper from the BOOTLOADER header pin The USB drive should be called LC_SWDMAINT Copy the bin upgrade file from the firmware upgrade package to this drive The boot...

Page 13: ...named DEFAULT CFG Copy the DEFAULT CFG file and paste it into the USB SWD programmer mass storage device drive The programmer remounts itself and all settings are restored to default The settings and configuration are now restored to factory defaults Default settings of the USB SWD programmer are as follows Automatic reset enabled Page erasing non volatile enabled UART hardware flow control disabl...

Page 14: ...ic module type by creating an empty file nrf51 cfg for nRF51 based modules or nrf52 cfg for nRF52 based modules Copy it to the virtual flash drive then retry the write erase process If this still fails try reducing the maximum SWD clock speed by creating an empty file swd1mhz cfg and copying it to the virtual flash drive then retrying the write erase process again Problem The MSD drive does not ap...

Page 15: ...m After using pyOCD SWD access or other functionality is not working Possible Resolution At time of writing with pyOCD version 0 29 0 there appears to be a bug in that SWD is not configured but is dis configured in some circumstances There is currently no known workaround for this issue other than by disconnecting and reconnecting the USB SWD programmer to the computer Problem Data is being transm...

Page 16: ...t 2021 Laird Connectivity Inc All Rights Reserved Americas 1 800 492 2320 Europe 44 1628 858 940 Hong Kong 852 2923 0610 Acronym Description CMSIS Cortex M Software Interface Standard CDC Communications Device Class USB Universal Serial Bus ...

Page 17: ... modules bluetooth 5 modules bl652 series bluetooth v5 nfc module BL653 https www lairdconnect com wireless modules bluetooth modules bluetooth 5 modules bl653 series bluetooth 51 802154 nfc module BL653μ https www lairdconnect com wireless modules bluetooth modules bluetooth 5 modules bl653 micro series bluetooth 51 802154 nfc modules BL654 https www lairdconnect com wireless modules bluetooth mo...

Reviews: