1. Pin definition 1
2. PC Software install 2.1 JTAG drivers Before we proceed make sure that our system has the necessary JTAG JLink drivers for us to use the JLink module to program the nrf52 device via the Arduino IDE. The driver is available for free and is downloadable at the link below: https://www.segger.com/downloads/jlink 2.2 Getting your Arduino IDE ready for development In this first tutorials we will see how we can use the Arduino IDE with the itracker module. Since the itracker's core chipset is the nrf52832 from Nordic semi-conductor, we can program the nrf52 chipset right from withing the Arduino IDE 1. Download the Arduino IDE from the arduino.cc website https://www.arduino.cc/en/main/software 2. Run the executable on the desktop and proceed to File -> Preferences menu 3. Add https://sandeepmistry.github.io/arduino-nrf5/package_nrf5_boards_index.json as an "Additional Board Manager URL" 4. Open the Boards Manager from the Tools -> Board menu and install "Nordic Semiconductor nrf5 Boards" 5. Select your nrf5 board from the Tools -> Board menu NOTE: During installation it takes the Arduino IDE a few minutes to extract the tools after they have been downloaded, please be patient. 2.3 OS Specific Setup OS X No additional setup required. Linux For 64-bit Linux users, libc6:i386, libstdc++6:i386, libncurses5:i386 and libudev1:i386 need to be installed : 1. sudo dpkg --add-architecture i386 2. sudo apt-get update 3. sudo apt-get install libc6:i386 libstdc++6:i386 libncurses5:i386 libudev1:i386 2
Windows Driver Setup for mbed devices Download mbed Windows Serial driver Driver Setup for Segger J-Link 1. Download Zadig 2. Plugin Segger J-Link or DK board 3. Start Zadig,Select Options -> List All Devices 4. Plug and unplug your device to find what changes, and select the Interface 2 from the device dropdown 5. Click Replace Driver After above done, the device manager will display the BULK interface like below. 3
NOTE: To roll back to the original driver go to: Device Manager -> Right click on device -> Check box for "Delete the driver software for this device" and click Uninstall Now your itracker Board is ready to accept sketches from the arduino IDE. another step to make our development a little bit more easier is to add the itracker module in the IDE as a board. Let s do that next: 4
3. Add a itracker board in nrf5 Boards Modify \AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.4.0\boards.txt Add below information at the end (port from nrf52dk.name=nordic Semiconductor nrf52 DK) itracker.name=itracker itracker.upload.tool=sandeepmistry:openocd itracker.upload.protocol=jlink itracker.upload.target=nrf52 itracker.upload.maximum_size=524288 itracker.upload.setup_command=transport select swd; itracker.upload.use_1200bps_touch=false itracker.upload.wait_for_upload_port=false itracker.upload.native_usb=false itracker.bootloader.tool=sandeepmistry:openocd itracker.build.mcu=cortex-m4 itracker.build.f_cpu=16000000 itracker.build.board=itracker itracker.build.core=nrf5 itracker.build.variant=itracker itracker.build.variant_system_lib= itracker.build.extra_flags=-dnrf52 itracker.build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16 itracker.build.ldscript=nrf52_xxaa.ld itracker.build.lfclk_flags=-duse_lfxo itracker.menu.softdevice.none=none itracker.menu.softdevice.none.softdevice=none itracker.menu.softdevice.s132=s132 itracker.menu.softdevice.s132.softdevice=s132 itracker.menu.softdevice.s132.softdeviceversion=2.0.1 itracker.menu.softdevice.s132.upload.maximum_size=409600 itracker.menu.softdevice.s132.build.extra_flags=-dnrf52 -DS132 -DNRF51_S132 itracker.menu.softdevice.s132.build.ldscript=armgcc_s132_nrf52832_xxaa.ld below is the effect for Arduino ide. 5
in \AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.4.0\variants folder, copy nrf52dk folder and rename as itracker. Modify \AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.4.0\variants\iTracker\va riant.h like below to change the UART mapping. 6
4. Test itracker s Bluetooth function 4.1 install the BLEPeripheral library. 4.2 Select a BLE example 7
4.3 Set the board and burn softdevice. Board select itracker Softdevice select S132 Programmer select J-link Click nrf5 Flash SoftDevice 4.4 Verify and upload led_switch example When burn success, the UART assistant will show below: 8
9
5. Test using Phone APP 10