C027-U20

From OpenStreetMap Wiki
Jump to navigation Jump to search

This page collects detailed hardware information about C027-U20 board sold by u-blox: https://mbed.org/platforms/u-blox-C027 which can be used as a GPS RTK node (using rtklib).

LED

There is only one LED (red).

DigitalOut led(LED);

External USB ACM

"PC serial port" is LPC1768 UART0 connected to the UART of LPC11U35 (USB socket gateway, providing external ACM and storage interfaces)

// open the PC serial port
Serial acm(USBTX, USBRX);
acm.baud(115200); // higher rate ?

Internal UMTS Modem

MDMBAUD = 115200

The modem is connected to the LPC1768 USB host port http://mbed.org/users/dixter1/code/C027_ModemTransparentUSBCDC_revb and LPC1768 UART1 http://mbed.org/users/dixter1/code/C027_ModemTransparentSerial_revb

// open the mdm serial port
Serial mdm(MDMTXD, MDMRXD);
mdm.baud(MDMBAUD);

Internal GPS

Simple relay code https://mbed.org/teams/ublox/code/C027_GPSTransparentSerial

MAX-7Q is connected to LPC1768 UART2

GPSBAUD = 9600 (initial, too slow for high rate raw data output: TRK-TRKD5 + TRK-SFRBX )
GPSADR = (66<<1)
// open the gps serial port
Serial gps(GPSTXD, GPSRXD);
gps.baud(GPSBAUD);
// send CFG-PRT and up the baud rate

and to LPC1768 I2C0

// open the gps i2c port
I2C gpsi(GPSSDA, GPSSCL,GPSADDR);
gpsi.frequency(100000);

External UART

Connected to LPC1768 UART3

Serial uart(D0, D1); // TXD, RXD
uart.baud(115200); // 921600 is ok. "Maximum UART data bit rate of 6.25 Mbit/s."

External I2C

Connected to LPC1768 I2C1, use for a gyro & accelerometer ?

I2C exti2c(D14, D15); // SDA, SCL

External SPI

Can be used for SD card logging, https://developer.mbed.org/users/neilt6/code/SDFileSystem

SDFileSystem sd(D11, D12, D13, D10, "sd"); // MISO,MOSI,SCLK,SS, root dirent. card detect & switch type ? <- depends on your hardware

External CAN

Send and receive example http://mbed.org/users/dixter1/code/C027_CANInterfaceComm

Monitor CAN and send SMS https://developer.mbed.org/users/sleepyhead/code/C027_GSMCAN

CAN production test https://developer.mbed.org/teams/ublox/code/C027_ProductionTestLoobback

CAN can(CANRD, CANTD);
DigitalOut canS(CANS, 1);
can.frequency(500000);
canS = 0; // enable transmitter

CAN interface can be used for car monitoring/control (see VW-CAN) and as a source of high rate precise echolot positioning data over NMEA-2000 (see Chart_plotters).

External Ethernet

Reading from ethernet port https://mbed.org/users/dixter1/code/C027_EthernetSniffTest

Send CAN messages via ethernet https://developer.mbed.org/users/OTBsolar/code/ETH2CAN

Headers

See https://github.com/mbedmicro/mbed/blob/master/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC176X/TARGET_UBLOX_C027/PinNames.h

// I2C0 (shared with LISA/SARA)
#define GPSSDA      (P0_27) SDA0 (LPC1768 <-> MAX-7Q <-> LISA-U200)
#define GPSSCL      (P0_28) SCL0 (LPC1768 <-> MAX-7Q <-> LISA-U200)
#define GPSADR      (66<<1) // GPS I2C Address
// UART2 
#define GPSTXD      (P0_10) TXD2 (LPC1768 -> MAX-7Q)
#define GPSRXD      (P0_11) RXD2 (LPC1768 <- MAX-7Q)
#define GPSBAUD     9600    // Default GPS Baud Rate
// Control
#define GPSRST      (P1_18) // Reset (input to GPS, active low)
#define GPSPPS      (P1_19) // 1PPS Timepulse (output from GPS)
#define GPSINT      (P1_22) // Interrupt (input to GPS)
#define GPSEN       (P1_29) // Supply Control (high = enabled)

// u-blox LISA/SARA cellular modem
// http://www.u-blox.com/wireless-modules.html
// -----------------------------------------------------------
// UART1 (LPC1768 = DTE, LISA/SARA = DCE)
#define MDMTXD      (P0_15) // Transmit Data  TXD1 (LPC1768 -> LISA-U200)
#define MDMRXD      (P0_16) // Receive Data   RXD1 (LPC1768 <- LISA-U200)
#define MDMCTS      (P0_17) // Clear to Send
#define MDMDCD      (P0_18) // Data Carrier Detect
#define MDMDSR      (P0_19) // Data Set Ready
#define MDMDTR      (P0_20) // Data Terminal Ready (set high or use handshake)
#define MDMRI       (P0_21) // Ring Indicator
#define MDMRTS      (P0_22) // Request to Send (set high or use handshake)
#define MDMBAUD     115200  // Default Modem Baud Rate
// USB (not available on C27-G35)
#define MDMUSBDP    (P0_29) // USB D+ (LPC1768 <-> LISA-U200)
#define MDMUSBDN    (P0_30) // USB D- (LPC1768 <-> LISA-U200)
#define MDMUSBCON   (P2_9)  // USB Connect
#define MDMUSBDET   (P0_7)  // USB Detect (n/a on REV.A board)
// Control 
#define MDMEN       (P2_5)  // Supply Control (high = enabled)
#define MDMPWRON    (P2_6)  // 
#define MDMGPIO1    (P2_7)  // GPIO1, Network status
#define MDMRST      (P2_8)  // Reset (active low, set as open drain!)
#define MDMLVLOE    (P0_9)  // Serial/GPIO Level Shifter Output Enable (n/a on REV.A board)
#define MDMILVLOE   (P0_8)  // I2C Level Shifter Output Enable (n/a on REV.A board)

// PIN header connector
// for standard-based form factor with expansion board
// -----------------------------------------------------------
// PMW  = Pulswidth Modulator
// EINT = External Interrupt
// AOUT = Analog Output

// Analog Ports (A0-A5)
#define A0          (P0_23) //      I2S_CLK
#define A1          (P0_24) //      I2S_WS
#define A2          (P0_25) //      I2S_SDA
#define A3          (P0_26) //      AOUT
#define A4          (P1_30) //
#define A5          (P1_31) //
// Digital Port (D0-D7) UART3, EINT*, PWM1*
#define D0          (P4_29) //      TXD3 (LPC1768 -> D0)
#define D1          (P4_28) //      RXD3 (LPC1768 <- D1)
#define D2          (P2_13) // EINT EINT3
#define D3          (P2_0)  // PWM  PWM1[1]
#define D4          (P2_12) // EINT EINT2
#define D5          (P2_1)  // PWM  PWM1[2]
#define D6          (P2_2)  // PWM  PWM1[3]
#define D7          (P2_11) // EINT EINT1
// Digital Port (D8-D13) PWM1, SPI0
#define D8          (P2_4)  // PWM  PWM1[5]
#define D9          (P2_3)  // PWM  PWM1[4]
#define D10         (P1_21) // PWM  SSEL0
#define D11         (P1_24) // PWM  MOSI0
#define D12         (P1_23) // PWM  MISO0
#define D13         (P1_20) // PWM  SCK0
//      GND
//      AREF
                                    I2C1
#define SDA         (P0_0)          SDA1 (LPC1768 <-> SDA)
#define SCL         (P0_1)          SCL1 (LPC1768 <-> SCL)
// D14 = SDA,
// D15 = SCL,
// LED
// -----------------------------------------------------------
#define LED         (P3_25)  // RED LED (n/a on REV.A board)

// CAN TJA1040 + TJA1042T/3
// -----------------------------------------------------------
#define CANRD       (P0_4)          RD2 LPC1768 <- CAN
#define CANTD       (P0_5)          TD2 LPC1768 -> CAN
#define CANS        (P0_6)  // standby (low=normal, high=standby/rxonly)

// Ethernet (DP83848) DP83848JSQ
// -----------------------------------------------------------
#define ETHTXD0     (P1_0)
#define ETHTXD1     (P1_1)
#define ETHTXEN     (P1_4)
#define ETHCRS      (P1_8)
#define ETHRXD0     (P1_9)
#define ETHRXD1     (P1_10)
#define ETHRXEN     (P1_14)
#define ETHREFCLK   (P1_15)
#define ETHMDC      (P1_16)
#define ETHMDIO     (P1_17)
#define ETHOSCEN    (P1_27)
#define ETHRST      (P1_28)
#define ETHLINK     (P1_25) // LED_LINK 
#define ETHSPEED    (P1_26) // LED_SPEED

// mbed / debug IF (LPC11) LPC11U35FHI33/501
// -----------------------------------------------------------
// Serial Port UART0
#define USBTXD      (P0_2)  // identical USBTX  TXD0 (LPC1768 -> LPC11U35)     
#define USBRXD      (P0_3)  // identical USBRX  RXD0 (LPC1768 <- LPC11U35)
// ISP port
#define ISP         (P2_10)

// Reserved / NC pins 
// -----------------------------------------------------------
#define RSVD2       (P3_26) // unused