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

boards: Add sma_q3 #3182

Merged
merged 1 commit into from
Sep 7, 2022
Merged

boards: Add sma_q3 #3182

merged 1 commit into from
Sep 7, 2022

Conversation

dcz-self
Copy link

@dcz-self dcz-self commented Aug 30, 2022

Pull Request Overview

This pull request adds initial support for the SMA_Q3 hardware used in the prototype Bangle.js 2 (kickstarter has a different temp sensor) and in Jazda devkit.

Tock is updating to new releases, some Tock contributors have the board, and the basic drivers are almost there. I think it's time to get serious and do further work on the upstreamed version.

The board is similar to the nrf52840 dongle, and so, the board support is nearly a copy of it.

Notable changes: different pins, no USB serial, a separate procedure to start processes (it's useful for debugging).

Testing Strategy

This pull request was tested by printing to the RTT console:

NRF52 HW INFO: Variant: AAC0, Part: N52840, Package: QI, Ram: K256, Flash: K1024

I don't have the ability to test Bluetooth or ieee802154, or the crypto functions.

I never managed to get the analog comparator to be useful (it's connected to battery voltage). The other components were tested out of tree, but not on this commit explicitly.

TODO or Help Wanted

This pull request still needs review.

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make prepush.

@dcz-self dcz-self force-pushed the sma_q3_ups branch 3 times, most recently from 7477375 to 92a3884 Compare August 30, 2022 14:40
Comment on lines +4 to +6
The SMA Q3 is the smart watch used in [Jazda 2.0](https://jazda.org) and Bangle.js 2.
It is a platform based around the nRF52840, an SoC with an ARM Cortex-M4 and a BLE radio.
The smart watch exposes 2 SWD pins, and includes 1 button, 1 backlight LED and a lot of assorted peripherals.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any sort of datasheet we can link to?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardware is not open, and the only resource I know about is this writeup by the Bangle.js 2 maker: https://hackaday.io/project/175577-hackable-nrf52840-smart-watch

I don't know how stable hackaday links are for the purpose of including in the docs, but I can add it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems better than nothing.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Included.

systick: cortexm4::systick::SysTick::new_with_calibration(64000000),
};

fn load_processes(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you comment on how this helps debugging? Other board maintainers might be interested.

Copy link
Author

@dcz-self dcz-self Aug 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I split this out to be able to start applications with a delay after the board is initialized. The benefit to debugging is that if I want to print some debug information while the board initalizes, it won't be affected by an application that prints so much that it overflows the output buffer.

Plus I find it a little clearer to have this part set aside as a unit. The inputs to starting the processes become explicit.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, and I made use of this for the "fake off" functionality, where if a button is pressed, processes are stopped, but when pressed again, they are loaded anew. This may not be needed any more after #3068 lands.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add this as a comment in the main.rs file?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, next to the procedure itself.

@@ -0,0 +1,27 @@
# Makefile for building the tock kernel for the nRF development kit
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

systick: cortexm4::systick::SysTick::new_with_calibration(64000000),
};

fn load_processes(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add this as a comment in the main.rs file?

@dcz-self dcz-self force-pushed the sma_q3_ups branch 2 times, most recently from 214d3d4 to ca594ec Compare September 2, 2022 18:37
@hudson-ayers hudson-ayers added the blocked-AfterRelease Waiting for an active release process to finish label Sep 6, 2022
@bradjc
Copy link
Contributor

bradjc commented Sep 7, 2022

bors r+

@dcz-self
Copy link
Author

dcz-self commented Sep 7, 2022

Thanks for the reviews, and congrats on releasing 2.1!

@bors
Copy link
Contributor

bors bot commented Sep 7, 2022

@bors bors bot merged commit eed4ce0 into tock:master Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked-AfterRelease Waiting for an active release process to finish
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants