Skip to content

Add new board Seeed_XIAO_nRF52840 #5753

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

Merged
merged 5 commits into from
Dec 27, 2021
Merged

Add new board Seeed_XIAO_nRF52840 #5753

merged 5 commits into from
Dec 27, 2021

Conversation

0hotpotman0
Copy link

No description provided.

@tannewt
Copy link
Member

tannewt commented Dec 22, 2021

Thanks for the PR! I've added a commit to fix the formatting so make sure and pull it locally before modifying anything else locally.

@tannewt tannewt added board New board or update to a single board enhancement labels Dec 22, 2021
{ MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P0_06) },
{ MP_ROM_QSTR(MP_QSTR_GREEN_LED), MP_ROM_PTR(&pin_P0_30) },

{ MP_ROM_QSTR(MP_QSTR_6D_PWR), MP_ROM_PTR(&pin_P1_08) },
Copy link

@prplz prplz Dec 22, 2021

Choose a reason for hiding this comment

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

These won't be accessible because they start with a digit, which causes invalid syntax: board.6D_PWR

Choose a reason for hiding this comment

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

I suggest changing MP_QSTR_6D_PWR to MP_QSTR_IMU_PWR. After all, the 6-axis Inertial Measurement Unit is what 6D refers to.

{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_05) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_04) },

{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P0_26) },
Copy link

Choose a reason for hiding this comment

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

These should probably be named LED_* because they are channels of a single LED and to be consistent with the rp2040 xiao: https://github.com/adafruit/circuitpython/blob/main/ports/raspberrypi/boards/seeeduino_xiao_rp2040/pins.c#L39

{ MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P0_06) },
{ MP_ROM_QSTR(MP_QSTR_GREEN_LED), MP_ROM_PTR(&pin_P0_30) },

{ MP_ROM_QSTR(MP_QSTR_6D_PWR), MP_ROM_PTR(&pin_P1_08) },

Choose a reason for hiding this comment

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

I suggest changing MP_QSTR_6D_PWR to MP_QSTR_IMU_PWR. After all, the 6-axis Inertial Measurement Unit is what 6D refers to.

{ MP_ROM_QSTR(MP_QSTR_GREEN_LED), MP_ROM_PTR(&pin_P0_30) },

{ MP_ROM_QSTR(MP_QSTR_6D_PWR), MP_ROM_PTR(&pin_P1_08) },
{ MP_ROM_QSTR(MP_QSTR_6D_SCL), MP_ROM_PTR(&pin_P0_27) },

Choose a reason for hiding this comment

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

Change MP_QSTR_6D_SCL to MP_QSTR_IMU_SCL


{ MP_ROM_QSTR(MP_QSTR_6D_PWR), MP_ROM_PTR(&pin_P1_08) },
{ MP_ROM_QSTR(MP_QSTR_6D_SCL), MP_ROM_PTR(&pin_P0_27) },
{ MP_ROM_QSTR(MP_QSTR_6D_SDA), MP_ROM_PTR(&pin_P0_07) },

Choose a reason for hiding this comment

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

Change MP_QSTR_6D_SDA to MP_QSTR_IMU_SDA

{ MP_ROM_QSTR(MP_QSTR_6D_PWR), MP_ROM_PTR(&pin_P1_08) },
{ MP_ROM_QSTR(MP_QSTR_6D_SCL), MP_ROM_PTR(&pin_P0_27) },
{ MP_ROM_QSTR(MP_QSTR_6D_SDA), MP_ROM_PTR(&pin_P0_07) },
{ MP_ROM_QSTR(MP_QSTR_6D_INT1), MP_ROM_PTR(&pin_P0_11) },

Choose a reason for hiding this comment

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

Change MP_QSTR_6D_INT1 to MP_QSTR_IMU_INT1

{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_05) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_04) },

{ MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P0_26) },

Choose a reason for hiding this comment

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

Reviewing the schematic, I do find this LED connection on the nRF52840 but I cannot find the actual LED on the schematic. We will have to see with actual hardware if there is a second LED.

Copy link
Author

Choose a reason for hiding this comment

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

Hi @jpconstantineau
It is a GRB LED and control by P0.26(red), P0.03(green), P0.06(blue), and the second led just to work on charging mode.

{ MP_ROM_QSTR(MP_QSTR_MIC_PWR), MP_ROM_PTR(&pin_P1_10) },
{ MP_ROM_QSTR(MP_QSTR_PDM_CLK), MP_ROM_PTR(&pin_P1_00) },
{ MP_ROM_QSTR(MP_QSTR_PDM_DATA), MP_ROM_PTR(&pin_P0_16) },

Choose a reason for hiding this comment

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

I cannot find the following:
P0_14 READ_BATT_ENABLE
P0_31 VBATT
P0_17 CHARGE_STATUS

These should be added as the functionality is there and users will want to monitor battery charging status as well as battery level.

Copy link
Author

Choose a reason for hiding this comment

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

yes you right, I will add it

@0hotpotman0
Copy link
Author

Hi, @prplz @jpconstantineau @tannewt
I corrected the pin info, please check it.

Merry Christmas!!

Copy link

@jepler jepler left a comment

Choose a reason for hiding this comment

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

I think every requested change has been addressed and we're just waiting for the CI to be green.

@jepler jepler merged commit ea638c0 into adafruit:main Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
board New board or update to a single board enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants