Skip to content

Custom firmware for the NRF52 based smartwatch I6HRC

License

Notifications You must be signed in to change notification settings

mark078/chrzwatch-firmware

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CHRZ Watch Firmware

Custom firmware for the NRF52 based smartwatch I6HRC using the Mbed framework.

Development setup

Install Visual Studio Code and the PlatformIO extension. Then use the i6hrc env for deployment, or the nrf52_dk env for debugging on a NRF52-DK board.

Use doxygen or the "Build Documentation" task to generate documentation.

Modding a I6HRC watch

Solder the SWDCLK and SWDIO testpoints to the unused USB data lines. You might want to fabricate a custom USB to ISP adapter.

Flashing the watch

Flashing should work with any SWD capable programmer, like for example the ST-Link V2 (the cheap clones work too).

If the watch refuses to flash, hangs in low poer mode or is stuck in a bootloop, try connecting to it using OpenOCD (http://openocd.org/) while spamming the reset button on your adapter (or short SWDIO to VCC). This should not be needed during normal flashing and execution.

openocd -d2 -f interface/stlink-v2.cfg -c "transport select hla_swd" -f target/nrf52.cfg

On a successful connection OpenOCD displays something like "Info : nrf52.cpu: hardware has 6 breakpoints, 4 watchpoints". The script tools/reset.sh or the task "Reset Target" automates this spamming.

Optinally, open up GDB via telnet and reset the core using reset halt via telnet localhost 4444.

You can then exit the OpenOCD instance if you want to use a other tool for flashing (e.g. PlatformIO). The core should run normally (or hang at the reset vector if you reset it) and accept SWD connections and flash commands reliably. The PlatformIO flash tool should leave the core in a useable, running state.

Connecting to a phone

You can use the Android app "nRF Connect" (https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp&hl=en) to test the Bluetooth functions. Sometimes, connecting takes multiple tries.

Stock firmware

A dump of the stock ROM can be found at doc/stock_rom_dump.bin (armv7le) for decompiling (e.g. using Ghidra: https://ghidra-sre.org/) or restoring the watch (untested).

Thanks to and credits

Thanks to Aaron Christophel for providing instructions on how to modify the hardware, mapping out the pins and providing some demo Arduino code.

Library credits:

About

Custom firmware for the NRF52 based smartwatch I6HRC

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 97.5%
  • C 2.1%
  • Shell 0.4%