I wish to use SPI on a pin that it seems by default is not SPI, however I believe is remappable to SCL.

I am using a PIC32MZ2048EFH144 with Harmony. I have made the following assumptions:

  • Pin 6 Can be remapped to SDO
  • Pin 14 Can be remapped to SCK

I am attempting to confirm that this is the case, and so far I have.

  1. Looked at the datasheet and found that both pins are RPn pins (page 9)

6 - EBIA6/AN22/RPC1/PMA6/RC1

14 - AN14/C1IND/RPG6/SCK2/RG6

At the bottom of that page is states:

Note 1: The RPn pins can be used by remappable peripherals. See Table 1 for the available peripherals and Section 12.4 “Peripheral Pin Select (PPS)” for restrictions

Where section 12.4.2 Discusses that SPI is a remappable peripheral, as I believed, and can be remapped onto any pin with an "RP" designation

I wanted to give my thought process before asking my questions as I am new to Microchip development and therefore would like to know:

  1. Are my assumptions correct, and can I go forward with the thought of remapping the pins to SPI
  2. is there specific advice on remapping SPI pins that I should be aware of?

1 Answer 1


The SCL pin is from the I2C module. Do you mean the SDO or SDI pins?

In any case, if you have a look at the datasheet table 1-9, page 26 describes the SPI pinout and unfortunately, the SCK pin cannot be re-mapped but SCK2 is available on pin 14 for the 144 pin devices. As for the SDI and SDO pins, you also have to be careful as not all pins can be remapped to them however in table 12-2 we see that RPC1 can become the SDI pin for a few SPI modules and in table 12-3 we see that RPC1 could also become the SDO pin for a few SPI modules.

  • \$\begingroup\$ Yes, you are right, SDO & SCK, I don't actually need input back into the uIC from the SPI slave. So am I correct in saying I can use SCK on pin 14 & SDO on RPC1? \$\endgroup\$
    – GPPK
    Nov 30, 2017 at 15:52
  • \$\begingroup\$ Yes you are correct (I edited my answer as I had made a statement only correct for lower pin count devices of that chip familly). Using SPI module 2, the SCK2 routes to pin 14 (on 144 pin devices) and you can configure SDO2 to route to RPC1 via peripheral pin select. \$\endgroup\$
    – Mathieu L.
    Nov 30, 2017 at 20:03
  • \$\begingroup\$ You have been very useful to a struggling uChip dev! Thanks. This has really given me some confidence behind what I am trying to do. \$\endgroup\$
    – GPPK
    Dec 1, 2017 at 8:54
  • \$\begingroup\$ Your welcome. I have been were you are. Keep at it and try not to get overwhelmed. It gets easier as you learn more and more :-) \$\endgroup\$
    – Mathieu L.
    Dec 1, 2017 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.