Problem Interfacing SAM M8Q GPS Module with ATSAMD21 Controller

Hi Everyone,

I have designed a custom board containing UBLOX- SAM M8Q and ATSAMD21 Controller. I have been trying for days to interface the SAM M8Q with the controller without any luck. What is confusing is that I can get the data of GPS Module using echo code which I am also sharing. However, when I run a professional Library’s example code, I get no data at all.

The Echo code image along with received data is shared. I am using SERCOM1 Pins PA18 and PA19 of ATSAMD21 for connection with GPS Module’s via UART

PA18 → TX of GPS
PA19 → RX of GPS

I have tried following libraries

  1. Bolderflight UBLOX library.
  2. Sparkfun UBLOX exmple library
  3. Also tried sample code from this video (10Hz U-blox binary GPS data in 66 lines of code (arduino) - YouTube)

Please help me in resolving this issue. I would be really thankful.

  1. The Echo Code that I uploaded which gives output data from GPS
#include <Arduino.h>
#include "wiring_private.h"
#include "UBLOX.h"


Uart Serial2 (&sercom1, 12, 10, SERCOM_RX_PAD_3, UART_TX_PAD_2);

void SERCOM1_Handler()
{
  Serial2.IrqHandler();
}

UBLOX gps(Serial2,9600);


void setup() {
  Serial.begin(9600);
  Serial2.begin(9600);

  pinPeripheral(10, PIO_SERCOM);
  pinPeripheral(12, PIO_SERCOM);

  //gps.begin();

  while(!Serial);

  Serial.println("Communication Started");

}

void loop() {
  if (Serial2.available()) {
    Serial.write(Serial2.read());
  }

  delay(100);

  if (Serial.available()) {
    Serial2.write(Serial.read());
  }

}
  1. The output that I am getting on Serial Monitor using this code
Serial Monitor Output

46.00,A,2455.62510,N,06705.70401,E,0.228,,060319,,,A*67
$GNVTG,,T,,M,0.228,N,0.422,K,A*31
$GNGGA,071846.00,2455.62510,N,06705.70401,E,1,06,4.82,58.9,M,-44.1,M,,*$G,5151$GNRM,,7,9
$GNR,,7,9
$GNR,,7,9
$GNRT1,,6*$GNRG,22,7$GNRG,22,7$GNRV.207A$GNRN.27,.$GNRN.27,.$GNRV.27,.$GNRN48321$GNRN48322$GNRV.27,.$GNR$-4,V9$GNR$-4,V9$GNRG4.0,0$GNR
,,4S1$GNR
M42G7$GNR
,,,8A$GNR
M450,$GNR69.,,0$GNRA,50,0$GNR*..,20$GNR64.,20$GNR65.,20$GNR
M450,$GNR,6,,27$GNRA0,,28$GNRA0,,29$GNRA0,,20$GNR,6,2,2$GNR,,,,V9$GNR,,,,G7$GNR,1,VL0$GNR,1,VL0$GNR98,SG,$GNR98,SG,$GNR1.,G$E$GNR98,SG,$GNR,,6
*0$GNR0,,G
2$GNR34,P
,$GNR0,,G
4$GNR66,$C2$GNR66,$C1$GNR00,
65$GNR00,
65$GNR,17527$GNR00,
64$GNR,,6
*0$GNR2,,73.$GNR00,
65$GNR5,,73.$GNR4E5*,5$GNR3,,73.$GNR0E5*,5$GNR.6,217$GNR1,7690$GNR0,7690$GNR.0,217$GNR.4,217$GNR.5,217$GNRE0,34,$GNR,667,6$GNR1,7390$GNR046,06$GNR,667,0$GNR,7303N$GNR7.,,,,$GNR,730,0$GNR25A33N$GNR35A358$GNR.0G116$GNR70,270$GNR07A,15$GNR07A,15$GNR76S,3G$GNR80,1,5$GNR.0G014$GNR.0G014$GNR63
,7N$GNR5,N,2L$GNR0NG17L$GNR0NG17L$GNR0NG17L$GNR7,$1,G$GNR03
53G$GNR,9C47N$GNR,9C4,$GNR05$1,G$GNR7,$1,G$GNR,0C4,$GNRN21,4
$GNR,0C4,$GNR,6*32
$GNRN21,4
$GNR,6*32
$GNR,6*32
$GNR1573,6$GNR15.,3*$GNR15.,3*$GNR1573,6$GNR15.,3*$GNR6.343F$GNR24254,$GNR24254,$GNR.,8,63$GNR62,6,5$GNR62,6,5$GNR.,8,63$GNR508,63$GNR507961$GNR23,001$GNR4.4,80$GNR4.4,80$GNR4..0,,$GNR50.001$GNR28,015$GNR,403,8$GNR,504,8$GNRA05,2,$GNRA05,2,$GNRA05,2,$GNRA05,2,$GNR0751V6$GNR00,3S5$GNR00,3S5$GNR00,3S5$GNR00,3S5$GNR,2.6*9$GNR00,3,,$GNR.,,,V6$GNR.,,,V6$GNR.,,,V6$GNR.,,,V6$GNR6A,4S6$GNR0G,4G2$GNR0G,4G2$GNR0G,4G2$GNR1G,,L,$GNR1G,,

Can you say if you get a fix? A few gps libraries are only do something in case of a fix. Could you upload your test code with the libraries? maybe there is a problem with the SERIAL2

Try to use this library:

Its very superior and even can decode ublox messages, i use it alot of times

Did you get it working? I did some work with this module recently.