Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Started fixing issue #382 - updating chipKIT Pi variant files. #383

Merged
merged 1 commit into from

2 participants

@EmbeddedMan
Owner

Added beginning of test report.

@ricklon ricklon merged commit b14d3ec into chipKIT32:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 19, 2013
  1. @EmbeddedMan

    Started fixing issue #382 - updating chipKIT Pi variant files.

    EmbeddedMan authored
    Added beginning of test report.
This page is out of date. Refresh to see the latest.
View
173 hardware/pic32/variants/ChipKIT_Pi/Board_Data.c
@@ -168,31 +168,31 @@ const uint16_t digital_pin_to_bit_mask_PGM[] = {
*/
const uint8_t digital_pin_to_timer_PGM[] = {
// Pins 0 through 18
- NOT_ON_TIMER, // 0 J4-1 RB5 USB TMS/RPB5/USBID/RB5
- NOT_ON_TIMER, // 1 J4-2 RB7 INT0 TDI/RPB7/CTED3/PMD5/INT0/RB7
- _TIMER_OC2 | _TIMER_IC3, // 2 J4-3 RB8 OC2, INT3, IC3, SDO2 TCK/RPB8/SCL1/CTED10/PMD4/RB8
- _TIMER_OC3 | _TIMER_TCK5, // 3 J4-4 RB9 OC3, INT1, TCK5 TDO/RPB9/SDA1/CTED4/PMD3/RB9
- NOT_ON_TIMER, // 4 J4-5 RB10 D+ PGED2/RPB10/D+/CTED11/RB10
- NOT_ON_TIMER, // 5 J4-6 RB11 D- PGEC2/RPB11/D-/RB11
- _TIMER_OC5 | _TIMER_TCK4 | _TIMER_IC1, // 6 J4-7 RB13 OC5, TCK4, IC1, RX1 AN11/RPB13/CTPLS/PMRD/RB13
- NOT_ON_TIMER, // 7 J4-8 RB14 SCK1, TX2 CVREF/AN10/C3INB/RPB14/VBUSON/SCK1/CTED5/RB14
- _TIMER_OC1, // 8 J4-9 RB15 OC1, SCK2 AN9/C3INA/RPB15/SCK2/CTED6/PMCS1/RB15
- NOT_ON_TIMER, // 9 J3-1 RA0 CS1 PGED3/VREF+/CVREF+/AN0/C3INC/RPA0/CTED1/PMD7/RA0
- NOT_ON_TIMER, // 10 J3-2 RA1 SDI1, RX2 PGEC3/VREF-/CVREF-/AN1/RPA1/CTED2/PMD6/RA1
- _TIMER_IC2, // 11 J3-3 RB0 PGD, IC2 PGED1/AN2/C1IND/C2INB/C3IND/RPB0/PMD0/RB0
- _TIMER_TCK3, // 12 J3-4 RB1 PGC, TCK3 PGEC1/AN3/C1INC/C2INA/RPB1/CTED12/PMD1/RB1
- _TIMER_OC4 | _TIMER_IC5, // 13 J3-5 RB2 OC4, INT2, IC1, SDI2 AN4/C1INB/C2IND/RPB2/SDA2/CTED13/PMD2/RB2
- _TIMER_TCK2 | _TIMER_IC4, // 14 J3-6 RB3 TCK2, IC4, TX1 AN5/C1INA/C2INC/RTCC/RPB3/SCL2/PMWR/RB3
- NOT_ON_TIMER, // 15 J3-7 RA2 OSC-PRI OSC1/CLKI/RPA2/RA2
- NOT_ON_TIMER, // 16 J3-8 RA3 OSC-PRI OSC2/CLKO/RPA3/PMA0/RA3
- NOT_ON_TIMER, // 17 J3-9 RB4 INT4, CS2 SOSCI/RPB4/RB4
- _TIMER_TCK1, // 18 J3-10 RA4 SDO1, TCK1 SOSCO/RPA4/T1CK/CTED9/PMA1/RA4
+ NOT_ON_TIMER, // 0 J4-1 RA4 SOSCO/RPA4/T1CK/CTED9/PMA1/RA4
+ NOT_ON_TIMER, // 1 J4-2 RB4 SOSCI/RPB4/RB4
+ _TIMER_OC2 | _TIMER_IC3, // 2 J4-3 RB5 TMS/RPB5/USBID/RB5
+ _TIMER_OC3 | _TIMER_TCK5, // 3 J4-4 RB13 AN11/RPB13/CTPLS/PMRD/RB13
+ NOT_ON_TIMER, // 4 J4-5 RB1 PGEC1/AN3/C1INC/C2INA/RPB1/CTED12/PMD1/RB1
+ NOT_ON_TIMER, // 5 J4-6 RB0 PGED1/AN2/C1IND/C2INB/C3IND/RPB0/PMD0/RB0
+ _TIMER_OC5 | _TIMER_TCK4 | _TIMER_IC1, // 6 J4-7 RA2 OSC1/CLKI/RPA2/RA2
+ NOT_ON_TIMER, // 7 J4-8 RA3 OSC2/CLKO/RPA3/PMA0/RA3
+ _TIMER_OC1, // 8 J4-9 RB10 PGED2/RPB10/D+/CTED11/RB10
+ NOT_ON_TIMER, // 9 J3-1 RB11 PGEC2/RPB11/D-/RB11
+ NOT_ON_TIMER, // 10 J3-2 RB7 TDI/RPB7/CTED3/PMD5/INT0/RB7
+ _TIMER_IC2, // 11 J3-3 RA1 PGEC3/VREF-/CVREF-/AN1/RPA1/CTED2/PMD6/RA1
+ _TIMER_TCK3, // 12 J3-4 RB8 TCK/RPB8/SCL1/CTED10/PMD4/RB8
+ _TIMER_OC4 | _TIMER_IC5, // 13 J3-5 RB14 CVREF/AN10/C3INB/RPB14/VBUSON/SCK1/CTED5/RB14
+ _TIMER_TCK2 | _TIMER_IC4, // 14 J3-6 RA0 PGED3/VREF+/CVREF+/AN0/C3INC/RPA0/CTED1/PMD7/RA0
+ NOT_ON_TIMER, // 15 J3-7 RB15 AN9/C3INA/RPB15/SCK2/CTED6/PMCS1/RB15
+ NOT_ON_TIMER, // 16 J3-8 RB2 AN4/C1INB/C2IND/RPB2/SDA2/CTED13/PMD2/RB2
+ NOT_ON_TIMER, // 17 J3-9 RB3 AN5/C1INA/C2INC/RTCC/RPB3/SCL2/PMWR/RB3
+ _TIMER_TCK1, // 18 J3-10 RB9 TDO/RPB9/SDA1/CTED4/PMD3/RB9
};
/* ------------------------------------------------------------ */
/* This table maps from a digital pin number to the corresponding
** PPS register. This register is used to select the peripheral output
-** connected to the pin. The register is set to 0 to disconnedt the
+** connected to the pin. The register is set to 0 to disconnect the
** pin from any peripheral so it can be used as GPIO.
** For PIC32MX1xx/2xx series devices, the PPS output select registers
** are arranged as a contiguous series of 32 bit registers. This table
@@ -201,25 +201,25 @@ const uint8_t digital_pin_to_timer_PGM[] = {
*/
const uint8_t digital_pin_to_pps_out_PGM[] = {
// Pins 0 through 18
- _PPS_OUT(_PPS_RPB5R), // 0 J4-1 RB5 TMS/RPB5/USBID/RB5
- _PPS_OUT(_PPS_RPB7R), // 1 J4-2 RB7 TDI/RPB7/CTED3/PMD5/INT0/RB7
- _PPS_OUT(_PPS_RPB8R), // 2 J4-3 RB8 TCK/RPB8/SCL1/CTED10/PMD4/RB8
- _PPS_OUT(_PPS_RPB9R), // 3 J4-4 RB9 TDO/RPB9/SDA1/CTED4/PMD3/RB9
- _PPS_OUT(_PPS_RPB10R), // 4 J4-5 RB10 PGED2/RPB10/D+/CTED11/RB10
- _PPS_OUT(_PPS_RPB11R), // 5 J4-6 RB11 PGEC2/RPB11/D-/RB11
- _PPS_OUT(_PPS_RPB13R), // 6 J4-7 RB13 AN11/RPB13/CTPLS/PMRD/RB13
- _PPS_OUT(_PPS_RPB14R), // 7 J4-8 RB14 CVREF/AN10/C3INB/RPB14/VBUSON/SCK1/CTED5/RB14
- _PPS_OUT(_PPS_RPB15R), // 8 J4-9 RB15 AN9/C3INA/RPB15/SCK2/CTED6/PMCS1/RB15
- _PPS_OUT(_PPS_RPA0R), // 9 J3-1 RA0 PGED3/VREF+/CVREF+/AN0/C3INC/RPA0/CTED1/PMD7/RA0
- _PPS_OUT(_PPS_RPA1R), // 10 J3-2 RA1 PGEC3/VREF-/CVREF-/AN1/RPA1/CTED2/PMD6/RA1
- _PPS_OUT(_PPS_RPB0R), // 11 J3-3 RB0 PGED1/AN2/C1IND/C2INB/C3IND/RPB0/PMD0/RB0
- _PPS_OUT(_PPS_RPB1R), // 12 J3-4 RB1 PGEC1/AN3/C1INC/C2INA/RPB1/CTED12/PMD1/RB1
- _PPS_OUT(_PPS_RPB2R), // 13 J3-5 RB2 AN4/C1INB/C2IND/RPB2/SDA2/CTED13/PMD2/RB2
- _PPS_OUT(_PPS_RPB3R), // 14 J3-6 RB3 AN5/C1INA/C2INC/RTCC/RPB3/SCL2/PMWR/RB3
- _PPS_OUT(_PPS_RPA2R), // 15 J3-7 RA2 OSC1/CLKI/RPA2/RA2
- _PPS_OUT(_PPS_RPA3R), // 16 J3-8 RA3 OSC2/CLKO/RPA3/PMA0/RA3
- _PPS_OUT(_PPS_RPB4R), // 17 J3-9 RB4 SOSCI/RPB4/RB4
- _PPS_OUT(_PPS_RPA4R), // 18 J3-10 RA4 SOSCO/RPA4/T1CK/CTED9/PMA1/RA4
+ _PPS_OUT(_PPS_RPA4R), // 0 J4-1 RA4 SOSCO/RPA4/T1CK/CTED9/PMA1/RA4
+ _PPS_OUT(_PPS_RPB4R), // 1 J4-2 RB4 SOSCI/RPB4/RB4
+ _PPS_OUT(_PPS_RPB5R), // 2 J4-3 RB5 TMS/RPB5/USBID/RB5
+ _PPS_OUT(_PPS_RPB13R), // 3 J4-4 RB13 AN11/RPB13/CTPLS/PMRD/RB13
+ _PPS_OUT(_PPS_RPB1R), // 4 J4-5 RB1 PGEC1/AN3/C1INC/C2INA/RPB1/CTED12/PMD1/RB1
+ _PPS_OUT(_PPS_RPB0R), // 5 J4-6 RB0 PGED1/AN2/C1IND/C2INB/C3IND/RPB0/PMD0/RB0
+ _PPS_OUT(_PPS_RPA2R), // 6 J4-7 RA2 OSC1/CLKI/RPA2/RA2
+ _PPS_OUT(_PPS_RPA3R), // 7 J4-8 RA3 OSC2/CLKO/RPA3/PMA0/RA3
+ _PPS_OUT(_PPS_RPB10R), // 8 J4-9 RB10 PGED2/RPB10/D+/CTED11/RB10
+ _PPS_OUT(_PPS_RPB11R), // 9 J3-1 RB11 PGEC2/RPB11/D-/RB11
+ _PPS_OUT(_PPS_RPB7R), // 10 J3-2 RB7 TDI/RPB7/CTED3/PMD5/INT0/RB7
+ _PPS_OUT(_PPS_RPA1R), // 11 J3-3 RA1 PGEC3/VREF-/CVREF-/AN1/RPA1/CTED2/PMD6/RA1
+ _PPS_OUT(_PPS_RPB8R), // 12 J3-4 RB8 TCK/RPB8/SCL1/CTED10/PMD4/RB8
+ _PPS_OUT(_PPS_RPB14R), // 13 J3-5 RB14 CVREF/AN10/C3INB/RPB14/VBUSON/SCK1/CTED5/RB14
+ _PPS_OUT(_PPS_RPA0R), // 14 J3-6 RA0 PGED3/VREF+/CVREF+/AN0/C3INC/RPA0/CTED1/PMD7/RA0
+ _PPS_OUT(_PPS_RPB15R), // 15 J3-7 RB15 AN9/C3INA/RPB15/SCK2/CTED6/PMCS1/RB15
+ _PPS_OUT(_PPS_RPB2R), // 16 J3-8 RB2 AN4/C1INB/C2IND/RPB2/SDA2/CTED13/PMD2/RB2
+ _PPS_OUT(_PPS_RPB3R), // 17 J3-9 RB3 AN5/C1INA/C2INC/RTCC/RPB3/SCL2/PMWR/RB3
+ _PPS_OUT(_PPS_RPB9R), // 18 J3-10 RB9 TDO/RPB9/SDA1/CTED4/PMD3/RB9
};
/* ------------------------------------------------------------ */
@@ -235,25 +235,25 @@ const uint8_t digital_pin_to_pps_out_PGM[] = {
*/
const uint8_t digital_pin_to_pps_in_PGM[] = {
// Pins 0 through 18
- _PPS_IN(_PPS_RPB5), // 0 J4-1 RB5 TMS/RPB5/USBID/RB5
- _PPS_IN(_PPS_RPB7), // 1 J4-2 RB7 TDI/RPB7/CTED3/PMD5/INT0/RB7
- _PPS_IN(_PPS_RPB8), // 2 J4-3 RB8 TCK/RPB8/SCL1/CTED10/PMD4/RB8
- _PPS_IN(_PPS_RPB9), // 3 J4-4 RB9 TDO/RPB9/SDA1/CTED4/PMD3/RB9
- _PPS_IN(_PPS_RPB10), // 4 J4-5 RB10 PGED2/RPB10/D+/CTED11/RB10
- _PPS_IN(_PPS_RPB11), // 5 J4-6 RB11 PGEC2/RPB11/D-/RB11
- _PPS_IN(_PPS_RPB13), // 6 J4-7 RB13 AN11/RPB13/CTPLS/PMRD/RB13
- _PPS_IN(_PPS_RPB14), // 7 J4-8 RB14 CVREF/AN10/C3INB/RPB14/VBUSON/SCK1/CTED5/RB14
- _PPS_IN(_PPS_RPB15), // 8 J4-9 RB15 AN9/C3INA/RPB15/SCK2/CTED6/PMCS1/RB15
- _PPS_IN(_PPS_RPA0), // 9 J3-1 RA0 PGED3/VREF+/CVREF+/AN0/C3INC/RPA0/CTED1/PMD7/RA0
- _PPS_IN(_PPS_RPA1), // 10 J3-2 RA1 PGEC3/VREF-/CVREF-/AN1/RPA1/CTED2/PMD6/RA1
- _PPS_IN(_PPS_RPB0), // 11 J3-3 RB0 PGED1/AN2/C1IND/C2INB/C3IND/RPB0/PMD0/RB0
- _PPS_IN(_PPS_RPB1), // 12 J3-4 RB1 PGEC1/AN3/C1INC/C2INA/RPB1/CTED12/PMD1/RB1
- _PPS_IN(_PPS_RPB2), // 13 J3-5 RB2 AN4/C1INB/C2IND/RPB2/SDA2/CTED13/PMD2/RB2
- _PPS_IN(_PPS_RPB3), // 14 J3-6 RB3 AN5/C1INA/C2INC/RTCC/RPB3/SCL2/PMWR/RB3
- _PPS_IN(_PPS_RPA2), // 15 J3-7 RA2 OSC1/CLKI/RPA2/RA2
- _PPS_IN(_PPS_RPA3), // 16 J3-8 RA3 OSC2/CLKO/RPA3/PMA0/RA3
- _PPS_IN(_PPS_RPB4), // 17 J3-9 RB4 SOSCI/RPB4/RB4
- _PPS_IN(_PPS_RPA4), // 18 J3-10 RA4 SOSCO/RPA4/T1CK/CTED9/PMA1/RA4
+ _PPS_IN(_PPS_RPA4), // 0 J4-1 RA4 SOSCO/RPA4/T1CK/CTED9/PMA1/RA4
+ _PPS_IN(_PPS_RPB4), // 1 J4-2 RB4 SOSCI/RPB4/RB4
+ _PPS_IN(_PPS_RPB5), // 2 J4-3 RB5 TMS/RPB5/USBID/RB5
+ _PPS_IN(_PPS_RPB13), // 3 J4-4 RB13 AN11/RPB13/CTPLS/PMRD/RB13
+ _PPS_IN(_PPS_RPB1), // 4 J4-5 RB1 PGEC1/AN3/C1INC/C2INA/RPB1/CTED12/PMD1/RB1
+ _PPS_IN(_PPS_RPB0), // 5 J4-6 RB0 PGED1/AN2/C1IND/C2INB/C3IND/RPB0/PMD0/RB0
+ _PPS_IN(_PPS_RPA2), // 6 J4-7 RA2 OSC1/CLKI/RPA2/RA2
+ _PPS_IN(_PPS_RPA3), // 7 J4-8 RA3 OSC2/CLKO/RPA3/PMA0/RA3
+ _PPS_IN(_PPS_RPB10), // 8 J4-9 RB10 PGED2/RPB10/D+/CTED11/RB10
+ _PPS_IN(_PPS_RPB11), // 9 J3-1 RB11 PGEC2/RPB11/D-/RB11
+ _PPS_IN(_PPS_RPB7), // 10 J3-2 RB7 TDI/RPB7/CTED3/PMD5/INT0/RB7
+ _PPS_IN(_PPS_RPA1), // 11 J3-3 RA1 PGEC3/VREF-/CVREF-/AN1/RPA1/CTED2/PMD6/RA1
+ _PPS_IN(_PPS_RPB8), // 12 J3-4 RB8 TCK/RPB8/SCL1/CTED10/PMD4/RB8
+ _PPS_IN(_PPS_RPB14), // 13 J3-5 RB14 CVREF/AN10/C3INB/RPB14/VBUSON/SCK1/CTED5/RB14
+ _PPS_IN(_PPS_RPA0), // 14 J3-6 RA0 PGED3/VREF+/CVREF+/AN0/C3INC/RPA0/CTED1/PMD7/RA0
+ _PPS_IN(_PPS_RPB15), // 15 J3-7 RB15 AN9/C3INA/RPB15/SCK2/CTED6/PMCS1/RB15
+ _PPS_IN(_PPS_RPB2), // 16 J3-8 RB2 AN4/C1INB/C2IND/RPB2/SDA2/CTED13/PMD2/RB2
+ _PPS_IN(_PPS_RPB3), // 17 J3-9 RB3 AN5/C1INA/C2INC/RTCC/RPB3/SCL2/PMWR/RB3
+ _PPS_IN(_PPS_RPB9), // 18 J3-10 RB9 TDO/RPB9/SDA1/CTED4/PMD3/RB9
};
/* ------------------------------------------------------------ */
@@ -263,25 +263,25 @@ const uint8_t digital_pin_to_pps_in_PGM[] = {
//#if defined(_NOT_USED_)
const uint8_t digital_pin_to_analog_PGM[] = {
// Pins 0 through 38
- NOT_ANALOG_PIN, // 0 J4-1 RB5 TMS/RPB5/USBID/RB5
- NOT_ANALOG_PIN, // 1 J4-2 RB7 TDI/RPB7/CTED3/PMD5/INT0/RB7
- NOT_ANALOG_PIN, // 2 J4-3 RB8 TCK/RPB8/SCL1/CTED10/PMD4/RB8
- NOT_ANALOG_PIN, // 3 J4-4 RB9 TDO/RPB9/SDA1/CTED4/PMD3/RB9
- NOT_ANALOG_PIN, // 4 J4-5 RB10 PGED2/RPB10/D+/CTED11/RB10
- NOT_ANALOG_PIN, // 5 J4-6 RB11 PGEC2/RPB11/D-/RB11
- _BOARD_AN0, // 6 J4-7 RB13 AN11/RPB13/CTPLS/PMRD/RB13
- _BOARD_AN1, // 7 J4-8 RB14 CVREF/AN10/C3INB/RPB14/VBUSON/SCK1/CTED5/RB14
- _BOARD_AN2, // 8 J4-9 RB15 AN9/C3INA/RPB15/SCK2/CTED6/PMCS1/RB15
- _BOARD_AN3, // 9 J3-1 RA0 PGED3/VREF+/CVREF+/AN0/C3INC/RPA0/CTED1/PMD7/RA0
- _BOARD_AN4, // 10 J3-2 RA1 PGEC3/VREF-/CVREF-/AN1/RPA1/CTED2/PMD6/RA1
- _BOARD_AN5, // 11 J3-3 RB0 PGED1/AN2/C1IND/C2INB/C3IND/RPB0/PMD0/RB0
- _BOARD_AN6, // 12 J3-4 RB1 PGEC1/AN3/C1INC/C2INA/RPB1/CTED12/PMD1/RB1
- _BOARD_AN7, // 13 J3-5 RB2 AN4/C1INB/C2IND/RPB2/SDA2/CTED13/PMD2/RB2
- _BOARD_AN8, // 14 J3-6 RB3 AN5/C1INA/C2INC/RTCC/RPB3/SCL2/PMWR/RB3
- NOT_ANALOG_PIN, // 15 J3-7 RA2 OSC1/CLKI/RPA2/RA2
- NOT_ANALOG_PIN, // 16 J3-8 RA3 OSC2/CLKO/RPA3/PMA0/RA3
- NOT_ANALOG_PIN, // 17 J3-9 RB4 SOSCI/RPB4/RB4
- NOT_ANALOG_PIN, // 18 J3-10 RA4 SOSCO/RPA4/T1CK/CTED9/PMA1/RA4
+ NOT_ANALOG_PIN, // 0 J4-1 RA4 SOSCO/RPA4/T1CK/CTED9/PMA1/RA4
+ NOT_ANALOG_PIN, // 1 J4-2 RB4 SOSCI/RPB4/RB4
+ NOT_ANALOG_PIN, // 2 J4-3 RB5 TMS/RPB5/USBID/RB5
+ NOT_ANALOG_PIN, // 3 J4-4 RB13 AN11/RPB13/CTPLS/PMRD/RB13
+ NOT_ANALOG_PIN, // 4 J4-5 RB1 PGEC1/AN3/C1INC/C2INA/RPB1/CTED12/PMD1/RB1
+ NOT_ANALOG_PIN, // 5 J4-6 RB0 PGED1/AN2/C1IND/C2INB/C3IND/RPB0/PMD0/RB0
+ NOT_ANALOG_PIN, // 6 J4-7 RA2 OSC1/CLKI/RPA2/RA2
+ NOT_ANALOG_PIN, // 7 J4-8 RA3 OSC2/CLKO/RPA3/PMA0/RA3
+ NOT_ANALOG_PIN, // 8 J4-9 RB10 PGED2/RPB10/D+/CTED11/RB10
+ NOT_ANALOG_PIN, // 9 J3-1 RB11 PGEC2/RPB11/D-/RB11
+ NOT_ANALOG_PIN, // 10 J3-2 RB7 TDI/RPB7/CTED3/PMD5/INT0/RB7
+ NOT_ANALOG_PIN, // 11 J3-3 RA1 PGEC3/VREF-/CVREF-/AN1/RPA1/CTED2/PMD6/RA1
+ NOT_ANALOG_PIN, // 12 J3-4 RB8 TCK/RPB8/SCL1/CTED10/PMD4/RB8
+ NOT_ANALOG_PIN, // 13 J3-5 RB14 CVREF/AN10/C3INB/RPB14/VBUSON/SCK1/CTED5/RB14
+ _BOARD_AN0, // 14 J3-6 RA0 PGED3/VREF+/CVREF+/AN0/C3INC/RPA0/CTED1/PMD7/RA0
+ _BOARD_AN9, // 15 J3-7 RB15 AN9/C3INA/RPB15/SCK2/CTED6/PMCS1/RB15
+ _BOARD_AN4, // 16 J3-8 RB2 AN4/C1INB/C2IND/RPB2/SDA2/CTED13/PMD2/RB2
+ _BOARD_AN5, // 17 J3-9 RB3 AN5/C1INA/C2INC/RTCC/RPB3/SCL2/PMWR/RB3
+ NOT_ANALOG_PIN, // 18 J3-10 RB9 TDO/RPB9/SDA1/CTED4/PMD3/RB9
};
//#endif
@@ -295,15 +295,16 @@ const uint8_t digital_pin_to_analog_PGM[] = {
//#if defined(_NOT_USED_)
const uint8_t analog_pin_to_channel_PGM[] = {
//* Arduino Pin PIC32 Analog channel
- 11, //* A0 11
- 10, //* A1 10
- 9, //* A2 9
- 0, //* A3 0
- 1, //* A4 1
- 2, //* A5 2
- 3, //* A6 3
- 4, //* A7 4
- 5, //* A8 5
+ 0, //* A0 0
+ 1, //* Not used
+ 2, //* Not used
+ 3, //* Not used
+ 4, //* A4 4
+ 5, //* A5 5
+ 6, //* Not used
+ 7, //* Not used
+ 8, //* Not used
+ 9, //* A1 9
};
//#endif
View
23 hardware/pic32/variants/ChipKIT_Pi/Board_Defs.h
@@ -52,7 +52,7 @@
/* Public Board Declarations */
/* ------------------------------------------------------------ */
/* The following define symbols that can be used in a sketch to
-** refer to periperhals on the board generically.
+** refer to peripherals on the board generically.
*/
#define _BOARD_NAME_ "chipKIT Pi"
@@ -60,7 +60,7 @@
/* Define the peripherals available on the board.
*/
#define NUM_DIGITAL_PINS 18
-#define NUM_ANALOG_PINS 2
+#define NUM_ANALOG_PINS 10
#define NUM_OC_PINS 5
#define NUM_IC_PINS 5
#define NUM_TCK_PINS 5
@@ -85,8 +85,7 @@
/* ------------------------------------------------------------ */
/* Define the pin numbers for the LEDs
-NOTE: The ChipKIT Pi has no user LEDs, but some sketches use
-PIN_LED1, so we'll define that as Digital pin 3 (D3)
+NOTE: The ChipKIT Pi has two user LEDs
*/
#define PIN_LED1 14 // 11 RA0
#define PIN_LED2 11 // 14 RA1
@@ -98,7 +97,7 @@ PIN_LED1, so we'll define that as Digital pin 3 (D3)
/* No buttons or this board
*/
-/* Also define the virutal program button for soft reset */
+/* Also define the virtual program button for soft reset */
//#define USE_VIRTUAL_PROGRAM_BUTTON 1
//#define VIRTUAL_PROGRAM_BUTTON_TRIS TRISBbits.TRISB4
//#define VIRTUAL_PROGRAM_BUTTON LATBbits.LATB4
@@ -174,6 +173,8 @@ const static uint8_t SCK = 13; // RB14 SCK1 CVREF/AN10/C3INB/RPB14/VBUSON/S
*/
#define A0 14 // RA0
#define A1 15 // RB15
+#define A4 16 // RB2
+#define A5 17 // RB3
/* ------------------------------------------------------------ */
/* Change Notice Pins */
@@ -284,8 +285,8 @@ extern const uint8_t external_int_to_digital_pin_PGM[];
#define _SER0_SPL _UART1_SPL_IPC
#define _SER0_TX_OUT PPS_OUT_U1TX // RPB3R = U1TX = 1
#define _SER0_TX_PIN 1 // RB4
-#define _SER0_RX_IN PPS_IN_U1RX // U1RXR = RPB13 = 3
-#define _SER0_RX_PIN 6 // RB13 AN11/RPB13/CTPLS/PMRD/RB13
+#define _SER0_RX_IN PPS_IN_U1RX // U1RXR = RA4 = 0
+#define _SER0_RX_PIN 0 // RA4
/* Serial port 1 uses UART2
@@ -296,10 +297,10 @@ extern const uint8_t external_int_to_digital_pin_PGM[];
#define _SER1_IPL_ISR _UART2_IPL_ISR
#define _SER1_IPL _UART2_IPL_IPC
#define _SER1_SPL _UART2_SPL_IPC
-#define _SER1_TX_OUT PPS_OUT_U2TX // RPB14R = U2TX = 2
-#define _SER1_TX_PIN 7 // RB14 CVREF/AN10/C3INB/RPB14/VBUSON/SCK1/CTED5/RB14
-#define _SER1_RX_IN PPS_IN_U2RX // U2RXR = RPA1 = 0
-#define _SER1_RX_PIN 10 // RA1 PGEC3/VREF-/CVREF-/AN1/RPA1/CTED2/PMD6/RA1
+#define _SER1_TX_OUT PPS_OUT_U2TX // RPB0R = U2TX = 5
+#define _SER1_TX_PIN 5 // RB0
+#define _SER1_RX_IN PPS_IN_U2RX // U2RXR = RPB1 = 4
+#define _SER1_RX_PIN 4 // RB1
/* ------------------------------------------------------------ */
View
37 hardware/pic32/variants/ChipKIT_Pi/boards.txt
@@ -35,3 +35,40 @@ chipkit_Pi.build.core=pic32
chipkit_Pi.build.variant=ChipKIT_Pi
############################################################
+############################################################
+chipkit_Pi_USB_Serial.name=chipKIT Pi USB_Serial
+chipkit_Pi_USB_Serial.group=chipKIT
+
+# new items
+chipkit_Pi_USB_Serial.platform=pic32
+chipkit_Pi_USB_Serial.board=_BOARD_CHIPKIT_PI_
+chipkit_Pi_USB_Serial.board.define=-D_USE_USB_FOR_SERIAL_
+chipkit_Pi_USB_Serial.ccflags=-Map="map.map"
+chipkit_Pi_USB_Serial.ldscript=chipKIT-application-32MX250F128.ld
+# end of new items
+
+# Use a high -Gnum for devices that have less than 64K of data memory
+# For -G1024, objects 1024 bytes or smaller will be accessed by
+# gp-relative addressing
+chipkit_Pi_USB_Serial.compiler.c.flags=-O2::-c::-mno-smart-io::-w::-ffunction-sections::-fdata-sections::-G1024::-g::-mdebugger::-Wcast-align::-fno-short-double
+chipkit_Pi_USB_Serial.compiler.cpp.flags=-O2::-c::-mno-smart-io::-w::-fno-exceptions::-ffunction-sections::-fdata-sections::-G1024::-g::-mdebugger::-Wcast-align::-fno-short-double
+
+chipkit_Pi_USB_Serial.upload.protocol=stk500v2
+# 128KB - 4K for EEPROM - 4K for bootloader
+chipkit_Pi_USB_Serial.upload.maximum_size=122880
+chipkit_Pi_USB_Serial.upload.speed=115200
+
+chipkit_Pi_USB_Serial.bootloader.low_fuses=0xff
+chipkit_Pi_USB_Serial.bootloader.high_fuses=0xdd
+chipkit_Pi_USB_Serial.bootloader.extended_fuses=0x00
+chipkit_Pi_USB_Serial.bootloader.path=not-supported
+chipkit_Pi_USB_Serial.bootloader.file=not-supported
+chipkit_Pi_USB_Serial.bootloader.unlock_bits=0x3F
+chipkit_Pi_USB_Serial.bootloader.lock_bits=0x0F
+
+chipkit_Pi_USB_Serial.build.mcu=32MX250F128B
+chipkit_Pi_USB_Serial.build.f_cpu=40000000L
+chipkit_Pi_USB_Serial.build.core=pic32
+chipkit_Pi_USB_Serial.build.variant=ChipKIT_Pi
+
+############################################################
View
124 hardware/pic32/variants/ChipKIT_Pi/tests.txt
@@ -0,0 +1,124 @@
+Tests run on 9/15/2013
+Purpose: To find any errors in the variants files
+Board; ChipKit Pi v3.37
+
+Digital I/O:
+
+ Test that each digital I/O (D0, D1, D2, D3, D8, D9, D10, D11, D12, D13) can drive an LED High and Low
+
+ Sketch: (With TEST_PIN changing to all GPIO)
+
+ int TEST_PIN = 0;
+
+ void setup() {
+ pinMode(TEST_PIN, OUTPUT);
+ }
+
+ void loop() {
+ digitalWrite(TEST_PIN, HIGH);
+ delay(50);
+ digitalWrite(TEST_PIN, LOW);
+ delay(50);
+ }
+
+ Results:
+ D0 works
+ D1 works
+ D2 works (J10 set for D2)
+ D3 works
+ D8 works (JP13 set for D8)
+ D9 works (JP12 set for D9)
+ D10 works (JP14 set for SS)
+ D11 works
+ D12 works (JP8 set to MISO)
+ D13 works
+
+Analog Input:
+
+ Test that each analog input (A0, A1, A4, A5) can read from 0 through 1023 when 0 to 3.3V is applied to each pin.
+
+ Sketch (With TEST_ANALOG changed to each analog input pin):
+
+ int TEST_ANALOG = A0;
+
+ void setup() {
+ Serial.begin(9600);
+ }
+
+ void loop() {
+ int sensorValue = analogRead(TEST_ANALOG);
+ Serial.print("Value = ");
+ Serial.println(sensorValue, DEC);
+ delay(100);
+ }
+
+ Results:
+ A0 works (JP15 set to A0)
+ A1 works (JP11 set to A1)
+ A4 works
+ A5 works
+
+
+PWM Output:
+
+Test that each PWM output (PWM0, and PWM1) can all output PWM signals.
+
+
+UART:
+
+ Test that the USB connector can be used for serial I/O from the sketch.
+
+ Test that TXD/RXD (on D1/D0) can be used for serial I/O. (Serial)
+
+ Test that TX2/RX2 (on Pi connector pin 8 and 10) can be used for serial I/O.
+
+ Sketch:
+ int inByte = 0;
+ void setup()
+ {
+ Serial.begin(9600);
+ }
+
+ void loop()
+ {
+ if (Serial.available() > 0) {
+ inByte = Serial.read();
+ Serial.print(inByte, DEC);
+ }
+ delay(250);
+ }
+
+ Results:
+ TXD/RXD works (JP9 set to RX1 and JP7 set to RX1) (Serial)
+ TX2/RX2 works (JP4 set to TX2 and JP1 set to RX2) (Serial1)
+ USB does not work (JP13 set to RD+ and JP12 set to RD-, and use chipKIT Pi USB_serial board) (Serial)
+
+Change Notice:
+
+Test that all CN inputs can be used to trigger an interrupt.
+
+
+
+Interrupts:
+
+Test that INT1 and INT2 can be used to trigger an interrupt
+
+
+SPI:
+
+Test that a SPI peripheral can be communicated with on SCK, MISO, MOSI and SS.
+
+
+I2C:
+
+Test that an I2C peripheral can be communicated with on SDA/SCL.
+
+
+EEPROM;
+
+Test that the EEPROM section of Flash is usable for both reading and writing.
+
+
+Virtual Bootloader Button:
+
+Test that the virtual bootloader button function works to trigger the bootloader from a sketch.
Something went wrong with that request. Please try again.