Nano 33 BLE - enable the SPI1 sensors #67
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves: #51
There is an IO pin on the NANO that that when turned on, enables most of the sensors on the BLE sense which are on SPI1. The MBED version, enables this pin as part of the main().
Which I am trying to emulate. There is code already in, that if you use at least one of the zephyr device drivers, will eanble this pin. However that does not help when you are using external libraries or the like.
So I added details about this pin in our overlay file, in the zephyr,user section.
I then added code to main.cpp, that is only included if your are building using an NRFX board. Currently the nano and one of the nicla boards. Could also specically only do this on the NANO, but probably does not matter as, the code tries to find that property and only if it is found, does it turn on the pin.
Note: The MBED version turn on this pin with high drive. Which I emulated using the information, mentioned in the zephyr discussion.
zephyrproject-rtos/zephyr#78710 In one of my sketches I verified that the pin pads configuration looks the same as mbed setup.
With these changes I am able to access most of the sensors. Most of the testing has been done by @mjs513, with some by myself as well.