-
Notifications
You must be signed in to change notification settings - Fork 687
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
boards: Add sma_q3 #3182
Conversation
7477375
to
92a3884
Compare
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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems better than nothing.
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
boards/sma_q3/Makefile
Outdated
@@ -0,0 +1,27 @@ | |||
# Makefile for building the tock kernel for the nRF development kit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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?
214d3d4
to
ca594ec
Compare
bors r+ |
Thanks for the reviews, and congrats on releasing 2.1! |
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:
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
/docs
, or no updates are required.Formatting
make prepush
.