Skip to content

Instantly share code, notes, and snippets.

@lupyuen
Last active April 5, 2021 07:12
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lupyuen/fb4cc04f03219d913cba8ec371f8c644 to your computer and use it in GitHub Desktop.
Save lupyuen/fb4cc04f03219d913cba8ec371f8c644 to your computer and use it in GitHub Desktop.
Test Plan for PineTime preloaded with InfiniTime

Test Plan for PineTime preloaded with InfiniTime

Here are the steps for testing PineTime preloaded with InfiniTime. This is to give the go-ahead to Pine64 for selling the new preloaded PineTime.

Check PineTime Features

Check the following upon unboxing and on every firmware update...

  1. Display: At startup PineTime shows a green "PINETIME" logo, then shows time and date. Initially the display shows "00:00" until the date and time are synched with nRF Connect (see below)

  2. Button: The date and time disappears in a few seconds. Pressing the button should restore the display. Pressing the button again will hide the display.

  3. Touch Panel: Swipe up from the bottom of the screen. The Menu should appear.

  4. Brightness: In the Menu, set the brightness to Low, Medium, High. The brightness should change.

Sync PineTime Date/Time with nRF Connect

Check the following upon unboxing and on every firmware update...

  1. Download the nRF Connect mobile app on Android and iOS to test the date/time sync with PineTime...

    https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Connect-for-mobile

  2. In nRF Connect, browse for the Pinetime-JF device and tap Connect

    If Pinetime-JF is not visible, or if Connect takes a long time, press the PineTime watch button to wake it up.

  3. Tap on MenuConfigure GATT ServerAdd Service

  4. Set Server Configuration to Current Time Service

  5. Tap OK

PineTime should automatically sync the date and time.

Update PineTime Firmware with nRF Connect

  1. On your Android or iOS phone, download ONE of the following FreeRTOS Firmware versions...

    For iOS, download with Safari and select Open WithnRF Connect

  2. In nRF Connect, browse for the Pinetime-JF device and tap Connect

    If Pinetime-JF is not visible, or if Connect takes a long time, press the PineTime watch button to wake it up.

  3. Tap the DFU circular icon at top right

  4. Select Distribution Packet (ZIP)

  5. Select the downloaded ZIP file. Wait for the upload to be completed.

  6. PineTime should reboot and run the new firmware

  7. Tap the screen, select Soft Version or 🛈 (i) or ✔️ (Tick)

  8. Check that the version number matches the firmware version that we have downloaded earlier: 0.8.0, 0.6.2 or 0.7.0

  9. For Firmware 0.8.0 and later: Tap the Validate button. This will tell the bootloader that the firmware update is sucessful, so that it won't roll back the firmware at the next reboot.

Testing of Pogo Pins

Connect Pogo Pins to PineTime and ST-Link v2 (or compatible)...

https://github.com/lupyuen/visual-embedded-rust/blob/master/README.md#connect-pinetime-to-raspberry-pi

PineTime should power on when ST-Link is connected to the USB port.

Verify that Flash ROM is not protected

On Linux or macOS: Connect ST-Link v2 (or compatible) to the SWD Port on PineTime. Run these steps to dump the Flash ROM with PineTime Updater...

# For macOS Only: Install brew according to https://brew.sh/
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

# Download the bash and OpenOCD scripts
git clone https://github.com/lupyuen/pinetime-updater

# Run the bash script to install xPack OpenOCD
cd pinetime-updater
./run.sh

# At the menu press Esc to exit

# Dump the Flash ROM
./scripts/flash-dump.sh

It should show...

**** Done! Check /tmp/nrf52-dump-boot.bin and nrf52-dump-app.bin

It should NOT show...

Error: Length of 4096 bytes with offset 0x00000000 is out of range of the flash bank

We test with ST-Link instead of JLink because ST-Link will always fail when Flash ROM Protection is enabled.

Test Results

Feature Device Result Remarks
Flash ROM Protection Unsealed OK Able to dump ROM, flash bootloader+firmware with ST-Link v2
Charging Sealed OK
Display, Button, Touch Panel, Brightness Sealed and Unsealed OK
Pogo Pins Unsealed OK Tested with ST-Link v2
Time Sync Sealed and Unsealed OK Android Pixel 4XL
Firmware Upgrade Sealed and Unsealed OK 0.7.0 to 0.8.1, via Android Pixel 4XL
Firmware Upgrade Sealed OK 0.8.1 to 0.8.2, via Android Pixel 4XL
Firmware Downgrade Lup's Android Pixel 4XL ??? 0.8.0 to 0.7.0
Time Sync Lup's iPhone 6 ???
Firmware Upgrade Lup's iPhone 6 ??? 0.7.0 to 0.8.0
Firmware Downgrade Lup's iPhone 6 ??? 0.8.0 to 0.7.0

There is a known problem with Time Sync on iOS. Nordic has not implemented Time GATT Service in iOS version of nRF Connect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment