-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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 Mikoto board #985
Add Mikoto board #985
Conversation
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.
Thanks! A few thoughts/questions/changes.
app/boards/arm/mikoto/mikoto_520.dts
Outdated
|
||
&i2c0 { | ||
compatible = "nordic,nrf-twi"; | ||
sda-pin = <15>; |
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.
These seem to exactly match the nRFMicro pins. Are these actually the correct pins used for the i2c for the pro-micro locations?
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.
ahh sr, i wil fix that
app/boards/arm/mikoto/mikoto_520.dts
Outdated
tx-pin = <6>; | ||
rx-pin = <8>; |
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.
Same question.
CONFIG_FLASH_PAGE_LAYOUT=y | ||
CONFIG_FLASH_MAP=y | ||
CONFIG_CLOCK_CONTROL_NRF=y | ||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y |
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.
There's no 32K xtal on the Mikoto?
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.
it has 32k
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.
Then this line and the line above it should be removed. With this in place, Zephyr will use the internal RC for the 32khz timing, which is less energy efficient than using the actual xtal. You should test BLE functionality again, with a fresh build after removing your build directory, to be sure the hardware still works after the change.
Thanks.
app/boards/arm/mikoto/pinmux.c
Outdated
#if CONFIG_BOARD_MIKOTO_520 | ||
const struct device *p0 = device_get_binding("GPIO_0"); | ||
const struct device *p1 = device_get_binding("GPIO_1"); | ||
#if CONFIG_BOARD_MIKOTO_CHARGER |
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.
Interesting that this is firmware controllable, nice! Instead of this section like this, we should add a Kconfig choice
that allows selecting the charger value, something like:
choice BOARD_MIKOTO_CHARGER_CURRENT
prompt "Charge current to supply to attached batteries"
config BOARD_MIKOTO_CHARGER_CURRENT_100MA
bool "100mA charge current"
config BOARD_MIKOTO_CHARGER_CURRENT_250MA
bool "250mA charge current"
config BOARD_MIKOTO_CHARGER_CURRENT_NONE
bool "Disable charge current"
endchoice
The order is important, the first config item in the choice is the default.
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.
Minor tweak.
Co-authored-by: Pete Johanson <peter@peterjohanson.com>
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.
A few minor follow ups. Thanks again!
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.
Thanks!
Board/Shield Check-list
.zmk.yml
metadata file added&pro_micro
used in favor of&pro_micro_d/a
if applicableSource: https://github.com/zhiayang/mikoto