Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add P8 smartwatch configuration #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

StarGate01
Copy link

@StarGate01 StarGate01 commented Mar 25, 2022

This PR adds support for a new hardware target; the P8(b) smartwatch. It is derived from the work by @tt1pjm and @ildar at https://github.com/ildar/pinetime-mcuboot-bootloader .

By default, the original Pinetime configuration is used and built. For the user, nothing changes except for an additional optional scripts parameter for scripts/nrf52/build-boot.sh (see README), and the location of the compiled binary.

The P8 watch differs from the Pinetime in a few minor points:

  • Different pins for the button (Now configurable via libs/pinetime_boot/syscfg.yml)
  • Some variants have no external low frequency crystal
  • Different SPI flash chips are used

Instead of the low frequency crystal, the internal RC oscillator is now used. This enables support of all hardware variants. Because no Bluetooth (which would depend on precise timings) is required, the RC clock is left uncalibrated.

In addition, I updated the dependencies mynewt-core and mcu-tools to their recent versions. mynewt-core contains a patch by me (apache/mynewt-core#2798), which adds support for a SPI flash chip found in some P8b watches. The bootloader is configured to accept a list of various SPI flash chips. This list should be extended in the future as more P8 variants are discovered and tested. any SPI flash chip.

This PR has been tested on a P8b smartwatch (cst716-6c.5 / sc7a20) and a Pinetime dev kit (cst816s-0.1 / bma421).

Let me know what you think. I am working on a port of InfiniTime itself as well in parallel (InfiniTimeOrg/InfiniTime#1050).

@StarGate01
Copy link
Author

StarGate01 commented May 26, 2022

Hey @JF002 , from what I saw you are maintaining this repository? This PR should be considered part of InfiniTimeOrg/InfiniTime#1050 .

@StarGate01
Copy link
Author

Ideally, any SPI chip should be accepted, because manufacturers often swap them without changing the hardware ID.

@StarGate01
Copy link
Author

This PR now uses mynewt-core from my fork, until apache/mynewt-core#2858 is merged.

This enables the use of many SPI chips without having to know and hardcode their respective JEDEC IDs beforehand.

* Split into pinetime (default) and p8 target
* Change LFCLK to LFRC to support devices without LF crystal
* Support various SPI flash chips by ignoring JEDEC IDs
* Use recent mynewt-core and mcu-tools
@StarGate01
Copy link
Author

This PR now uses the upsteam version again, since my PR apache/mynewt-core#2858 was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant