As part of efforts for providing MicroPython support, we are specifying the pin definitions for the Arduino Nano 33 BLE Sense. This Arduino board, is based upon the nRF52840 chip with the open source schematics available here.
We have a preliminary PR here, for updating the pin bindings.
Based on third party (Zephyr) documentation, it is stated that
Translate the ‘Pin’ into number for devicetree by using the following formula: pin_no = b*32 + a where a and b are from the Pin value in the table (Pb.a). For example, for P0.1, pin_no = 1 and for P1.0, pin_no = 32.
Figure 43 in section 6.9 of the nRF52840 Product Specification document shows PIN0 as an example. Yet, I do not find any official mention of how the GPIO pins, convert into `
PIN#`
.
...
To ensure that the MicroPython support of our nRF52840-based product is reliable, could you kindly provide a reference for this inside the official documentation for the nRF52840 or at least a confirmation that the statement above is accurate?