Created Sun, 21 May 2017 19:32:44 +0000 by shebychev
Sun, 21 May 2017 19:32:44 +0000
I'm a bit confused as in an older version of Board_Defs.h in the Chipkit-Core library, there is a definition for the serial0 and serial1 pins, like so:
#define _SER0_TX_OUT PPS_OUT_U1TX // RPB3R = U1TX = 1
#define _SER0_TX_PIN 14 // RB3 AN5/C1INA/C2INC/RTCC/RPB3/SCL2/PMWR/RB3
#define _SER0_RX_IN PPS_IN_U1RX // U1RXR = RPB13 = 3 #define _SER0_RX_PIN 6 // RB13 AN11/RPB13/CTPLS/PMRD/RB13
but in the new version, no such definition exists. In fact, the call to HardwareSerial just doesn't include these definitions. Does anyone have any information as to how these pins are now defined? I'm asking because i wish to switch the _SER0_TX_PIN and the _SER0_RX_PIN values, but it is not having an effect on my board and i'm assuming it's because of this call in HardwareSerial.cpp
#if defined(PIC32_PPS) HardwareSerial Serial((p32_uart *)_SER0_BASE, _SER0_IRQ, _SER0_VECTOR, _SER0_IPL, _SER0_SPL, IntSer0Handler, _SER0_TX_PIN, _SER0_RX_PIN, _SER0_TX_OUT, _SER0_RX_IN); #else HardwareSerial Serial((p32_uart *)_SER0_BASE, _SER0_IRQ, _SER0_VECTOR, _SER0_IPL, _SER0_SPL, IntSer0Handler); #endif
Any information is appreciated. Thanks!
Sun, 21 May 2017 20:53:31 +0000
Which board are you on about?
Mon, 22 May 2017 15:16:09 +0000
Sorry, I'm using the PIC32MX250F128B
Mon, 22 May 2017 15:56:47 +0000
They should be there in your definition then. If they aren't then it wouldn't be able to compile the serial code.
Are you sure you are looking at the right Board_Defs.h file for your board?