Skip to content

fix UICR check; do not use NULL for no MISO #2571

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
Feb 1, 2020

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Feb 1, 2020

UICR fix

At least some CLUE's have NRF_UICR->REGOUT0 set to all 1's, which when the chip is in "high voltage mode" will make the outputs be 1.8V instead of 3.3V. However the nRF module on the CLUE is not in high voltage mode, so this register is ignored.

Nevertheless, we had code to fix this to rewrite REGOUT0, but it wasn't working because the update to nrfx v2.0.0 forced us to use a new nvm writing API, which doesn't let you write to UICR because it out of bounds of regular flash memory. I opened a ticket with Nordic about this: https://devzone.nordicsemi.com/f/nordic-q-a/57243/nrfx_nvmc-h-api-cannot-write-to-uicr.

I fixed the writing code (but it's not tested), and more importantly, didn't bother to do the UICR write if the module is not in high voltage mode. The voltage is fine as is.

board.c display initialization

The common_hal_busio_spi_construct() calls in all the board.c files with on-board displays were using NULL for the unused MISO pin. This worked for atmel-samd because it accepted both NULL and mp_const_none, but it didn't work on nrf, which only expected mp_const_none. (And other ports don't accept NULL either). If it worked it was by accident (some builds worked), probably assigning a random pin to MISO. I fixed all the those calls on all boards to pass mp_const_none instead of NULL.

@dhalbert dhalbert merged commit 19f1234 into adafruit:master Feb 1, 2020
@dhalbert dhalbert deleted the clue-fixes branch February 1, 2020 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants