Skip to content

Commit 24462f3

Browse files
authored
Merge pull request #250 from sparkfun/EVK_v1.1
Add support for EVK v1.1
2 parents 96232af + f847abe commit 24462f3

File tree

4 files changed

+117
-13
lines changed

4 files changed

+117
-13
lines changed

Firmware/RTK_Everywhere/Begin.ino

Lines changed: 95 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -221,17 +221,21 @@ void beginBoard()
221221

222222
else if (productVariant == RTK_EVK)
223223
{
224+
#ifdef EVKv1point1
225+
// Pin defs etc. for EVK v1.1
224226
present.psram_4mb = true;
225227
present.lband_neo = true;
226228
present.cellular_lara = true;
227229
present.ethernet_ws5500 = true;
228230
present.microSd = true;
229231
present.microSdCardDetectLow = true;
230232
present.button_mode = true;
231-
present.peripheralPowerControl = true; // Peripheral power controls the OLED, SD, ZED, NEO, USB Hub,
233+
// Peripheral power controls the OLED, SD, ZED, NEO, USB Hub, LARA - if the SPWR & TPWR jumpers have been changed
234+
present.peripheralPowerControl = true;
232235
present.laraPowerControl = true; // Tertiary power controls the LARA
233236
present.antennaShortOpen = true;
234237
present.timePulseInterrupt = true;
238+
present.gnss_to_uart = true;
235239
present.i2c0BusSpeed_400 = true; // Run bus at higher speed
236240
present.i2c1 = true;
237241
present.display_i2c1 = true;
@@ -246,39 +250,109 @@ void beginBoard()
246250
pin_modeButton = 0;
247251
// 24, D2 : Status LED
248252
pin_baseStatusLED = 2;
249-
// 29, D5 : ESP5 test point
250-
// 14, D12 : I2C1 SDA
253+
// 29, D5 : GNSS TP via 74LVC4066 switch
254+
pin_GNSS_TimePulse = 5;
255+
// 14, D12 : I2C1 SDA via 74LVC4066 switch
251256
pin_I2C1_SDA = 12;
252-
// 23, D15 : I2C1 SCL --> OLED after switch
257+
// 23, D15 : I2C1 SCL via 74LVC4066 switch
253258
pin_I2C1_SCL = 15;
254259

255260
// 26, D4 : microSD card select bar
256261
pin_microSD_CS = 4;
257262
// 16, D13 : LARA_TXDI
263+
pin_Cellular_TX = 13;
258264
// 13, D14 : LARA_RXDO
265+
pin_Cellular_RX = 14;
259266

260267
// 30, D18 : SPI SCK --> Ethernet, microSD card
261268
// 31, D19 : SPI POCI
262-
// 33, D21 : I2C0 SDA
269+
// 33, D21 : I2C0 SDA --> ZED, NEO, USB2514B, TP, I/O connector
263270
pin_I2C0_SDA = 21;
264-
// 36, D22 : I2C0 SCL --> ZED, NEO, USB2514B, TP, I/O connector
271+
// 36, D22 : I2C0 SCL
265272
pin_I2C0_SCL = 22;
266273
// 37, D23 : SPI PICO
267-
// 10, D25 : TP/2
274+
// 10, D25 : GNSS RX --> ZED UART1 TXO
275+
pin_GnssUart_RX = 25;
276+
// 11, D26 : LARA_PWR_ON
277+
pin_Cellular_PWR_ON = 26;
278+
// 12, D27 : Ethernet Chip Select
279+
pin_Ethernet_CS = 27;
280+
// 8, D32 : PWREN
281+
pin_peripheralPowerControl = 32;
282+
// 9, D33 : GNSS TX --> ZED UART1 RXI
283+
pin_GnssUart_TX = 33;
284+
// 6, A34 : LARA_NI
285+
pin_Cellular_Network_Indicator = 34;
286+
// 7, A35 : Board Detect (1.1V)
287+
// 4, A36 : microSD card detect
288+
pin_microSD_CardDetect = 36;
289+
// 5, A39 : Ethernet Interrupt
290+
pin_Ethernet_Interrupt = 39;
291+
#else
292+
// EVK v1.0 - TODO: delete this once all five EVK v1.0's have been upgraded / replaced
293+
present.psram_4mb = true;
294+
present.lband_neo = true;
295+
present.cellular_lara = true;
296+
present.ethernet_ws5500 = true;
297+
present.microSd = true;
298+
present.microSdCardDetectLow = true;
299+
present.button_mode = true;
300+
// Peripheral power controls the OLED, SD, ZED, NEO, USB Hub, LARA - if the SPWR & TPWR jumpers have been changed
301+
present.peripheralPowerControl = true;
302+
present.laraPowerControl = true; // Tertiary power controls the LARA
303+
present.antennaShortOpen = true;
304+
present.timePulseInterrupt = true;
305+
present.i2c0BusSpeed_400 = true; // Run bus at higher speed
306+
present.i2c1 = true;
307+
present.display_i2c1 = true;
308+
present.display_type = DISPLAY_128x64;
309+
present.i2c1BusSpeed_400 = true; // Run display bus at higher speed
310+
311+
// Pin Allocations:
312+
// 35, D1 : Serial TX (CH340 RX)
313+
// 34, D3 : Serial RX (CH340 TX)
314+
315+
// 25, D0 : Boot + Boot Button
316+
pin_modeButton = 0;
317+
// 24, D2 : Status LED
318+
pin_baseStatusLED = 2;
319+
// 29, D5 : LARA_ON - not used
320+
// 14, D12 : I2C1 SDA via 74LVC4066 switch
321+
pin_I2C1_SDA = 12;
322+
// 23, D15 : I2C1 SCL via 74LVC4066 switch
323+
pin_I2C1_SCL = 15;
324+
325+
// 26, D4 : microSD card select bar
326+
pin_microSD_CS = 4;
327+
// 16, D13 : LARA_TXDI
328+
pin_Cellular_TX = 13;
329+
// 13, D14 : LARA_RXDO
330+
pin_Cellular_RX = 14;
331+
332+
// 30, D18 : SPI SCK --> Ethernet, microSD card
333+
// 31, D19 : SPI POCI
334+
// 33, D21 : I2C0 SDA --> ZED, NEO, USB2514B, TP, I/O connector
335+
pin_I2C0_SDA = 21;
336+
// 36, D22 : I2C0 SCL
337+
pin_I2C0_SCL = 22;
338+
// 37, D23 : SPI PICO
339+
// 10, D25 : GNSS TP
268340
pin_GNSS_TimePulse = 25;
269-
// 11, D26 : LARA_ON
341+
// 11, D26 : LARA_PWR_ON
342+
pin_Cellular_PWR_ON = 26;
270343
// 12, D27 : Ethernet Chip Select
271344
pin_Ethernet_CS = 27;
272345
// 8, D32 : PWREN
273346
pin_peripheralPowerControl = 32;
274347
// 9, D33 : Ethernet Interrupt
275348
pin_Ethernet_Interrupt = 33;
276349
// 6, A34 : LARA_NI
350+
pin_Cellular_Network_Indicator = 34;
277351
// 7, A35 : Board Detect (1.1V)
278352
// 4, A36 : microSD card detect
279353
pin_microSD_CardDetect = 36;
280-
// 5, A39 : Unused analog pin - used to generate random values for SSL
281-
354+
// 5, A39 : Not used
355+
#endif
282356
// Select the I2C 0 data structure
283357
if (i2c_0 == nullptr)
284358
i2c_0 = new TwoWire(0);
@@ -300,10 +374,19 @@ void beginBoard()
300374
pinMode(pin_baseStatusLED, OUTPUT);
301375
baseStatusLedOff();
302376

303-
// Turn on power to the I2C_1 bus
377+
DMW_if systemPrintf("pin_Cellular_Network_Indicator: %d\r\n", pin_Cellular_Network_Indicator);
378+
pinMode(pin_Cellular_Network_Indicator, INPUT);
379+
380+
// In the fullness of time, pin_Cellular_PWR_ON will (probably) be controlled by the Cellular Library
381+
DMW_if systemPrintf("pin_Cellular_PWR_ON: %d\r\n", pin_Cellular_PWR_ON);
382+
digitalWrite(pin_Cellular_PWR_ON, LOW);
383+
pinMode(pin_Cellular_PWR_ON, OUTPUT);
384+
digitalWrite(pin_Cellular_PWR_ON, LOW);
385+
386+
// Turn on power to the peripherals
304387
DMW_if systemPrintf("pin_peripheralPowerControl: %d\r\n", pin_peripheralPowerControl);
305388
pinMode(pin_peripheralPowerControl, OUTPUT);
306-
peripheralsOn(); // Turn on power to OLED, SD, ZED, NEO, USB Hub,
389+
peripheralsOn(); // Turn on power to OLED, SD, ZED, NEO, USB Hub, LARA - if SPWR & TPWR jumpers have been changed
307390
}
308391

309392
else if (productVariant == RTK_FACET_V2)

Firmware/RTK_Everywhere/GNSS.ino

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,3 +1263,19 @@ void gnssMenuConstellations()
12631263
um980MenuConstellations();
12641264
}
12651265
}
1266+
1267+
bool gnssIsBlocking()
1268+
{
1269+
if (online.gnss == true)
1270+
{
1271+
if (gnssPlatform == PLATFORM_ZED)
1272+
{
1273+
return (false);
1274+
}
1275+
else if (gnssPlatform == PLATFORM_UM980)
1276+
{
1277+
return (um980IsBlocking());
1278+
}
1279+
}
1280+
return (false);
1281+
}

Firmware/RTK_Everywhere/RTK_Everywhere.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ int pin_GnssUart_TX = PIN_UNDEFINED;
149149
int pin_GnssLBandUart_RX = PIN_UNDEFINED;
150150
int pin_GnssLBandUart_TX = PIN_UNDEFINED;
151151

152+
int pin_Cellular_RX = PIN_UNDEFINED;
153+
int pin_Cellular_TX = PIN_UNDEFINED;
154+
int pin_Cellular_PWR_ON = PIN_UNDEFINED;
155+
int pin_Cellular_Network_Indicator = PIN_UNDEFINED;
156+
152157
int pin_IMU_RX = PIN_UNDEFINED;
153158
int pin_IMU_TX = PIN_UNDEFINED;
154159
int pin_GNSS_DR_Reset = PIN_UNDEFINED;

Firmware/RTK_Everywhere/Tasks.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ void gnssReadTask(void *e)
376376
// same time: gnssReadTask() (to harvest incoming serial data) and um980 (the unicore library to configure the
377377
// device) To allow the Unicore library to send/receive serial commands, we need to block the gnssReadTask
378378
// If the Unicore library does not need lone access, then read from serial port
379-
if (um980IsBlocking() == false)
379+
if (gnssIsBlocking() == false)
380380
{
381381
// Determine if serial data is available
382382
while (serialGNSS->available())

0 commit comments

Comments
 (0)