Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Working on testing out PPS support for Fubarino Mini

Also updating FB Mini varient files.
  • Loading branch information...
commit b13d49d49477d0ed712bfe86233b8aa52faba9eb 1 parent fba0808
Brian Schmalz authored
2  hardware/pic32/cores/pic32/p32_defs.h
View
@@ -393,7 +393,7 @@ typedef uint32_t p32_ppsin;
*/
#define _PPS_RPA0R 0
#define _PPS_RPA1R 1
-#define _PPS_RP12R 2
+#define _PPS_RPA2R 2
#define _PPS_RPA3R 3
#define _PPS_RPA4R 4
#define _PPS_RPA8R 8
148 hardware/pic32/variants/Fubarino_Mini/Board_Data.c
View
@@ -239,47 +239,39 @@ const uint8_t digital_pin_to_timer_PGM[] = {
** to the register.
*/
const uint8_t digital_pin_to_pps_out_PGM[] = {
- NOT_PPS_PIN, // 0 RB12 AN12/PMD0/RB12
- _PPS_OUT(_PPS_RPB11R), // 1 RB11 PGEC2/RPB11/PMD1/RB11
- _PPS_OUT(_PPS_RPB10R), // 2 RB10 PGED2/RPB10/CTED11/PMD2/RB10
- _PPS_OUT(_PPS_RPB9R), // 3 RB9 RPB9/SDA1/CTED4/PMD3/RB9
- _PPS_OUT(_PPS_RPB8R), // 4 RB8 RPB8/SCL1/CTED10/PMD4/RB8
- _PPS_OUT(_PPS_RPB7R), // 5 RB7 RPB7/CTED3/PMD5/INT0/RB7
- _PPS_OUT(_PPS_RPB6R), // 6 RB6 PGEC3/RPB6/PMD6/RB6
- _PPS_OUT(_PPS_RPB5R), // 7 RB5 PGED3/PRB5/PMD7/RB5
-
- // Connector JB
- _PPS_OUT(_PPS_RPC2R), // 8 RC2 AN8/RPC2/PMA2/RC2
- _PPS_OUT(_PPS_RPC5R), // 9 RC5 RPC5/PMA3/RC5
- _PPS_OUT(_PPS_RPC4R), // 10 RC4 RPC4/PMA4/RC4
- _PPS_OUT(_PPS_RPC8R), // 11 RC8 RPC8/PMA5/RC8
- _PPS_OUT(_PPS_RPC7R), // 12 RC7 RPC7/PMA0/RC7
- _PPS_OUT(_PPS_RPB13R), // 13 RB13 AN11/RPB13/CTPLS/PMRD/RB13
- _PPS_OUT(_PPS_RPB14R), // 14 RB14 CVREF/AN10/C3INB/RPB14/SCK1/CTED5/PMWR/RB14
- _PPS_OUT(_PPS_RPC6R), // 15 RC6 RPC6/PMA1/RC6
-
- // Connector JC
- _PPS_OUT(_PPS_RPB4R), // 16 RB4 SOSCI/RPB4/RB4
- _PPS_OUT(_PPS_RPB15R), // 17 RB15 AN9/C3INA/RPB15/SCK2/CTED6/PMCS1/RB15
- _PPS_OUT(_PPS_RPC3R), // 18 RC3 RPC3/RC3
- _PPS_OUT(_PPS_RPC9R), // 19 RC9 RPC9/CTED7/PMA6/RC9
- NOT_PPS_PIN, // 20 RA7 PGEC/TCK/CTED8/PMA7/RA7
- _PPS_OUT(_PPS_RPA8R), // 21 RA8 TDO/RPA8/PMA8/RA8
- _PPS_OUT(_PPS_RPA9R), // 22 RA9 TDI/RPA9/PMA9/RA9
- NOT_PPS_PIN, // 23 RA10 PGED/TMS/PMA10/RA10
-
- // Connector JD
- _PPS_OUT(_PPS_RPA0R), // 24 RA0 VREF+/CVREF+/AN0/C3INC/RPA0/CTED1/RA0
- _PPS_OUT(_PPS_RPA1R), // 25 RA1 VREF-/CVREF-/AN1/RPA1/CTED2/RA1
- _PPS_OUT(_PPS_RPC0R), // 26 RC0 AN6/RPC0/RC0
- _PPS_OUT(_PPS_RPC1R), // 27 RC1 AN7/RPC1/RC1
-
- // I2C Connector J2
- _PPS_OUT(_PPS_RPB2R), // 28 RB2 AN4/C1INB/C2IND/RPB2/SDA2/CTED13/RB2
- _PPS_OUT(_PPS_RPB3R), // 29 RB3 AN5/C1INA/C2INC/RTCC/RPB3/SCL2/RB3
-
- //User input jumper JP5 (treated like a switch)
- _PPS_OUT(_PPS_RPA4R) // 30 RA4 SOSCO/T1CK/CN0/RA4
+ _PPS_OUT(_PPS_RPB13R), // 0 RB13
+ NOT_PPS_PIN, // 1 RA10
+ NOT_PPS_PIN, // 2 RA7
+ _PPS_OUT(_PPS_RPB14R), // 3 RB14
+ _PPS_OUT(_PPS_RPB15R), // 4 RB15
+ _PPS_OUT(_PPS_RPA0R), // 5 RA0
+ _PPS_OUT(_PPS_RPA1R), // 6 RA1
+ _PPS_OUT(_PPS_RPB0R), // 7 RB0
+ _PPS_OUT(_PPS_RPB1R), // 8 RB1
+ _PPS_OUT(_PPS_RPB2R), // 9 RB2
+ _PPS_OUT(_PPS_RPB3R), // 10 RB3
+ _PPS_OUT(_PPS_RPC0R), // 11 RC0
+ _PPS_OUT(_PPS_RPC1R), // 12 RC1
+ _PPS_OUT(_PPS_RPC2R), // 13 RC2
+ _PPS_OUT(_PPS_RPA2R), // 14 RA2
+ _PPS_OUT(_PPS_RPA3R), // 15 RA3
+ _PPS_OUT(_PPS_RPA8R), // 16 RA8
+ _PPS_OUT(_PPS_RPB4R), // 17 RB4
+ _PPS_OUT(_PPS_RPA4R), // 18 RA4
+ _PPS_OUT(_PPS_RPA9R), // 19 RA9
+ _PPS_OUT(_PPS_RPC3R), // 20 RC3
+ _PPS_OUT(_PPS_RPC4R), // 21 RC4
+ _PPS_OUT(_PPS_RPC5R), // 22 RC5
+ _PPS_OUT(_PPS_RPB5R), // 23 RB5
+ _PPS_OUT(_PPS_RPB7R), // 24 RB7
+ _PPS_OUT(_PPS_RPB8R), // 25 RB8
+ _PPS_OUT(_PPS_RPB9R), // 26 RB9
+ _PPS_OUT(_PPS_RPC6R), // 27 RC6
+ _PPS_OUT(_PPS_RPC7R), // 28 RC7
+ _PPS_OUT(_PPS_RPC8R), // 29 RC8
+ _PPS_OUT(_PPS_RPC9R), // 30 RC9
+ _PPS_OUT(_PPS_RPB10), // 31 RB10
+ _PPS_OUT(_PPS_RPB11), // 32 RB11
};
/* ------------------------------------------------------------ */
@@ -294,47 +286,39 @@ const uint8_t digital_pin_to_pps_out_PGM[] = {
** access the table redefined as well.
*/
const uint8_t digital_pin_to_pps_in_PGM[] = {
- NOT_PPS_PIN, // 0 RB12 AN12/PMD0/RB12
- _PPS_IN(_PPS_RPB11), // 1 RB11 PGEC2/RPB11/PMD1/RB11
- _PPS_IN(_PPS_RPB10), // 2 RB10 PGED2/RPB10/CTED11/PMD2/RB10
- _PPS_IN(_PPS_RPB9), // 3 RB9 RPB9/SDA1/CTED4/PMD3/RB9
- _PPS_IN(_PPS_RPB8), // 4 RB8 RPB8/SCL1/CTED10/PMD4/RB8
- _PPS_IN(_PPS_RPB7), // 5 RB7 RPB7/CTED3/PMD5/INT0/RB7
- _PPS_IN(_PPS_RPB6), // 6 RB6 PGEC3/RPB6/PMD6/RB6
- _PPS_IN(_PPS_RPB5), // 7 RB5 PGED3/PRB5/PMD7/RB5
-
- // Connector JB
- _PPS_IN(_PPS_RPC2), // 8 RC2 AN8/RPC2/PMA2/RC2
- _PPS_IN(_PPS_RPC5), // 9 RC5 RPC5/PMA3/RC5
- _PPS_IN(_PPS_RPC4), // 10 RC4 RPC4/PMA4/RC4
- _PPS_IN(_PPS_RPC8), // 11 RC8 RPC8/PMA5/RC8
- _PPS_IN(_PPS_RPC7), // 12 RC7 RPC7/PMA0/RC7
- _PPS_IN(_PPS_RPB13), // 13 RB13 AN11/RPB13/CTPLS/PMRD/RB13
- _PPS_IN(_PPS_RPB14), // 14 RB14 CVREF/AN10/C3INB/RPB14/SCK1/CTED5/PMWR/RB14
- _PPS_IN(_PPS_RPC6), // 15 RC6 RPC6/PMA1/RC6
-
- // Connector JC
- _PPS_IN(_PPS_RPB4), // 16 RB4 SOSCI/RPB4/RB4
- _PPS_IN(_PPS_RPB15), // 17 RB15 AN9/C3INA/RPB15/SCK2/CTED6/PMCS1/RB15
- _PPS_IN(_PPS_RPC3), // 18 RC3 RPC3/RC3
- _PPS_IN(_PPS_RPC9), // 19 RC9 RPC9/CTED7/PMA6/RC9
- NOT_PPS_PIN, // 20 RA7 PGEC/TCK/CTED8/PMA7/RA7
- _PPS_IN(_PPS_RPA8), // 21 RA8 TDO/RPA8/PMA8/RA8
- _PPS_IN(_PPS_RPA9), // 22 RA9 TDI/RPA9/PMA9/RA9
- NOT_PPS_PIN, // 23 RA10 PGED/TMS/PMA10/RA10
-
- // Connector JD
- _PPS_IN(_PPS_RPA0), // 24 RA0 VREF+/CVREF+/AN0/C3INC/RPA0/CTED1/RA0
- _PPS_IN(_PPS_RPA1), // 25 RA1 VREF-/CVREF-/AN1/RPA1/CTED2/RA1
- _PPS_IN(_PPS_RPC0), // 26 RC0 AN6/RPC0/RC0
- _PPS_IN(_PPS_RPC1), // 27 RC1 AN7/RPC1/RC1
-
- // I2C Connector J2
- _PPS_IN(_PPS_RPB2), // 28 RB2 AN4/C1INB/C2IND/RPB2/SDA2/CTED13/RB2
- _PPS_IN(_PPS_RPB3), // 29 RB3 AN5/C1INA/C2INC/RTCC/RPB3/SCL2/RB3
-
- //User input jumper JP5 (treated like a switch)
- _PPS_IN(_PPS_RPA4) // 30 RA4 SOSCO/T1CK/CN0/RA4
+ _PPS_IN(_PPS_RPB13R), // 0 RB13
+ NOT_PPS_PIN, // 1 RA10
+ NOT_PPS_PIN, // 2 RA7
+ _PPS_IN(_PPS_RPB14R), // 3 RB14
+ _PPS_IN(_PPS_RPB15R), // 4 RB15
+ _PPS_IN(_PPS_RPA0R), // 5 RA0
+ _PPS_IN(_PPS_RPA1R), // 6 RA1
+ _PPS_IN(_PPS_RPB0R), // 7 RB0
+ _PPS_IN(_PPS_RPB1R), // 8 RB1
+ _PPS_IN(_PPS_RPB2R), // 9 RB2
+ _PPS_IN(_PPS_RPB3R), // 10 RB3
+ _PPS_IN(_PPS_RPC0R), // 11 RC0
+ _PPS_IN(_PPS_RPC1R), // 12 RC1
+ _PPS_IN(_PPS_RPC2R), // 13 RC2
+ _PPS_IN(_PPS_RPA2R), // 14 RA2
+ _PPS_IN(_PPS_RPA3R), // 15 RA3
+ _PPS_IN(_PPS_RPA8R), // 16 RA8
+ _PPS_IN(_PPS_RPB4R), // 17 RB4
+ _PPS_IN(_PPS_RPA4R), // 18 RA4
+ _PPS_IN(_PPS_RPA9R), // 19 RA9
+ _PPS_IN(_PPS_RPC3R), // 20 RC3
+ _PPS_IN(_PPS_RPC4R), // 21 RC4
+ _PPS_IN(_PPS_RPC5R), // 22 RC5
+ _PPS_IN(_PPS_RPB5R), // 23 RB5
+ _PPS_IN(_PPS_RPB7R), // 24 RB7
+ _PPS_IN(_PPS_RPB8R), // 25 RB8
+ _PPS_IN(_PPS_RPB9R), // 26 RB9
+ _PPS_IN(_PPS_RPC6R), // 27 RC6
+ _PPS_IN(_PPS_RPC7R), // 28 RC7
+ _PPS_IN(_PPS_RPC8R), // 29 RC8
+ _PPS_IN(_PPS_RPC9R), // 30 RC9
+ _PPS_IN(_PPS_RPB10), // 30 RB10
+ _PPS_IN(_PPS_RPB11), // 30 RB11
};
/* ------------------------------------------------------------ */
39 hardware/pic32/variants/Fubarino_Mini/Board_Defs.h
View
@@ -59,7 +59,7 @@
/* Define the peripherals available on the board.
*/
#define NUM_DIGITAL_PINS 33
-#define NUM_ANALOG_PINS 15
+#define NUM_ANALOG_PINS 13
#define NUM_OC_PINS 5
#define NUM_IC_PINS 5
#define NUM_TCK_PINS 5
@@ -169,22 +169,19 @@ const static uint8_t SCK = 24; // PIC32 SCK2
** used to map an analog pin number to the corresponding digital
** pin number.
*/
-#define A0 44
-#define A1 43
-#define A2 42
-#define A3 41
-#define A4 40
-#define A5 39
-#define A6 38
-#define A7 37
-#define A8 36
-#define A9 35
-#define A10 34
-#define A11 33
-#define A12 32
-#define A13 31
-#define A14 30
-//#define A15 28
+#define A0 0
+#define A1 3
+#define A2 4
+#define A3 5
+#define A4 6
+#define A5 7
+#define A6 8
+#define A7 9
+#define A8 10
+#define A9 11
+#define A10 12
+#define A11 13
+#define A12 20
/* ------------------------------------------------------------ */
/* Change Notice Pins */
@@ -295,9 +292,9 @@ extern const uint8_t external_int_to_digital_pin_PGM[];
#define _SER0_IPL _UART1_IPL_IPC
#define _SER0_SPL _UART1_SPL_IPC
#define _SER0_TX_OUT PPS_OUT_U1TX
-#define _SER0_TX_PIN 8
+#define _SER0_TX_PIN 5
#define _SER0_RX_IN PPS_IN_U1RX
-#define _SER0_RX_PIN 9
+#define _SER0_RX_PIN 6
/* Serial port 1 uses UART2
*/
@@ -308,9 +305,9 @@ extern const uint8_t external_int_to_digital_pin_PGM[];
#define _SER1_IPL _UART2_IPL_IPC
#define _SER1_SPL _UART2_SPL_IPC
#define _SER1_TX_OUT PPS_OUT_U2TX
-#define _SER1_TX_PIN 2
+#define _SER1_TX_PIN 26
#define _SER1_RX_IN PPS_IN_U2RX
-#define _SER1_RX_PIN 1
+#define _SER1_RX_PIN 25
/* ------------------------------------------------------------ */
/* SPI Port Declarations */
Please sign in to comment.
Something went wrong with that request. Please try again.