Skip to content

SPIM3 buffer must be in first 64kB of RAM #3281

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 1 commit into from
Aug 17, 2020

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Aug 15, 2020

Fixes #3247 and fixes #3250 (@DavePutz, please test, thanks)
Fixes #3147
Fixes #2946

#3250: I believe this error is caused by #3147, which notes that the SPIM3 buffer is misplaced. To put it in its own 8kB region, the SoftDevice RAM area had to shrink from 64kB to 56kB. This was done by shrinking BLEIO_HVN_TX_QUEUE_SIZE from 9 to 5. The number of connections did not need to be reduced from its present 5.

For nRF52833, the special SPIM3 buffer is not necessary, because the SPIM3 peripheral does not suffer from the same hardware bug as on the nRF52840. So the SPIM3 buffer is disabled by default on nRF52833 builds.

I also cleaned up the mpconfigboard.mk files for nRF52833 and some nRF52840 boards. The nRF52833 boards no longer need to special-case removing the SPIM3 buffer. All nRF boards now have two I2C peripherals available, since SPIM3 can be used, so some needless definitions were removed.

The .ld template file was cleaned up for nRF: new RAM region start addreses and sizes are now defined and used. Sanity checking now takes places in mpconfigport.h to make sure the region sizes and locations make sense.

@xobs: I do not have nRF52833 boards to test, so could you test the reorganization of the settings? I moved some definitions around in mpconfigport.h which should have removed the need to do CFLAGS defines in the nRF52833 mpconfigboard.mk files. In particular the 32kB SD RAM size should still work. Thanks.

@dhalbert
Copy link
Collaborator Author

@DavePutz tested and this fixes #3247 and #3250. -- thanks!

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.

This looks good to me!

@dhalbert dhalbert merged commit 94ecf33 into adafruit:main Aug 17, 2020
@dhalbert dhalbert deleted the fix-spim3-buffer-location branch August 17, 2020 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants