Skip to content

Add support for nrf52833 #2789

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 8 commits into from
Apr 21, 2020
Merged

Add support for nrf52833 #2789

merged 8 commits into from
Apr 21, 2020

Conversation

xobs
Copy link

@xobs xobs commented Apr 21, 2020

This patchset adds support for nRF52833, including various modifications required to reduce memory and flash usage:

  • Making rgbmatrix and framebufferio optional
  • Making I2C, UART, and SPI optional
  • Making neopixel optional
  • Allowing configuration of the SoftRadio memory region
  • Allowing configuration of the SoftRadio memory settings
  • Allowing the bootloader size to be conditionally set

I'm a little concerned about 7d810e3 which was necessary, because otherwise the BLE config region was included in the firmware region which caused the SoftRadio to overwrite parts of Circuit Python when it went to update the BLE config settings, which made Circuit Python very unhappy.

xobs added 4 commits April 21, 2020 09:56
This flash chip is used in Simmel.

Signed-off-by: Sean Cross <[email protected]>
Add a conditional around the call to neopixel_write(), allowing us
to build for nrf without neopixel support.

Signed-off-by: Sean Cross <[email protected]>
Only initialize i2c, spi, and uart if building with BUSIO.

Signed-off-by: Sean Cross <[email protected]>
Ports can set CIRCUITPY_RGBMATRIX and CIRCUITPY_FRAMEBUFFERIO to 0
in their .mk file in order to prevent these from being built.  This
is necessary for resource-constrained devices.

Signed-off-by: Sean Cross <[email protected]>
xobs added 4 commits April 21, 2020 12:29
This adds preliminary support for the nRF52833, which is a variant of
the nRF52840 with half the RAM, half the flash, and fewer peripherals.

Signed-off-by: Sean Cross <[email protected]>
The BLE Config area needs to be subtracted from the size of the firmware.
THis is because the firmware is counted by walking backwards from the end
of memory, and the BLE config area is placed lower in memory than the
firmware.  Subtracting the BLE config size ensures the internal flash
filesystem doesn't try to use the firmware as storage.

Signed-off-by: Sean Cross <[email protected]>
Conditionally set variables such as the softdevice RAM size, bootloader
size, and the spi m3 buffer size.  This allows ports to adjust these
values to suit their needs.

Signed-off-by: Sean Cross <[email protected]>
Allow for setting various softradio memory settings as part of a
board in order to support lower-memory configurations.  If a
parameter is unspecified then the previously-defined value is used.

Signed-off-by: Sean Cross <[email protected]>
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Looks good to me! I have an '833 dev board so I'm excited to try it.

@tannewt tannewt merged commit ff9e388 into adafruit:master Apr 21, 2020
Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

It's late, but I'll submit a PR to fix this tomorrow, assuming it looks good to others. (EDIT: I did it now to sleep better)

@hathach
Copy link
Member

hathach commented Apr 22, 2020

@dhalbert we may need to upgrade the SD to v7 for nrf52833. S140 v6 is written before 833 is released

image

@dhalbert
Copy link
Collaborator

@xobs hmm, did you run into issues with SD v6.1.1?

@xobs
Copy link
Author

xobs commented Apr 22, 2020

I haven't run into any issues yet, though all I've done is run the scanning demo from Adafruit. Is there a Bluetooth regression suite I could run? I have one PCA10100 (nrf52833) and two PCA10059 (nrf52840) boards in my possession.

@dhalbert
Copy link
Collaborator

No test suite that I know of!

@xobs
Copy link
Author

xobs commented Apr 22, 2020

I'll look into updating to 7.0.1. It compiles, at least.

I'll do some testing and open a PR that adds 7.0.1 and bumps nrf52833 to use 7.0.1 instead of 6.1.1. I may have just gotten lucky given my limited testing abilities.

@dhalbert
Copy link
Collaborator

We could ask in https://devzone.nordicsemi.com/, but they would probably say it's not supported. The question is whether they would be willing to say that it should work OK, or whether they know of some fatal flaw.

@xobs
Copy link
Author

xobs commented Apr 22, 2020

Well, it built and scans and Appears To Work. So I made a PR: #2801

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

Successfully merging this pull request may close these issues.

4 participants