PINE64
Pin configuration - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PineTime (https://forum.pine64.org/forumdisplay.php?fid=134)
+--- Forum: General Discussion on PineTime (https://forum.pine64.org/forumdisplay.php?fid=135)
+--- Thread: Pin configuration (/showthread.php?tid=10436)



Pin configuration - pratyush049 - 06-26-2020

sir,
i am working on wasp OS for pinetime want to check out the pin config of all protocols like spi, i2c, vibration motor pin, button pins etc. where can i find that file. i have been searching all day but didn't got. Can you help me out in this.

thankyou so much.


RE: Pin configuration - danielt - 06-26-2020

See https://github.com/daniel-thompson/micropython/blob/wasp-os/ports/nrf/boards/pinetime/pins.csv (which appears at micropython/ports/nrf/boards/pinetime/pins.csv in the sources).


RE: Pin configuration - pratyush049 - 06-29-2020

(06-26-2020, 08:20 AM)danielt Wrote: See https://github.com/daniel-thompson/micropython/blob/wasp-os/ports/nrf/boards/pinetime/pins.csv (which appears at micropython/ports/nrf/boards/pinetime/pins.csv in the sources).
Sir,
If i want to change pins numbers like i2c, lcd pins, heart sensor pins, flash pins etc. where can i find that file . i searched in micropython/ports/nrf/boards/pinetime/mpconfigboard.h  couldn't find all the pins configuration.

thank you


RE: Pin configuration - danielt - 06-29-2020

(06-29-2020, 12:50 AM)pratyush049 Wrote:
(06-26-2020, 08:20 AM)danielt Wrote: See https://github.com/daniel-thompson/micropython/blob/wasp-os/ports/nrf/boards/pinetime/pins.csv (which appears at micropython/ports/nrf/boards/pinetime/pins.csv in the sources).
Sir,
If i want to change pins numbers like i2c, lcd pins, heart sensor pins, flash pins etc. where can i find that file . i searched in micropython/ports/nrf/boards/pinetime/mpconfigboard.h  couldn't find all the pins configuration.

thank you

Why look in mpconfigboard.h? The file I linked to (pins.csv) is the file you must edit to reassign the pins. The fist column is the name, the second column is the port number and the third (optional) columns gives the alternative function.

Note also that if you are porting to a new board the best thing to do is make new (renamed) copies of the following directories:
  • bootloader/src/boards/pinetime_nrf52832
  • micropython/ports/nrf/boards/pinetime
  • reloader/src/boards/pinetime
  • wasp/boards/pinetime
Almost all the changes you need to make will be in these four directories.